Bug in initscripts? Problem with ifup-routes and alias device

Issues related to configuring your network
Post Reply
MrDigi
Posts: 3
Joined: 2007/06/22 15:31:34

Bug in initscripts? Problem with ifup-routes and alias devic

Post by MrDigi » 2007/06/22 15:44:02

Hello,

I have one network card and added two IP-Adresses to it:

eth1 192.168.1.1/24
eth1:1 10.1.2.3/24

a want to use static routes on device eth1:1 and added in /etc/sysconfig/network-scripts/route-eth1:1:

GATEWAY0=10.1.2.4
ADDRESS0=10.2.2.0
NETMASK0=255.255.255.0

What the network-scripts should execute in background is:
ip route add 10.2.2.0/24 via 10.1.2.4 dev eth1

but they execute
ip route add 10.2.2.0/24 via 10.1.2.4 dev eth1:1

BUT: "eth1:1" is in the "ip" command not working, "ip" throws an error ("device eth1:1 not present") and doesn't add the route.

Did i missed something or is it a bug in the ifup-routes script ?

Best regards
MrDigi

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Bug in initscripts? Problem with ifup-routes and alias device

Post by gerald_clark » 2007/06/22 16:28:41

Have you added /etc/sysconfig/network-scripts/ifcfg-eth1:1 ?

MrDigi
Posts: 3
Joined: 2007/06/22 15:31:34

Re: Bug in initscripts? Problem with ifup-routes and alias device

Post by MrDigi » 2007/06/22 17:21:35

Sure,

when I enter "ifup eth1:1" the interface is coming up without problems:

eth1:1 Link encap:Ethernet HWaddr 00:0E:0E:0E:68:8B
inet addr:10.1.2.3 Bcast:10.1.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xec00 Memory:dffe0000-e0000000

but the static routes are missing and "ip" is reporting "Cannot find device eth1:1".

As I've reported, unlike "route", the "ip" command can't process alias interfaces like ethX:Y, only real interfaces.
But the initscript ifup-route is trying to pass that virtual interface to the "ip" command.

Best regards
MrDigi

texasnomad
Posts: 1
Joined: 2007/07/14 23:08:33
Contact:

Re: Bug in initscripts? Problem with ifup-routes and alias device

Post by texasnomad » 2007/07/15 06:11:25

I just had a terrible day with my server running x86_64 Centos 4.5 and the problem appears to be related to this forum thread. Here is what happened:

So I drove an hour to the colo facility and I started by replacing the AMD64 3000 PROC with a Lan Party MB. I replaced it with a AMD 5000 (Dual Core) and a Gigabyte MB. Brought it up and reconfigured the ifcfg-eth0 files ( I have 6 of them) to work with the new onboard nic. Rebooted. Tested SSH and apache via lynx and all was well.

So on the way home I called my friend and he couldn't access the web sites. I got home and when I started digging, I found that NOTHING that was using any of my aliases worked, except the highest numbered alias!!! So I drove back and replaced the nic with a $20 netgear that I know works and NO CHANGE. Needless to say, my web server used the 1st alias and it WOULDN'T WORK!!!! SSH uses the base IP, not an alias, so that it explains why it worked for me.

Now I have been running with this config since Centos 3.x without issue but I suspected that my alias config was the cause. Here is why: I have my ifcfg-eth0 files set up like this:

ifcfg-eth0
ifcfg-eth0:227
ifcfg-eth0:228
ifcfg-eth0:229
ifcfg-eth0:230
ifcfg-eth0:231

The interface designator helped me to keep track of which IP went with which file.I renamed them all to the standard like this:

ifcfg-eth0
ifcfg-eth0:0
ifcfg-eth0:1
ifcfg-eth0:2
ifcfg-eth0:3
ifcfg-eth0:4

After doing this,
everything worked except the LAST IP!!!!

This appears to be similar to what you are talking about.

Post Reply

Return to “CentOS 4 - Networking Support”