/etc/sysconfig/network-scripts/route-ethN Question

Richardson, Joshua A. Joshua.Richardson at gd-ais.com
Tue Jun 7 17:17:46 UTC 2011


You can simply create the file in the /etc/sysconfig/network-scripts folder.  Here's an example of one I use:

[root at AMDRFileServer1 ~]# cat /etc/sysconfig/network-scripts/route-eth0
# /etc/sysconfig/network-scripts/route-eth0
#
0.0.0.0/0 via 10.10.207.1 dev eth0  # Default gateway route
192.168.4.3 via 10.10.207.88 dev eth0 # Host route
192.168.0.0/16 dev eth0 # Subnet route


Josh Richardson
General Dynamics AIS
Office: 703-272-1761
Cell: 540-383-9093

-----Original Message-----
From: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com] On Behalf Of Matty Sarro
Sent: Tuesday, June 07, 2011 9:02 AM
To: General Red Hat Linux discussion list
Subject: /etc/sysconfig/network-scripts/route-ethN Question

Hey everyone,
I am trying to find out more about setting up per-device routing using
the /etc/sysconfig/network-scripts/route-ethN file. Basically I'm not
about to find any real details about how the file is supposed to be
created. Is it just a shell script with ip route commands? I have
three network interfaces, and each needs to be connected to its own
discrete network with its own gateway. Right now I have all of the
rules set up in /etc/rc.local, which seems to work fine for the first
two interfaces, but not the third.

Due to the circumstances, normal static routing won't work - I need to
use iproute2.

Since the /etc/sysconfig/network-script/route-ethN file gets run when
the interface comes up, I am assuming this may help. Any advice is
appreciated.

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list