Bug 150083 - dhclient forces to use default route as received from dhcpd
Summary: dhclient forces to use default route as received from dhcpd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-02 10:19 UTC by Jani Ollikainen
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-02 19:24:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jani Ollikainen 2005-03-02 10:19:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 Fedora/1.0.1-1.3.1

Description of problem:
There is no way to disable default route for interface which uses dhcp as protocol to receive ip-address etc.

I would like to see something like this in future releases:
/sbin/dhclient-script (from line 141): 
function add_default_gateway()
{
+        if [ "${DEFAULTROUTE}" == "no" ]; then
+           return
+        fi

So that then we can say in
/etc/sysconfig/network-scripts/ifcfg-eth?:
PEERDNS=no
DEFAULTROUTE=no

And we only get ip/netmask/broadcast from dhcp and that's all what we want.

This seems to work but people more familiar to the scripts can point out
failures, but the idea of what is needed is clear.


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

How reproducible:
Always

Steps to Reproduce:
1. Configure interface
2. Put interface up
  

Actual Results:  We get default route

Expected Results:  We don't get default route

Additional info:

Comment 1 Jason Vas Dias 2005-03-02 19:24:47 UTC
There are several ways to cause dhclient to use a different default
route than that supplied by the DHCP "routers" option with 
dhclient-3.0.1-40_FC3:

1. Specifying $GATEWAYDEV in /etc/sysconfig/network :
   Then ONLY the dhclient session for the $GATEWAYDEV interface
   will set a default route from the DHCP "routers" option. There's
   nothing stopping you from specifying an interface that is never
   brought up, eg. 'GATEWAYDEV=eth7' - then no DHCP session will 
   set the default route.

2. Specifying $GATEWAY in ifcfg-ethX : 
   The dhclient session for ethX will set the default route to
   be via $GATEWAY IF the IP address and subnet mask received
   from DHCP match the subnet of $GATEWAY - else, no default
   route is set by the dhclient session for ethX .

3. Specifying 'supersede routers AAA.BBB.CCC.DDD;' in 
   /etc/dhclient.conf :
   All dhclient sessions will attempt to set the default route to
   be via AAA.BBB.CCC.DDD on their interface and will ignore the
   routers option sent by DHCP .

As there are quite a few ways to disable setting the default route
with DHCP, no new ways are needed - hence, this bug is being closed 
as 'NOT A BUG'.



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