cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1258
Views
0
Helpful
2
Replies

ip route command in GRE tunnel

mahesh18
Level 6
Level 6

                   Hi Everyone,

I have setup GRE Lab between Routers R1 and R3.

R1 is connected to R2 using OSPF  and R2  is connected to R3 using OSPF.

I config GRE tunnel interface on R1 and R3.

R1 has internal subnet say 100.x.x.x.x to share with R3.

R3 has internal Lan subnet  say 101.x.x.x.x  to share with R1.

Interesting traffic to pass through GRE tunnel is subnets 100.x.x.x.  and 101.x.x.x.x.

R1 tunnel config

R1#            sh run int tunnel 0
Building configuration...

Current configuration : 168 bytes
!
interface Tunnel0
ip address 13.13.13.1 255.255.255.0
keepalive 3
cdp enable
tunnel source Loopback0
tunnel destination 20.0.0.1
tunnel path-mtu-discovery

R3 Tunnel config

R3#sh run int tunnel 0
Building configuration...

Current configuration : 158 bytes
!
interface Tunnel0
ip address 13.13.13.3 255.255.255.0
keepalive 3 1
tunnel source Loopback0
tunnel destination 10.0.0.1
tunnel path-mtu-discovery

So my question is instead of using Routing protocols to advertise the Lan subnets from R1 and R3  can i use static routes?

for example

If i can use static routes say on R1

ip route 101.101.101.101 255.255.255 ?

what should be next hop IP here ?

tunnel interface of R3 Router  or physical interface of R3 that connects to R2?

Then same way i can use static routes on R3 right ?

Thanks

Mahesh

1 Accepted Solution

Accepted Solutions

shamax_1983
Level 3
Level 3

Hello Mahesh,

You can use IP address as long as Tunnel IP addresses on both sides are in the same subnet. So in your case you can use

!

ip route 101.101.101.101 255.255.255 13.13.13.3

!

Or you can use the tunnel interface

!

ip route 101.101.101.101 255.255.255 Tunnel0

!

Although I have seen issues in some cases when the interface name is used instead of tunnel IP.

Please rate this post if helpful.

THanks

Shaml

View solution in original post

2 Replies 2

shamax_1983
Level 3
Level 3

Hello Mahesh,

You can use IP address as long as Tunnel IP addresses on both sides are in the same subnet. So in your case you can use

!

ip route 101.101.101.101 255.255.255 13.13.13.3

!

Or you can use the tunnel interface

!

ip route 101.101.101.101 255.255.255 Tunnel0

!

Although I have seen issues in some cases when the interface name is used instead of tunnel IP.

Please rate this post if helpful.

THanks

Shaml

Hi Shaml,

Many thanks for answering my question and clearing  by doubts.

Regards

Mahesh