-   Linux - Software (
-   -   Add static route for Tunneled range? (

ne0shell 04-25-2013 09:15 AM

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
tunnel gateway is
tunnel device is "tun0"
active NIC is "eth0"

Command example given:
echo via″ >> /etc/sysconfig/network-scripts/route-eth0

Is this correct or should it actually be:

echo via″ >> /etc/sysconfig/network-scripts/route-tun0


(Even the examples here on LQO only show actual NICs, none show tunnel specific setting)

ne0shell 04-26-2013 12:06 AM

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: via dev tun0

or, from the cli:

echo via >> /etc/sysconfig/network-scripts/route-tun0

All times are GMT -5. The time now is 04:56 PM.