Description of problem: Version-Release number of selected component (if applicable): initscripts-7.93.25.EL-1 dhclient-3.0.1-58.EL4 How reproducible: every time Steps to Reproduce: 1. Configure primary NIC (say eth0) - you can use either DHCP, or do it static and specify the default gateway in /etc/sysconfig/network 2. Configure the seconday NIC (say eth2) to use DHCP (set ONBOOT=no) 3. Bring up the secondary interface (for instance with 'ifup eth2') Actual results: secondary interface is up, previous default gateway has been replaced with the one received when the secondary interface sent it's DHCP request Expected results: secondary interface is up, gateway has not been changed (see below) Additional info: /etc/sysconfig/network-scripts/ifup states: "# remove the default route for the new device (old route wins)" As such, I would expect the default route going via eth0 to be kept and the new route via eth2 to be dropped. However, this is not the behaviour that can be observed.
This is what ifcfg-eth0 looks like: DEVICE=eth0 BOOTPROTO=static HWADDR=00:14:4F:40:19:DC ONBOOT=yes TYPE=Ethernet IPADDR=172.27.1.70 NETMASK=255.255.255.0 This is what ifcfg-eth2 looks like: DEVICE=eth2 BOOTPROTO=dhcp HWADDR=00:14:4F:40:19:DE ONBOOT=no TYPE=Ethernet PEERDNS=no
It seems that dhclient drops the default route - it's not ifup. I think this bug report can be closed; it will probably boil down to a configuration issue with dhclient, not a bug in the initscripts. The remark about duplicate routes does not seem to apply to cases where dhclient is used.
Lines 274 and 284 of /sbin/dhclient-script replace the default route. Setting DHCLIENT_USE_GATEWAY in the ifcfg script (for instance to 'no') circumvents this.
Right, this is configurable behavior. Closing as NOTABUG.