Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 132252 - Request for addition of routing rule config file
Summary: Request for addition of routing rule config file
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
Reported: 2004-09-10 10:28 UTC by Steven Whitehouse
Modified: 2014-03-17 02:48 UTC (History)
5 users (show)

Fixed In Version: 8.36-1
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2006-07-21 18:25:08 UTC

Attachments (Terms of Use)
Example ifup-rules file (deleted)
2005-02-02 10:04 UTC, Steven Whitehouse
no flags Details

Description Steven Whitehouse 2004-09-10 10:28:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

Description of problem:
There is apparently no way to configure routing rules without
modifying the actual initscripts themselves. It would be useful if
there was
a per-interface set of rules (like the route-nnn files) but for
routing rules.

I suppose that there is some argument that it might be simpler/better
to just have a single global file for the rules and save/restore it
similarly to iptables rules as an alternative.

I can live with either solution, but I suggest the first one purely on
the selfish grounds that it happens to suit my needs better at this
particular moment in time :-)

The reason for the request is to make network configuration for
multiple providers easier, but I'm sure that other users of advanced
will find it useful too.

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

How reproducible:

Steps to Reproduce:
N/A Enhancement request    

Additional info:

Comment 1 Bill Nottingham 2004-09-10 16:34:16 UTC
Got an example?

Comment 2 Steven Whitehouse 2004-09-10 17:05:35 UTC
My example looks like this:

[root@chywoon network-scripts]# /sbin/ip rule
0:      from all lookup local
32765:  from lookup bogons
32766:  from all lookup main
32767:  from all lookup default

[root@chywoon network-scripts]# /sbin/ip route show table main dev eth0  proto kernel  scope link  src dev eth0  scope link
default  proto kernel
        nexthop via  dev eth0 weight 1
        nexthop via  dev eth0 weight 1
        nexthop via  dev eth0 weight 1

[root@chywoon network-scripts]# /sbin/ip route show table bogons dev eth0  scope link dev eth0  scope link dev lo  scope link
default via dev eth0

[root@chywoon network-scripts]# /sbin/ip route show table diogel dev eth0  scope link dev lo  scope link
default via dev eth0

its incomplete... when I get my IP allocation from diogel, it
will have an extra rule, plus an extra route in the diogel
table to match whats already there for bogons.

The situation is a web server with several virtual hosts some of
which are accessible through one gateway to a certain provider
and some of which are accessible through a different gateway to
a different provider. In each case the IPs depend upon the providers
and I plan to pair them off such that there will be one IP per
provider for each virtual host and use DNS load balancing
between them.

I also expect to be expanding this system in the future to have
further providers attached to it, hence more rules. I may also
want to use separate physical interfaces for them as well at
some stage. Currently each provider connects through a separate
gateway box onto a local lan to which the web server is attached.
There is a further example in the Linux Advanced Routing HOWTO
where the providers are on different interfaces (see the url:

I can currently do everything with the standard config files except
the adding of the rules.

Comment 3 Steven Whitehouse 2005-02-02 10:03:32 UTC
Updating this to FC3 since its still outstanding, also attaching an
example of what the proposed ifup-rules script could look like. The
ifdown-rules script would be identical aside from swapping the add to
del in the ip rule command line. The scripts could be hooked into
ifup-post and ifdown-post at a suitable point (which is what I've done
on my system).

Comment 4 Steven Whitehouse 2005-02-02 10:04:50 UTC
Created attachment 110546 [details]
Example ifup-rules file

Comment 5 Miloslav Trmač 2006-07-10 22:11:18 UTC
Support for rule-$device added in CVS.

Comment 6 Bill Nottingham 2006-07-21 18:25:08 UTC
Built as 8.36-1.

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