How to Force a Default Route when Using DHCP
Novell Cool Solutions: Trench
By Curtis Parker
|
Digg This -
Slashdot This
Posted: 6 Jan 2005 |
Problem:
When using DHCP on SUSE Linux Professional 9.1, your default route should automatically be detected. If for some reason it is not detected, there is a way to force a default route.
Solution:
- Add the parameter DHCLIENT_SET_DEFAULT_ROUTE="yes" to the ifcfg-eth0 or ifcfg-eth-id-xx:xx:xx:xx:xx:xx file in the /etc/sysconfig/network directory.
Note: When SUSE Linux Professional 9.1 auto-discovers a network interface, it seems to use the "ifcfg-eth-id-xx:xx:xx:xx:xx:xx" format. Modify whichever one is already there. Don't create a new one. Other config parameters are described in the config, dhcp, and wireless files in the same directory.
- After adding the parameter to the file, you do not need to reboot, just type:ifdown eth0 then type:ifup eth0
Example:
On my system, before I fixed the problem, the contents of the /etc/sysconfig/network/ifcfg-eth-id-00d05905965f file was:
BOOTPROTO='dhcp' MTU='' REMOTE_IPADDR='' STARTMODE='onboot' UNIQUE='WL76.x+4TzbL0KL6' _nm_name='bus-pci-0000:00:09.0'
After the fix, the file looks like this:
BOOTPROTO='dhcp MTU='' REMOTE_IPADDR='' STARTMODE='onboot' UNIQUE='WL76.x+4TzbL0KL6' _nm_name='bus-pci-0000:00:09.0' DHCLIENT_SET_DEFAULT_ROUTE="yes"
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

