Reasons for nested tunneling in a GRE tunnel

Last Updated : Nov 06, 2012 |
  • A static route exists on the source tunnel endpoint that tells the tunnel to route packets addressed to the receiving tunnel endpoint via the tunnel itself

  • The local endpoint of the tunnel learns the tunnel as a route to the tunnel’s remote endpoint via OSPF or RIP

  • A combination of static routes via parallel tunnels lead to a situation in which each tunnel is routing packets via another tunnel. For example:

    Gxxx-001(super)# interface tunnel 1
    Gxxx-001(super-if:Tunnel 1)# tunnel source x.x.x.x
    Gxxx-001(super-if:Tunnel 1)# tunnel destination 1.0.0.1
    Done!
    Gxxx-001(super-if:Tunnel 1)# exit
    Gxxx-001(super)# interface tunnel 2
    Gxxx-001(super-if:Tunnel 2)# tunnel source x.x.x.x
    Gxxx-001(super-if:Tunnel 2)# tunnel destination 2.0.0.1
    Done!
    Gxxx-001(super-if:Tunnel 2)# exit
    Gxxx-001(super)# interface tunnel 3
    Gxxx-001(super-if:Tunnel 3)# tunnel source x.x.x.x
    Gxxx-001(super-if:Tunnel 3)# tunnel destination 3.0.0.1
    Done!
    Gxxx-001(super-if:Tunnel 3)# exit
    Gxxx-001(super)# ip route 1.0.0.1 tunnel 2
    Done!
    Gxxx-001(super)# ip route 2.0.0.1 tunnel 3
    Done!
    Gxxx-001(super)# ip route 3.0.0.1 tunnel 1
    Done!

Using the network shown in Nested tunneling example as an illustration, if Router 1 has an entry in its routing table regarding the tunnel’s receiving endpoint, this will cause an internal route in which all packets exiting the tunnel will be redirected back into the tunnel itself.