Bug 170766 - GATEWAYDEV not evaluated properly when using two eth's as dhcp clients
GATEWAYDEV not evaluated properly when using two eth's as dhcp clients
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dhcp (Show other bugs)
4.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
:
Depends On:
Blocks: 168429
  Show dependency treegraph
 
Reported: 2005-10-14 10:52 EDT by Jason Vas Dias
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0114
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-07 13:14:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Vas Dias 2005-10-14 10:52:20 EDT
+++ This bug was initially created as a clone of Bug #147502 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041020

Description of problem:
we have two interfaces eth0 and eth1 which are both configured via
dhcp and are getting both a default gw via dhcp.

==========================
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:D0:B7:91:D8:B3
ONBOOT=yes
TYPE=Ethernet
============================
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:0E:0C:60:CF:15
ONBOOT=yes
TYPE=Ethernet 

It would be nice if GATEWAYDEV from /etc/sysconfig/network would be
evaluated.

As it is right now the default-gw from eth0 is always chosen.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:


Actual Results:  default route is chosen from the dhcp config sent by eth0

Expected Results:  evaluation of GATEWAYDEV /etc/sysconfig/network

so if I set GATEWAYDEV=eth1 I would expect that the default route send
via dhcp on eth1 would be chosen.

Additional info:

happens on Fedora Core 3 as well

-- Additional comment from notting@redhat.com on 2005-02-08 12:22 EST --
Does the patch in 133575 work for you?

-- Additional comment from baumannm@cs.tu-berlin.de on 2005-02-10 05:10 EST --
Unfortunately not. It only applies to BOOTPROTO=static and not to the
dynamic section.


-- Additional comment from notting@redhat.com on 2005-02-10 16:30 EST --
I do believe all the gateway setting is done in dhclient-script.

-- Additional comment from jvdias@redhat.com on 2005-02-10 18:00 EST --
This problem will be fixed in the next DHCP version.
If GATEWAYDEV is set, and the interface being configured with DHCP
is not the GATEWAYDEV, then the default route will not be created
by the dhclient-script .
The new dhclient-script also deletes any current default route before
attempting to create a new one; the reason eth0's DHCP router option
was always used as the default was that eth1's dhclient-script 
session tried to create the default route, but it failed because
a default route already existed . For this reason, if GATEWAY is
set in /etc/sysconfig/network then no invocation of the new 
dhclient-script should attempt to create a default route. 
This fix will be in dhcp-3.0.1-11_EL3 shortly - I'll update this
bug when it is.


-- Additional comment from jvdias@redhat.com on 2005-02-11 19:45 EST --
This bug is now fixed in dhcp-3.0.1-33_EL3, which is making its way
through QA and hopefully into RHEL-3-U5 . Meanwhile, you can download
it from:
   http://people.redhat.com/~jvdias/DHCP/RHEL-3/
Please test and let me know if it is OK or you have any problems.
Thanks, Jason Vas Dias, Red Hat .

-- Additional comment from baumannm@cs.tu-berlin.de on 2005-02-17 09:52 EST --
ok. now the behaviour is as follows:

both interfaces get their ips and a default gw via dhcp.

If GATEWAYDEV is set the default route is always set according to the
GATEWAYDEV (which is what we/most people will want).

If there is no GATEWAYDEV it seems that the default gateway of the
last (eth1) interface will be used. Whether it is always the last or
only the interface which gets quicker a dhcp response I have not
verified. But since there is nowhere a preference this behaviour
should be ok.

-- Additional comment from jvdias@redhat.com on 2005-02-17 11:10 EST --
Yes, the previous behavior was that ONLY the first DHCP session to
set the default gateway could succeed; if you happened to want the
second session to succeed, you'd be out of luck. Now at least one
has some control over this with GATEWAYDEV. 
Interface devices are always brought up in the numerical order of
their interface number : eth0, eth1... etc. - and no interface 
configuration begins before the previous session ends . While 
dhclient is capable of configuring multiple interfaces in parallel,
this feature is not used .

-- Additional comment from jvdias@redhat.com on 2005-10-14 10:50 EST --
This bug is fixed with dhcp-3.0.1-40_EL3+
Comment 6 Red Hat Bugzilla 2006-03-07 13:14:33 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0114.html

Note You need to log in before you can comment on or make changes to this bug.