[WBEL-users] 2 addresses on a NIC and default route problem

Kirby C. Bohling kbohling at birddog.com
Thu Feb 3 13:48:55 CST 2005


On Thu, Feb 03, 2005 at 01:30:59PM -0600, John Morris wrote:
> On Wed, 2005-02-02 at 10:27, Craig White wrote:
> > #cat /etc/sysconfig/static-routes
> > 
> > #locate ifcfg-eth
> > /etc/sysconfig/network-scripts/ifcfg-eth0
> > /etc/sysconfig/networking/devices/ifcfg-eth0
> > /etc/sysconfig/networking/profiles/default/ifcfg-eth0
> > 
> > # grep GATEWAY /etc/sysconfig/network-scripts/ifcfg*
> > 
> > # grep GATEWAY /etc/sysconfig/networking/devices/ifcfg*
> > 
> > # grep GATEWAY /etc/sysconfig/networking/profiles/default/ifcfg*
> 
> And just for fun be sure to look in
> /etc/sysconfig/network-scripts/route-* because any route setup with the
> latest incarnation of the RH graphical tools seems to get put there in a
> format much harder to cope with than the old
> /etc/sysconfig/static-routes file.  Sometimes I think they move this
> stuff just to make us confused.

If I recall correctly, the change you are talking about was so that
routes could be added via "ip", instead of "route".

Looking at here /usr/share/doc/initscripts-7.31.16.EL/sysconfig.txt:

-- Cut Start --
/etc/sysconfig/network-scripts/route-<interface-name>

  Contains lines that are arguments to "/sbin/ip route add"
  For example:

  192.168.2.0/24 dev ppp0

  adds a network route to the 192.168.2.0 network through ppp0.
-- Cut Stop --

Where if you look in /etc/init.d/network, you'll find this snippit:

-- Start Here --
    # Add non interface-specific static-routes.
    if [ -f /etc/sysconfig/static-routes ]; then
       grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
              /sbin/route add -$args
       done
    fi
-- Stop Here --

The other nice thing about the change, besides allowing you to use
all the features of the new tool, it also allows for routes to be
brought up because the interface is up, without having to bounce the
entire network.

Using /etc/sysconfig/static-routes, if you down an interface I
believe you'll lose all the routes added via static-routes.  When
you bring the interface back up, you'll have to remember to re-add
the routes.  Not so with the new system.

It's a small thing, that probably only affects a handful of people,
but it's why people pay for the Enterprise solutions.  They just
work better and easier.  Yep, it's a problem for the poor schleps
like you and me that know the old-school way of configuring RedHat,
but it sure is handy if you run a really complex network
configuration.  No if only I could get them to add rules for policy
routing that get added and removed when an interface goes up or
down.  Then I wouldn't have to maintain my old scripts for turning
the various internet connections on and off.  (I haven't hunted that
hard, for all I know it's already there).

	Kirby





More information about the Whitebox-users mailing list