Bug 150083 - dhclient forces to use default route as received from dhcpd
dhclient forces to use default route as received from dhcpd
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-02 05:19 EST by Jani Ollikainen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-02 14:24:47 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 Jani Ollikainen 2005-03-02 05:19:38 EST
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 14:24:47 EST
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.