DHCP and default gateway problem
Some background info: I have a new Toshiba A65 laptop which is now running dual boot with SuSE 9.1 Pro and WinXP. This laptop has a built-in 802.11g wireless as well as a 10/100 ethernet interface. The wireless antenna can be turned on and off via a switch. I have a home ethernet LAN as well as a Netgear 802.11g-to-ethernet router. The ethernet LAN has another SuSE 9.1 machine acting as a DHCP server. The Netgear wireless-G router itself also acts as a DHCP server for all wireless devices. WinXP works perfectly on either interface. Here is the problem: Under SuSE 9.1, I configured both interfaces to use DHCP, but the machine will only set up a default gateway route to the Netgear router when I enable the wireless antenna. If I turn off the wireless antenna, and plug in the ethernet LAN, the system boots up with the correct IP number (served from the other SuSE-based DHCP server), but it does not set up a default gateway route. If I add a /etc/sysconfig/network/ifroute-eth-id-*:*:*:*:*:* file with a hard-wired default route, then it works, but only if I use the laptop on my own LAN. I I plug the laptop into a foreign LAN (like when I bring my laptop to the office), it no longer sets up a default gateway. What's wrong and how can I fix this? I'd like the laptop to be able to plug-and-play on anyone's LAN as long as there is a working DHCP server, without having to manually add a default gateway. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
Ti Kan wrote:
Under SuSE 9.1, I configured both interfaces to use DHCP, but the machine will only set up a default gateway route to the Netgear router when I enable the wireless antenna.
dhcpcd can only AFAIK set up the default gateway for one interface. By definition, AFAIK, there can only be one default gateway for the machine, a problem when you can have 2 active interfaces. How is dhcpcd to know which is the one you are using now? ifplugd might help, but not with this exact issue I don't think.
What's wrong and how can I fix this? I'd like the laptop to be able to plug-and-play on anyone's LAN as long as there is a working DHCP server, without having to manually add a default gateway.
I'm sorry, I don't yet know how to solve this one. -- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Registered Linux user 231871
Ti Kan wrote:
Some background info:
I have a new Toshiba A65 laptop which is now running dual boot with SuSE 9.1 Pro and WinXP. This laptop has a built-in 802.11g wireless as well as a 10/100 ethernet interface. The wireless antenna can be turned on and off via a switch.
I have a home ethernet LAN as well as a Netgear 802.11g-to-ethernet router. The ethernet LAN has another SuSE 9.1 machine acting as a DHCP server. The Netgear wireless-G router itself also acts as a DHCP server for all wireless devices. WinXP works perfectly on either interface.
Here is the problem:
Under SuSE 9.1, I configured both interfaces to use DHCP, but the machine will only set up a default gateway route to the Netgear router when I enable the wireless antenna. If I turn off the wireless antenna, and plug in the ethernet LAN, the system boots up with the correct IP number (served from the other SuSE-based DHCP server), but it does not set up a default gateway route.
If I add a /etc/sysconfig/network/ifroute-eth-id-*:*:*:*:*:* file with a hard-wired default route, then it works, but only if I use the laptop on my own LAN. I I plug the laptop into a foreign LAN (like when I bring my laptop to the office), it no longer sets up a default gateway.
What's wrong and how can I fix this? I'd like the laptop to be able to plug-and-play on anyone's LAN as long as there is a working DHCP server, without having to manually add a default gateway.
Is the wireless NIC disabled, using the ifconfig command? If it's enabled, that might be the cause of your problem. You might also try using different profiles. I have my system configured to boot up, using the ethernet NIC and if I want wireless, run a script, that shuts down the ethernet and starts up the wireless. I have another script that does the reverse as well.
James Knott writes:
Ti Kan wrote:
[ no default gateway for eth0 when wireless antenna is turned off ]
What's wrong and how can I fix this? I'd like the laptop to be able to plug-and-play on anyone's LAN as long as there is a working DHCP server, without having to manually add a default gateway.
Is the wireless NIC disabled, using the ifconfig command?
No, I just let it time out when it boots and it backgrounds itself.
If it's enabled, that might be the cause of your problem.
Sure looks like it. It seems that if the machine has two network interfaces both using DHCP, even though the first one (which is my wireless) doesn't get a DHCP server response and the second one (my ethernet) does, a default gateway does not get set up based on the DHCP response from the second.
You might also try using different profiles. I have my system configured to boot up, using the ethernet NIC and if I want wireless, run a script, that shuts down the ethernet and starts up the wireless. I have another script that does the reverse as well.
I just came across SCPM and Profiles while perusing the SuSE Admin Guide. Haven't played with this before but it looks promising. I'll see what it could do. Thanks for the tip. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
I wrote:
... [ Default gateway problem on laptop with both a ethernet and a wireless-G interface, both via DHCP ]
Just an update on this... I got everything working using SCPM now. It is exactly what I needed. Thanks for your help James. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
participants (3)
-
James Knott
-
Joe Morris (NTM)
-
ti@amb.org