Add static route for Tunneled range?
I need to add a static route to survive restarts for a range that is connected via GRE tunnel.
All the examples I've found are not clear on if I need to create a route config in network scripts for the tunnel device or if it just entered on the eth device. (Centos 6),
range is 192.168.1.0/24
tunnel gateway is 10.0.0.1
tunnel device is "tun0"
active NIC is "eth0"
Command example given:
echo “192.168.1.0/24 via 10.0.0.1″ >> /etc/sysconfig/network-scripts/route-eth0
Is this correct or should it actually be:
echo “192.168.1.0/24 via 10.0.0.1″ >> /etc/sysconfig/network-scripts/route-tun0
(Even the examples here on LQO only show actual NICs, none show tunnel specific setting)
I'll answer my own question since I figured it out.
The correct file would be for that actual device so in this example it should be:
The correct syntax for the entry in the file is not exactly what the echo command I found lists, it should be like this:
192.168.1.0/24 via 10.0.0.1 dev tun0
or, from the cli:
echo 192.168.1.0/24 via 10.0.0.1 >> /etc/sysconfig/network-scripts/route-tun0
|All times are GMT -5. The time now is 10:50 PM.|