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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[root@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@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] 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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

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


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux