Bug 146277 - dhclient-script fails add route to gateway before adding the default route
dhclient-script fails add route to gateway before adding the default route
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
3
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jason Vas Dias
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-26 12:42 EST by Y Subhash Chandra
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.0.1-31
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-19 06:11:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patched dhclient-script: Simple fix adding host route to gw before adding default route (10.30 KB, text/plain)
2005-01-26 12:45 EST, Y Subhash Chandra
no flags Details

  None (edit)
Description Y Subhash Chandra 2005-01-26 12:42:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20050126 Firefox/1.0

Description of problem:
When the host is happen to be on DHCP and the default gateway(router)
IP doesn't belong to the local network (ex: host address is
192.168.4.127 but gateway address is 202.142.94.106) dhclient-script
tries to add default route to gate which fails because the gateway
itself is not reacheable. Only entry in routing table will the for
hosts local network. The dhclient-script ideally add the route to the
gateway first then add the default route if the gateway IP not as the
local network IP.

Note: My machine is on a local lan on DHCP.

Version-Release number of selected component (if applicable):
dhclient-3.0.1-30_FC3

How reproducible:
Always

Steps to Reproduce:
1.Get to the DHCP setuation as described
2.run dhclient <interface>
3.
    

Actual Results:  dhclient says Network not reachable and routing table
only contains one entry to local network.

Expected Results:  Expected routing table is setup properly with
default gateway.

Additional info:
Comment 1 Y Subhash Chandra 2005-01-26 12:45:41 EST
Created attachment 110259 [details]
Patched dhclient-script: Simple fix adding host route to gw before adding default route

Not sure it is a correct fix or not it works for me.
Comment 2 Jason Vas Dias 2005-01-26 14:01:05 EST
Your DHCP server is really not meant to be supplying you with a 
gateway router that is not on your configured subnet .
This only works in your case because you are evidently on the 
same physical LAN as your router and your host sees the router's
ARP entry .
The operator of your DHCP server and router should be configuring 
the router with secondary IP addresses for each separate subnet
served by the DHCP server, and giving out those secondary IPs
that are on the lease subnet as the 'router' DHCP option for 
each lease .
Also we don't want to add a host route for EVERY gateway, only 
for those not on the interface subnet .
A better fix would be as follows:
  IF the gateway to be configured is not on interface subnet:
     IF an "ARP ping" succeeds for the gateway:
         add host route for gateway
     ELSE
         emit helpful log message and do not configure interface
     ENDIF
  ENDIF
  configure default gateway
We also need to remember to delete the host route when an interface
is reconfigured .
  
I'll implement these changes in the next dhcp version for FC3 
(dhcp-3.0.1-32_FC3).


Comment 3 Jason Vas Dias 2005-01-27 12:59:54 EST
This is now done in dhcp-3.0.1-31_FC3, which can be downloaded from:
   http://people.redhat.com/~jvdias/DHCP/FC3/3.0.1-31_FC3
I've tested it with a DHCP server that supplies a router not on the
subnet of the DHCP supplied IP address, and it works fine.
Please test and let me know how it works for you and I'll push it to
fc3-updates. Thanks!
Comment 4 Y Subhash Chandra 2005-01-28 10:43:35 EST
I have updated to dhcp-3.0.1-31_FC3 and tested it, it works great thanks.
Comment 5 Walter Justen 2005-08-19 06:11:47 EDT
update package is published

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