LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Multiple IP on on NIC (https://www.linuxquestions.org/questions/linux-general-1/multiple-ip-on-on-nic-21896/)

aceexpert 05-27-2002 12:26 AM

Multiple IP on on NIC
 
Is there a way to have multiple IP's assigned to on NIC. Say have
10.0.0.1 and 192.168.1.1 assigned to eth0. Im using RH6.1 (2.2.12) and squid is running on my linux box.

thanks

MartBrooks 05-27-2002 12:44 AM

Yes, use IP aliasing.

Make sure you have support for it compiled into your kernel then you can use, for example:

ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0


Regards

verigoth 05-28-2002 02:31 AM

why not have three? then you have all classes represented...here's my set up:
eth0 - 10.10.3.1 (255.0.0.0)
eth0:0 - 172.16.1.1 (255.255.0.0)
eth0:1 - 192.168.1.1 (255.255.255.0)

verigoth

Noerr 05-28-2002 05:04 AM

as far as I remmember I had troubles wiht rh6x and ipaliasing
I could setup eth0:1 , eth0:2 ..
but when i went for
ifconfig eth0:2 down, it would stop entire eth0 and I got cut off my server. So be carefull if your computer is not at your reach


All times are GMT -5. The time now is 10:37 AM.