Bug 87687 - Multiple Default routes....
Summary: Multiple Default routes....
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-network
Version: 7.3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-01 08:45 UTC by Richard Tresidder
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-02 14:17:05 UTC

Attachments (Terms of Use)

Description Richard Tresidder 2003-04-01 08:45:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Description of problem:

There is no means to handle which device has the default route.
At the moment I have the following interfaces in my computer
1. eth0  static IP
2. eth1  dynamic IP
3. Standard modem ppp0

There is an ADSL modem on eth1 supplying the IP etc to eth1

If I want to use the ppp link through ppp0 then I fisrt have to shutdown the
eth1 link even though the ADSL link may be down and the IP of eth1 is just a
DHCP connection.
Somehow there have been two default routs entered into the routing table. ppp
adds one and somehow another on is getting added for eht1 along with it's normal
static route.
How is this additional default route being added to eth1 ???
Is it something to do with the fact that eth1 is asigned through dhcp ??

Note I haven't actually activated the ADSL link at the moment.

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

How reproducible:

Steps to Reproduce:

Actual Results:  NA

Expected Results:  To be able to tell eth1 to not be the default route. 

Additional info:

I know it will have to be the default route when I use the net through it. But
at the moment I'm just wondering why?

Comment 1 Harald Hoyer 2003-04-01 09:45:32 UTC
why do you set so many default routes? default routes are there to define the
route to any network.
I guess you have private networks on eth0 and eth1. So why don't you set network
routes for them instead of default gateways???

Comment 2 Richard Tresidder 2003-04-02 06:25:51 UTC
I didn't set the default route... Thats what I'm talking about.
Somehow the startup or "ifup eth1" is setting the default route.
The settings for all devices are configured with neat.
I can not find any configuration option that would say "set as default route"

It won't matter in another week or two because I hopefully wont be needing the
modem.  But I don't get why starting up eth1 should decide to install itself as
the ANOTHER default route. (There is already a default route in the routing table)

If this was connecting to another network then I would use a gateway setting!
But at the moment it is just another ethercard. And I only want the static route
entry NOT the default route entry.  I can manually delete it in the post startup
script but that is a pain. I only want the one default route at the moment for
the internet and that is set by pppd which is also configured through neat.

Here is the ifcfg-eth1 file

# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.

On the end of this cable is a new adsl modem that supplys the ip etc.

I was wondering where the default route option is coming from. Especially
considering the fact there is already a default route in the routing table for
the ppp0 link.


Comment 3 Harald Hoyer 2003-04-02 09:21:33 UTC
show me 
$ route -n

Comment 4 Richard Tresidder 2003-04-02 14:02:15 UTC
With eth1, lo and ppp0 on
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        0 ppp0   U     0      0        0 eth0       U     0      0        0 lo         UG    0      0        0 ppp0

Now with eth1 also activated

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        0 ppp0   U     0      0        0 eth0   U     0      0        0 eth1       U     0      0        0 lo         UG    0      0        0 eth1         UG    0      0        0 ppp0

I also have to start this interface up from the command line using "ifup eth1"
and it doesn't seem to complete the operation corectly it just pauses. I have to
hit cntrl-C to quit out of the "ifup" command. 

The only place I can see where a default route is set in the "ifup" script is
when the following does not return true "if [ -n "${DYNCONFIG}" ];" and the
default route is set at the end of the "else" area for this test.

It could also be the fact that the GenMask set through the DHCP negotiations is
effectively setting the routing address range. But I dnon't really know enough
about that to say.
I'd be happy if ppp0's default was first :)


Comment 5 Harald Hoyer 2003-04-02 14:17:05 UTC
hmm... this is done by the dhcp client dhclient...
you may have to change that behaviour in /etc/dhclient.conf.
This is not a bug... this is a dhcp configuration issue.
But, this should maybe be made configurable more easy...

Comment 6 Richard Tresidder 2003-04-02 15:19:41 UTC
I'll take a look and get back to you.
I wasn't sure about it.
By the way this Network Config tool is excellent, it sure makes my job easier :)


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