Bug 88826 - adding ethernet aliases results in multiple gateways which breaks up2date
Summary: adding ethernet aliases results in multiple gateways which breaks up2date
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 84442 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-14 17:16 UTC by Ajay Sharma
Modified: 2014-03-17 02:35 UTC (History)
2 users (show)

Fixed In Version: 7.58-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-07 20:07:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Ajay Sharma 2003-04-14 17:16:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030409
Phoenix/0.5+

Description of problem:
When you add an ethernet alias, using 'redhat-config-network' or by adding a
/etc/sysconfig/network-scripts/ifcfg-eth0:X file manually, then after you
restart the network services the routing table is messed up and has three
default routes instead of just one.

Also, after this happens networking *seems* to be okay except for https urls
don't work anymore.  The only reason I found out about this problem is because
up2date stopped working after I added an alias to one of my servers.

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

How reproducible:
Always

Steps to Reproduce:
1. use 'redhat-config-network' to add an alias to your network card.
2. restart the network services '/etc/rc.d/init.d/network restart'
3. type in 'route -n' and you'll see three default gateway addresses:

Kernel IP routing table
Destination  Gateway      Genmask       Flags Metric Ref    Use Iface
207.138.31.0 0.0.0.0      255.255.255.0 U     0      0        0 eth0
169.254.0.0  0.0.0.0      255.255.0.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      207.138.31.2 0.0.0.0       UG    0      0        0 eth0
0.0.0.0      207.138.31.2 0.0.0.0       UG    0      0        0 eth0
0.0.0.0      207.138.31.2 0.0.0.0       UG    0      0        0 eth0

4. try to run up2date or visit any https url and you won't be able to get out of
the network.

Actual Results:  After the steps above, I got three default gateway's and https
urls don't seem to load.  I have no idea how the two are related but that's how
I was able to detect the problem.  Other networking services work fine (ie,
mail, dns, etc...)

Expected Results:  I expected the ethernet alias to be added with the routing
table to be left alone.  I didn't expect adding an ethernet alias to screw up
up2date's service.

Additional info:

I've tried this on two redhat 9 installations, one was an upgrade and the other
was a clean installation.  

You can workaround the problem to some degree.  Setup the networking with no
aliases and then start it.  Now if you run 'ifconfig', you'll only have eth0 and
lo.  And if you run 'route -n' you'll only have one default gateway.  Using
'redhat-config-network', add an alias for eth0 and instead of restarting the
network services, just do an 'ifup eth0:1" and that will bring up the alias
without messing up the routing table.  That's what I did on one of the
development servers to get it working.  But if the server is rebooted, then
everything will get jacked up again and I'll have to jump through all these
hoops again to set it up properly.  This is a _serious_ show-stopper bug for me.

Comment 1 Bill Nottingham 2003-04-14 19:22:40 UTC
Setting 'NO_ALIASROUTING' in /etc/sysconfig/network or
/etc/sysconfig/networking/devices/ifcfg-<whatever> should work around it for you.

Comment 2 Ajay Sharma 2003-04-14 20:07:32 UTC
Adding "NO_ALIASROUTING=yes" to /etc/sysconfig/network didn't work.  The routing
problem was solved when I added it to /etc/sysconfig/networking/devices/ifcfg-eth0:1

But thanks for the 'better' workaround.

Comment 3 Bill Nottingham 2003-09-04 01:45:47 UTC
*** Bug 84442 has been marked as a duplicate of this bug. ***

Comment 4 Bill Nottingham 2003-09-04 04:05:39 UTC
Did redhat-config-network add GATEWAY= to your alias configurations?

Comment 5 Ajay Sharma 2003-09-04 16:36:02 UTC
I haven't really looked at this since you told me about the
"NO_ALIASROUTING=yes" workaround.  But I fired up redhat-config-network and
added another alias to my workstation and the GATEWAY= line is in

/etc/sysconfig/network-scripts/ifcfg-eth0:2

Here's the output from that file:

---------------------
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
GATEWAY=207.138.31.2
ONBOOT=yes
TYPE=Ethernet
IPADDR=207.138.31.56
DEVICE=eth0:2
HWADDR=00:90:27:72:17:97
BOOTPROTO=none
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
-------------------

I think it should really add the "NO_ALIASROUTING=yes" flag by default.  After I
added the above alias here's what happens when I restart my network:

[root@ajay network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
207.138.31.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.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         207.138.31.2    0.0.0.0         UG    0      0        0 eth0

[root@ajay network-scripts]# /etc/rc.d/init.d/network stop
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]

[root@ajay network-scripts]# /etc/rc.d/init.d/network start
Setting network parameters:                                [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]

[root@ajay network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
207.138.31.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.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         207.138.31.2    0.0.0.0         UG    0      0        0 eth0
0.0.0.0         207.138.31.2    0.0.0.0         UG    1      0        0 eth0

Two default gateway's...  

Comment 6 Bill Nottingham 2003-09-04 16:49:50 UTC
And, if you take the GATEWAY= out, it *doesn't* add a second default gateway, right?

Comment 7 Ajay Sharma 2003-09-04 17:13:29 UTC
no.  I commented out GATEWAY line from the alias config file and it still
created two default gateway's.  

[root@ajay network-scripts]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
207.138.31.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.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         207.138.31.2    0.0.0.0         UG    0      0        0 eth0
0.0.0.0         207.138.31.2    0.0.0.0         UG    1      0        0 eth0

[root@ajay network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:2
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
# GATEWAY=207.138.31.2
ONBOOT=yes
TYPE=Ethernet
IPADDR=207.138.31.56
DEVICE=eth0:2
HWADDR=00:90:27:72:17:97
BOOTPROTO=none
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes

Comment 8 Bill Nottingham 2003-09-04 18:25:25 UTC
Aside from the alias file, is GATEWAY= in ifcfg-eth0, /etc/sysconfig/network, or
both?

Comment 9 Ajay Sharma 2003-09-04 18:34:07 UTC
The GATEWAY line is in ifcfg-eth0.  It is not in /etc/sysconfig/network.

Comment 10 Bill Nottingham 2004-06-07 20:07:06 UTC
This should be fixed in 7.58-1.


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