how to set up static routes in RHEL4

Ed Wilts ewilts at ewilts.org
Fri May 19 11:39:23 UTC 2006


On Fri, May 19, 2006 at 11:21:01AM +0200, Fabien Germain wrote:
> On 5/19/06, Götz Reinicke <goetz.reinicke at filmakademie.de> wrote:
> >where and how do I set up static routes in RHEL4? Is it the same as for
> >RHEL3 as shown here:
> >
> >http://kbase.redhat.com/faq/FAQ_79_2561.shtm
> >
> >using the a file /etc/sysconfig/network-scripts/route-eth(N)
> 
> No, it's now in /etc/sysconfig/static-routes, and looks like that :

It's been this way since back in RHL 5.x or 6.x.

> any net 192.168.34.0 netmask 255.255.255.0 gw 192.168.1.3
> any net 192.168.96.0 netmask 255.255.255.0 gw 192.168.1.3
> any net 192.168.97.0 netmask 255.255.255.0 gw 192.168.1.3

There are actually several supported ways to have static routes defined.
This one has been around a long time (although the syntax changed
slightly) and still works.  Note that the Knowledge Base article says
that the route-ethX method is the *new* way.  By the looks of the
ifup-routes script, this should work in RHEL 4 too.

-- 
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program




More information about the redhat-list mailing list