Bug 110205 - ifup-routes doesn't set routes properly
ifup-routes doesn't set routes properly
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2003-11-16 20:26 EST by Brett Johnson
Modified: 2014-03-16 22:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-16 21:52:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brett Johnson 2003-11-16 20:26:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.1.4322)

Description of problem:
The ifup-routes script isn't accessing the correct location for route 
info.  I believe it should be looking for interface specific routing 
settings in /etc/sysconfig/networking/devices/ but instead the script 
looks in /etc/sysconfig/network-scripts/

The offending line is:


I think it should be:


This may not be the only problem as the Redhat network config tool 
saves the routes in the old format of route-eth0.  Also, the network 
config tool won't delete a route properly.  I'll report that 
somewhere under the correct heading.

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

How reproducible:

Steps to Reproduce:
1.Add a static route in webmin for eth0
2.Do service network restart
3.Do route and see that no static route has been added

Additional info:
Comment 1 Bill Nottingham 2003-11-17 15:23:12 EST
AFAIK, the network config tool is supposed to be putting $NICK.route
directly into /etc/sysconfig/network-scripts.
Comment 2 Brett Johnson 2003-11-17 22:55:51 EST
I thought that might be a possibility, but, I checke Redhat 8 and 9 
and both ifup-routes scripts expect to find eth0.route 
in /etc/sysconfig/networking/devices.
I noticed that the scripts have an older format and the new Redhat 
format that it can use.

Older format uses /etc/sysconfig/network-scripts/route-eth0
New format uses /etc/sysconfig/networking/devices/eth0.route

I believe the new format is used in order to support multiple network 
profiles in the network configuration utility.

Comment 3 James Fairbairn 2003-12-18 04:30:10 EST
The problem in the ifup-routes script in FC1 is not that it's 
looking in the wrong directory; .../network-scripts is where the 
system puts the config files for the currently-active network 
profile, so this is correct. 
The problem appears to be to do with the new format of 
route-<interface> file, which expects the following sytax: 
The ip route add command expects syntax like this: 
ip route add via dev <interface> 
The ifup-routes script has to convert the $NETMASK0 variable (here, to the short form of the bitmask (here, 24). It even 
goes as far as running ipcalc -p to get this information (line 13), 
and using a variable called $PREFIX (line 14). 
Unfortunately the $PREFIX variable is never actually set, so the ip 
route command runs as follows: 
ip route add via 
So the ifup-routes script needs to be fixed so that it properly 
assigns the $PREFIX variable. 
Note that there is currently a workaround. The ifup-routes script 
supports a different (older) format of the route-<interface> file. 
Just put your routes into the route-<interface> file in the format 
expected by the ip route add command, i.e. via 
Not sure whether this will be blown away the next time you run neat 
or webmin, though. 
Comment 4 James Fairbairn 2003-12-18 04:39:39 EST
Oops, scratch that last comment completely! ifup-routes appears to 
work correctly in my installation. How embarrassing.... :) 
Comment 5 Bill Nottingham 2004-03-16 21:52:56 EST
If webmin is writing into networking/devices, that's a webmin bug.

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