Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-25-2013, 09:15 AM   #1
LQ Newbie
Registered: May 2010
Posts: 22

Rep: Reputation: 0
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)
Old 04-26-2013, 12:06 AM   #2
LQ Newbie
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
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

Last edited by ne0shell; 04-26-2013 at 12:08 AM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
permanently add static route glock19 Linux - Networking 27 07-27-2015 04:59 PM
add static route with ip command mattholm Linux - Newbie 2 01-24-2013 05:11 PM
How to add a multicast static route in centOS4.4 dozer Linux - Networking 2 08-05-2011 03:09 PM
how to add static route for loopback interface. UltraSoul Linux - Software 4 04-12-2009 01:02 AM
Route add to ban IP range? astroboy5714 Linux - General 0 06-01-2004 03:07 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration