GRE - Recursive loops

Document

Wed, 07/03/2013 - 03:27
Apr 1st, 2012

Introduction

This document provides you an example configuration on how to overcome recursive routing issue while using GRE tunnels.

Prerequisites

It is assumed that reader already has knowledge of routing protocols and is aware of GRE configuration.

Components used

Cisco 3700 series Router loaded with IOS 12.4(2)T has been used for this document.

Configuration

For Initial configuration, these routers are learning all the routes using RIP protocol. If you are interested in seeing initial configuration, please have a look at the files attached.

Now let’s suppose R1 and R3 have networks connected behind them and both router R1 and R3 need to know about all those networks and because of scalability issues that we have with RIP protocol, we need to run some other protocol. Let that protocol be EIGRP. Also, let’s suppose that because of resources limitation we can’t run EIGRP on R2. So you decide to use GRE tunnel between routers R1 and R3.

Here is the configuration for the same:

R1R3

interface Tunnel13

ip address 100.1.13.1 255.255.255.0

tunnel source Loopback0

tunnel destination 3.3.3.3

end

interface Tunnel31

ip address 100.1.13.3 255.255.255.0

tunnel source Loopback0

tunnel destination 1.1.1.1

end

Now as soon as we enable EIGRP and run it on tunnel interface and the loo 0 interface, we get following error:

Error - GRE.png

This happens because the tunnel interface status depends on the reachability to tunnel destination. In our case R1 and R3 find reachability to tunnel destination using RIP. As soon as we enable EIGRP on loo 0 interfaces, the routers find reachability to tunnel destination through tunnel and that’s what causes the recursive loop.

To overcome this situation, an access-list in configured which identifies the IP add of tunnel destination. Then, AD of this route is configured lower than EIGRP. Once this is done router find better path to tunnel destination throught RIP and tunnel comes up (you may have to clear routing table at this point).

R1R3

R1#show access-lists

Standard IP access list 1

10 permit 3.0.0.0 (100 matches)

R1#show run | sec rip

router rip

version 2

network 1.0.0.0

network 10.0.0.0

distance 89 0.0.0.0 255.255.255.255 1

no auto-summary

R3#show access-list

Standard IP access list 1

10 permit 1.0.0.0 (98 matches)

R3#sho run | sec rip

router rip

version 2

network 3.0.0.0

network 10.0.0.0

distance 89 0.0.0.0 255.255.255.255 1

no auto-summary

Network Diagram

GRE rec.jpg

Verify

Here, you can see the routing table of R1 and R3

R1 .jpg

R3.jpg

I hope you found this worth your time, thank you!

        How to configure a GRE tunnel

jonrojas Wed, 06/12/2013 - 10:27

On some devices you won't see the recursive routing log, instead will only see this one:

 ADJ-5-PARENT  Midchain parent maintenance for IP
midchain out of TunnelXXX - looped chain attempting to stack

Just wanted to add it here in case someone is googling for the above message

Actions

This Document

Related Content