Betr.: Multiple IP Addresses in a single NIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

You need to issue two commands:

/sbin/ifconfig eth0:0 xxx.xxx.xxx.xxx
/sbin/route add -host xxx.xxx.xxx.xxx dev eth0

For example:

/sbin/ifconfig eth0:0 172.16.1.199
/sbin/route add -host 172.16.1.199 dev eth0

You can even assign multiple aliases to one NIC (One of my servers has about 10 ip addresses):

For example:

/sbin/ifconfig eth0:0 172.16.1.199
/sbin/route add -host 172.16.1.199 dev eth0

/sbin/ifconfig eth0:1 172.16.1.198
/sbin/route add -host 172.16.1.198 dev eth0

/sbin/ifconfig eth0:2 172.16.1.197
/sbin/route add -host 172.16.1.197 dev eth0

and so on.....

You should write an startup script to execute these commands at boot time, because after a reboot the aliases are forgotten.









Thom van der Boon
E-Mail: Thom.van.der.Boon@xxxxxx

=====

Thom.H. van der Boon b.v.
Havens 563
Jan Evertsenweg 2-4
NL-3115 JA  Schiedam
Tel.: +31 (0)10 4272727
Fax: +31 (0)10 4736620
E-Mail: info@xxxxxx
Home Page: http://www.vdb.nl/

>>> joao.c.medeiros@xxxxxxxxx 24.06.2005 00:28:01 >>>
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?

TIA,
--JM

Jo?o Medeiros
Linux User 381318

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx 
http://lists.centos.org/mailman/listinfo/centos

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Thom van der Boon.vcf
Type: text/x-vcard
Size: 147 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20050624/ee31a6c3/ThomvanderBoon.vcf

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux