LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2011, 10:30 AM   #1
efmiglioranza
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Question Routing subnet over GRE tunnel


Hi,

Im trying to configure a GRE over IPSec connection between two subnets. The IPSec tunnel is opened and now I want to add a GRE tunnel over it:

Code:
ip tunnel add GRE01 mode gre remote 10.244.0.1 local 10.244.245.32 ttl 255
ip link set GRE01 up
ip addr add 10.244.248.126 dev GRE01
ip route add 10.244.248.125 dev GRE01
Now I have an interface GRE01 (ifconfig):

Code:
GRE10     Link encap:UNSPEC  HWaddr <h_addr>
inet addr:10.244.248.126  P-t-P:10.244.248.126  Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP  MTU:1476  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
And the following routes (ip route list):

Code:
10.244.248.125 dev GRE10  scope link 
<pub_subnet> dev eth0  proto kernel  scope link  src <pub_ip> 
default via <pub_gw> dev eth0  metric 100
As a last step, I need now to route my subnet over the tunnel:

Code:
ip route add 10.245.1.224/28 10.244.248.125
However, I am getting the error

Code:
Error: either "to" is duplicate, or "10.244.248.125" is a garbage.
So, what I didn't understand is why I can't route my subnet over the tunnel, once the only route I have there says that it should route the tunnel IP over the GRE01 interface. Any hint? Thanks.
 
Old 03-01-2011, 11:01 AM   #2
efmiglioranza
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Nevermind, I was missing the word via in my route command:

ip route add 10.245.1.224/28 via 10.244.248.125

Seems like a typo in my reference book.
 
  


Reply


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
Keep Alive GRE Tunnel gmarzilli Linux - Networking 0 01-19-2010 07:47 AM
GRE tunnel nima0102 Linux - Networking 1 07-28-2009 01:12 PM
Gre Tunnel Questions mhunter Linux - Networking 2 07-18-2007 12:17 PM
dhcp over GRE tunnel fadey Linux - Networking 0 04-29-2007 08:12 AM
routing pptp tunnel subnet to local lan 0xception Linux - Networking 1 07-11-2006 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:44 PM.

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