About routing

John Wang jwang at dataseekonline.com
Thu Jan 15 23:45:06 UTC 2009


Hello

It's customary to simply put the line:

   GATEWAY=10.10.10.254

Into the /etc/sysconfig/network file.   You'll see that the scripts in
/etc/sysconfig/network-scripts would source the /etc/sysconfig/network file
and then perform the appropriate actions based on the variable GATEWAY.
You'll also notice that the scripts have references to a variable GATEWAYDEV
which indicates you could just specify which network interface to use to get
out instead of the default router specifically.

You'll also notice that twi if the scripts there reference the file
/etc/sysconfig/static-routes if it exists so you can place static routes in
such a file in the following format:

   any net 10.10.11.0/24 gw 10.10.10.254

There's nothing fancy to any of this, it's just script work.

Regards,
John


On 1/15/09 2:44 AM, "a bv" <vbavbalist at gmail.com> wrote:

> thanks for answer but first i would like to try on a vmware. And what
> about the default gw? At the examples i cant see any default gw entry
> on the route-eth0 etc sample texts.
> 
> Regards
> 
> 2009/1/9 Joshua Daniel Franklin <jdf.lists at gmail.com>:
>> On Fri, Jan 9, 2009 at 4:54 AM, a bv  wrote:
>>> -add a route on the fly using route add bla bla (and will this records
>>> will be deleted when rebooted the system?)
>> 
>> Yes. You need to add it at reboot in a generic way (such as /etc/rc.local )
>> or the "Red Hat way" with
>> /etc/sysconfig/network-scripts/route-interface
>> 
>> http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Dep
>> loyment_Guide/s1-networkscripts-static-routes.html
>> 
>> By the way, if you like to know the "Red Hat way" for things here is a
>> handy way of searching:
>> 
>> http://google.com/search?q="static route"
>> inurl:enterprise/RHEL-5-manual/ filetype:html
>> 
>> --
>> redhat-sysadmin-list mailing list
>> redhat-sysadmin-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>> 
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list




More information about the redhat-sysadmin-list mailing list