LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Multiple IP address/gateways single nic (https://www.linuxquestions.org/questions/linux-networking-3/multiple-ip-address-gateways-single-nic-383130/)

1192bo 11-14-2005 03:45 PM

Multiple IP address/gateways single nic
 
Hi,

I am running Mandrake 8.2 and need to create multiple ip address/gateways for 1 network card. I have the virtual interface setup as eth0:1 and it works. I need to specify a different gateway for eth0:1 than for eth0.

Thanks
Bill

pk21 11-15-2005 05:48 AM

You can't have 2 different default gateways, but you can add a route to a specific network and a gateway with the "route" command

1192bo 11-15-2005 07:51 AM

I have tried

route add -host 65.0.0.1 gw 1.2.3.4
Where host is the IP address of eth0:

route add -host 65.0.0.2 gw 5.6.7.8
Where host is the IP address of eth0:1

This is not working


All times are GMT -5. The time now is 05:09 PM.