[CentOS] Multiple IP Addresses in a single NIC

Thu Jun 23 22:41:46 UTC 2005
Sean O'Connell <oconnell at soe.ucsd.edu>

On Thu, 2005-06-23 at 23:28 +0100, Joao Medeiros wrote:
> Hi all,
> 
> I've been trying to add a second ip address to one of my network cards in my
> CentOS box. I've defined the alias on top of eth1 which has become eth1:1
> with a different ip address.
> 
> I can ping the new ip address both from my linux box as well as from my
> Windoze desktop, however I can only access my Apache web server setup as a
> virtual host from within the Linux box. If I try to access it from the
> desktop I get an "Operation Timeout..." error.
> 
> I'm sure I missed out something really basic. Browsed Google and the CentOS
> mailing list (plus RH) and can't figure it out. Networking is not one of my
> best subjects... Someone care to shed some light or point me to a fairly
> decent link out there which covers this topic?

Have you restarted apache? Does your httpd.conf have a Listen *
directive or does it only listen on explicit ip addresses? If you do a
netstat -at, does it show apache listening on that the interface?

It could also be something in your iptables. E.g. using -i eth1 for your
http rule. If so, you can use the more flexible -i eth+ (or eth1+).

Also, you can codify your alias, using /etc/sysconfig/network-scripts/ifcfg-eth1:1

-- 
Sean O'Connell
Office of Engineering Computing         oconnell at soe.ucsd.edu
Jacobs School of Engineering, UCSD      858.534.9716 (49716)