Bug 87687

Summary: Multiple Default routes....
Product: [Retired] Red Hat Linux Reporter: Richard Tresidder <rtresidd>
Component: redhat-config-networkAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-02 14:17:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:
Hi

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):
redhat-config-network-1.0.3-1.i386.rpm

How reproducible:
Always

Steps to Reproduce:
1.NA
2.NA
3.NA
    

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.
USERCTL=no
BOOTPROTO=dhcp
HWADDR=52:54:05:e3:c5:5a
DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
PEERDNS=no

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.

Thanks
   Richard

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
203.24.100.243  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         203.24.100.243  0.0.0.0         UG    0      0        0 ppp0

Now with eth1 also activated

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
203.24.100.243  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.254   0.0.0.0         UG    0      0        0 eth1
0.0.0.0         203.24.100.243  0.0.0.0         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 :)

Thanks
   Richard


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
Thanks
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 :)

Richard