Red Hat Bugzilla – Full Text Bug Listing
|Summary:||dhclient was not properly setting the default gateway ip|
|Product:||[Fedora] Fedora||Reporter:||Reginald Melchisedek Poyau <rpoyau>|
|Component:||dhcp||Assignee:||Jason Vas Dias <jvdias>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:|
|Fixed In Version:||dhcp-3.0.1-6||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-04-10 12:57:45 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Reginald Melchisedek Poyau 2004-06-21 01:59:03 EDT
Description of problem: /sbin/dhclient-script was imporperly setting the default gateway ip address Version-Release number of selected component (if applicable): 3.0.1rc13-1 How reproducible: This was 100% reproducible when the dhcp server was WGT634U (netgear media router) Steps to Reproduce: 1. from command line run netconfig as root 2. check "Use dynamic IP configuration (BOOTP/DHCP)" ** One can also manually edit nic config file /etc/sysconfig/network-scripts/ifcfg-<interface><n> setting BOOTPROTO=dhcp 3. restart network service /etc/rc.d/init.d/network restart. or do a ifdown <interface><n>;ifup <interface><n> 4. execute route from command line Actual results: default gateway ip addr was not correct Expected results: default gateway ip addr should have been correct Additional info: Commenting line 136: route add default dev $interface netmask 0.0.0.0 from /sbin/dhclient-script resolved this issue
Comment 1 Reginald Melchisedek Poyau 2004-06-24 10:31:22 EDT
Reproducibility: I was able to reproduce this issue against another dhcp server. Additionally, the reason why commenting line 136 works is that at around line 220 the default gw are set there, but line 136 was basically setting the default gw to '0.0.0.0' - commenting that out prevents this. Of course one cannot set the default gw twice without first deleting the previous one.
Comment 2 Jason Vas Dias 2004-08-03 16:33:25 EDT
Actually, I think the section of code in question was this: /sbin/dhclient-script, now lines 130-135: elif [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ) then ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ broadcast 255.255.255.255 up # Add route to make broadcast work. Do not omit netmask. route add default dev $interface netmask 0.0.0.0 else Firstly, why are you running such an ancient kernel ? Upgrading to a kernel > 2.0 will fix your problem. These lines do NOT set the default gateway to 0.0.0.0, they set the default route to be through the $interface, which at that time is given address 0.0.0.0 (because we don't know what other address to give it yet); when it is assigned an address, the default route will still be through that interface. Anyway, I agree that 2.0 kernels should be able to obtain a default route from DHCP. This is now fixed in dhcp-3.0.1-6 (requires initscripts-7.60-1).
Comment 3 David Lawrence 2006-07-17 23:46:52 EDT
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future. Moving to ON_QA.
Comment 4 Matthew Miller 2007-04-10 12:57:45 EDT
There's a version greater than dhcp-3.0.1-6 in FC5.