Is it possible to set up a NIC so that it answers to two different IP-addresses? I have tried to do this through YaST on a SuSE 7.3 system, but when I try adding another line, the device shifts to eth1 by default, instead of letting me choose eth0, which is necessary to get two IP-addresses assigned to the same NIC. Can it be done? Best regards, David List
* David List;
Is it possible to set up a NIC so that it answers to two different instead of letting me choose eth0, which is necessary to get two IP-addresses assigned to the same NIC.
try eth0:1 -- Togan Muftuoglu
ifconfig eth0:0 192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0 up will always work, on any linux box to get this on boot, put it in /etc/init.d/rc.local (if there is no rc.local, create one) and then do chmod 700 /etc/init.d/rc.local ln -s /etc/init.d/rc.local /etc/init.d/rc3.d/S99local change 192.168.1.2 to whatever ip you want On Sunday 21 April 2002 03:01 pm, David List wrote:
Is it possible to set up a NIC so that it answers to two different IP-addresses? I have tried to do this through YaST on a SuSE 7.3 system, but when I try adding another line, the device shifts to eth1 by default, instead of letting me choose eth0, which is necessary to get two IP-addresses assigned to the same NIC.
Can it be done?
Best regards, David List
-- Chad Whitten Network/Systems Administrator neXband Communications cwhitten@nexband.com
On Monday 22 April 2002 15:20, Chad Whitten wrote:
ifconfig eth0:0 192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0 up will always work, on any linux box
Nope it won't. On SuSE 8.0 for instance I think it will result in a message to the effect that ifconfig isn't used anymore. Look at iproute2. It's the new standard. This is just as an aside, though. It should work on 7.3.
to get this on boot, put it in /etc/init.d/rc.local (if there is no rc.local, create one) and then do chmod 700 /etc/init.d/rc.local ln -s /etc/init.d/rc.local /etc/init.d/rc3.d/S99local
That's one way to do it. Marginally simpler would be to edit /etc/rc.config and change NETDEV_1 to eth0:0 and IFCONFIG_1 to the proper parameters. Anders
On Monday 22 April 2002 15:36, Anders Johansson wrote:
That's one way to do it. Marginally simpler would be to edit /etc/rc.config and change NETDEV_1 to eth0:0 and IFCONFIG_1 to the proper parameters.
I tried editing /etc/rc.config to this: IPADDR_0="192.168.1.3" IPADDR_1="192.168.1.4" IPADDR_2="" IPADDR_3="" NETDEV_0="eth0" NETDEV_1="eth0:0" NETDEV_2="" NETDEV_3="" IFCONFIG_0="192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0 up" IFCONFIG_1="192.168.1.4 broadcast 192.168.1.255 netmask 255.255.255.0 up" IFCONFIG_2="" IFCONFIG_3="" and run SuSEconfig and reboot. I cannot ping 192.168.1.4 from other LAN hosts. What is wrong? Thank you for your answer. Best regards, David List
you may have to change # # Number of network cards: "_0" for one, "_0 _1 _2 _3" for four cards # NETCONFIG="_0" to NETCONFIG="_0_1" in /etc/rc.config before doing that, do an ifconfig and see if eth0:0 is actually up. On Monday 22 April 2002 10:25 am, David List wrote:
On Monday 22 April 2002 15:36, Anders Johansson wrote:
That's one way to do it. Marginally simpler would be to edit /etc/rc.config and change NETDEV_1 to eth0:0 and IFCONFIG_1 to the proper parameters.
I tried editing /etc/rc.config to this:
IPADDR_0="192.168.1.3" IPADDR_1="192.168.1.4" IPADDR_2="" IPADDR_3="" NETDEV_0="eth0" NETDEV_1="eth0:0" NETDEV_2="" NETDEV_3="" IFCONFIG_0="192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0 up" IFCONFIG_1="192.168.1.4 broadcast 192.168.1.255 netmask 255.255.255.0 up" IFCONFIG_2="" IFCONFIG_3=""
and run SuSEconfig and reboot. I cannot ping 192.168.1.4 from other LAN hosts. What is wrong?
Thank you for your answer.
Best regards, David List
-- Chad Whitten Network/Systems Administrator neXband Communications cwhitten@nexband.com
On Monday 22 April 2002 15:36, Anders Johansson wrote:
On Monday 22 April 2002 15:20, Chad Whitten wrote:
ifconfig eth0:0 192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0 up will always work, on any linux box
Nope it won't. On SuSE 8.0 for instance I think it will result in a message to the effect that ifconfig isn't used anymore. Look at iproute2. It's the new standard.
Yep, it does. and ifconfig is located in the /sbin directory on 8.0 Just tried it. Mike -- Powered by SuSE 8.0 Kernel 2.4.18 KDE 3.0.0 Kmail 1.4 For a great linux portal try http://www.freezer-burn.org 6:58pm up 1 day, 9:05, 4 users, load average: 1.70, 1.90, 1.97
On Monday 22 April 2002 18:59, Mike wrote:
Yep, it does. and ifconfig is located in the /sbin directory on 8.0 Just tried it.
Fair enough. I know ifconfig is on the way out, and I had a memory from running 8.0 beta that one of the network commands just returned a message that it's not used anymore. Must have been something else then, sorry. Anders
participants (5)
-
Anders Johansson
-
Chad Whitten
-
David List
-
Mike
-
Togan Muftuoglu