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.
Setting 'NO_ALIASROUTING' in /etc/sysconfig/network or /etc/sysconfig/networking/devices/ifcfg-<whatever> should work around it for you.
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.
*** Bug 84442 has been marked as a duplicate of this bug. ***
Did redhat-config-network add GATEWAY= to your alias configurations?
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...
And, if you take the GATEWAY= out, it *doesn't* add a second default gateway, right?
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
Aside from the alias file, is GATEWAY= in ifcfg-eth0, /etc/sysconfig/network, or both?
The GATEWAY line is in ifcfg-eth0. It is not in /etc/sysconfig/network.
This should be fixed in 7.58-1.