Bug 88826 - adding ethernet aliases results in multiple gateways which breaks up2date
adding ethernet aliases results in multiple gateways which breaks up2date
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
9
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 84442 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-14 13:16 EDT by Ajay Sharma
Modified: 2014-03-16 22:35 EDT (History)
2 users (show)

See Also:
Fixed In Version: 7.58-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-07 16:07:06 EDT
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 Ajay Sharma 2003-04-14 13:16:42 EDT
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 15:22:40 EDT
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 16:07:32 EDT
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-03 21:45:47 EDT
*** Bug 84442 has been marked as a duplicate of this bug. ***
Comment 4 Bill Nottingham 2003-09-04 00:05:39 EDT
Did redhat-config-network add GATEWAY= to your alias configurations?
Comment 5 Ajay Sharma 2003-09-04 12:36:02 EDT
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 12:49:50 EDT
And, if you take the GATEWAY= out, it *doesn't* add a second default gateway, right?
Comment 7 Ajay Sharma 2003-09-04 13:13:29 EDT
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 14:25:25 EDT
Aside from the alias file, is GATEWAY= in ifcfg-eth0, /etc/sysconfig/network, or
both?
Comment 9 Ajay Sharma 2003-09-04 14:34:07 EDT
The GATEWAY line is in ifcfg-eth0.  It is not in /etc/sysconfig/network.
Comment 10 Bill Nottingham 2004-06-07 16:07:06 EDT
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.