User Tools

Site Tools


eduardo:linux:routing

Add Static Route

To add a persistent static route in Redhat Enterprise Linux create a file called route-<int>X in the /etc/sysconfig/network-scripts/ directory

where <int> is the interface number and X is the interface number. As you would expect, these are specified in seperate file for each of the available interface.

# cat route-eth2 
101.167.212.0/24 via 10.179.190.1 dev eth2

Restart and show

# service network restart
# route
eduardo/linux/routing.txt · Last modified: 2024/02/23 08:20 by 127.0.0.1