Red Hat Bugzilla – Bug 202425
ifup drops existing default route in favour of new one received via DHCP
Last modified: 2014-03-16 23:01:20 EDT
Description of problem:
Version-Release number of selected component (if applicable):
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')
secondary interface is up, previous default gateway has been replaced with the
one received when the secondary interface sent it's DHCP request
secondary interface is up, gateway has not been changed (see below)
"# 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
This is what ifcfg-eth0 looks like:
This is what ifcfg-eth2 looks like:
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.