The one of the biggest issue that we may encounter on during redistribution is routing loop. If suboptimal routing causes latencies and network inefficiency , routing loops causes the loops until TTL value gets decrease to 0, what influence not only on network efficiency but also causes that some part of the network will be inaccessible at all.
Routing loops occure if the route of the packets after redistributing process is looped. For example statically redistributed network that should be put into routing table unfortunatelly has higher metric (because of slow link) then the same network redistributed back from the different (with lower AD) routing protocol. Of course 2 way (2 points) redistribution has to take place. We can make redistribution between 3 routing domains or between 2 routing domains and inject routes into one of them alike in the case that I am going to present. As you see I put a really slow serial link between R1 and R2, and in this case it will be a reason of a routing loop in EIGRP domain.
Here is the network topology:
1. I created 2 routing domains EIGRP and OSPF
2. Next I redistributed 1.0.0.0/24 network into EIGRP and then I make mutual redistribution between OSPF and EIGRP.
Ok, we have distributed all routes between protocols and connected network into EIGRP as well, so we should easily be able to reach R1 from the farthest router R8. Let’s check it with traceroute command.
Now let’s check how is looking routing table of R3 because as we see this router is the troublemaker.
We just got to know that R3 has choosen R7 with interface 10.0.10.7 as a next hop for network 1.0.0.0/24. Let’ find out why. I am going to use “show ip eigrp 1 topology 1.0.0.0 255.255.255.0“.
We may conclude that R3 router has 2 sources of information about network 1.0.0.0/24 within EIGRP routing protocol. Because the route originate from router R7 (10.0.10.7) has lower metric then from R2 (10.0.40.2) will be choosen despite, the AD is the same, 170 namely (both routes have been injected into EIGRP as external routes).It takes place because the serial link between R1 and R2 (network 1.0.0.0/24) is dramatically slow and the aftermath of that is the higher metric.
So we’ve investigated the reason and effect of the routing loop, now let’s try to do something about that. I would like to show you 4 methods to fight with routing loops.
Decrease the metric of redistributed 1.0.0.0/24 network on R2 (Route Map)
Bear in mind the original metric is realy low because the network is connected via serial link to R2. When we change the metric to the lower value (I made it by setting bandwith to 10000000), then the route originate from R1 will be taking into consideration, not the route redistributed from OSPF
on R2 we configure :
access-list 5 permit 1.0.0.0 0.0.0.255
route tag SET_METRIC permit 10
match ip address 5
set metric 1000000 1 255 1 1500
router eigrp 1
redistribute connected route-map SET_METRIC
Putting ban on repeated redistribution of the network 1.0.0.0/24 from OSPF to EIGRP (Distribute List)
Below configuration just cut out network 1.0.0.0/24 from OSPF to EIGRP redistribution process
on R5 and R7 we configure:
access-list 5 deny 1.0.0.0 0.0.0.255
access-list 5 permit any
router eigrp 1
distribute-list 5 out
redistribute ospf 1 metric 100000 1 255 1 1500
router ospf 1
redistribute eigrp 1 subnets
Increase the metric of redistributed network 1.0.0.0/24 from OSPF to EIGRP (Offset-List)
We may also increase the metric of 1.0.0.0/24 that is being redistributed from OSPF to EIGRP to something really high, to beat the low metric originate from R1 to R2.
Firstly, let’s check what routes regarding 1.0.0.0/24 are placed in EIGRP topology table of R3:
We see, there are 2 routes but the successor is the route that has been redistributed from OSPF, if we compare feasible distances of both of them we notice that route redistributed as connected has got much higher FD than from OSPF 2172416 to 28416.
Now, we use offset-list the command that is being used to manipulate the metric and we increase the metric from OSPF:
on R5 and R7 we configure:
router ospf 1
redistribute eigrp 1 subnets
router eigrp 1
redistribute ospf 1 metric 100000 1 255 1 1500
access-list 5 permit 1.0.0.0 0.0.0.255
router eigrp 1
offset-list 5 out 10000000 fa0/0
Let’s check now the metrics of these both routes:
Route Tagging
Thanks to route tagging we are able to mark appropriate networks to prevent them for further redistributing on different point of redistributions. The mechanism is simple, on the one router we tag a network on the second router we reject this network from redistribution process. The Route Tagging is the most elegant and desirable way of preventing given routes from redistribution process.
R7 configuration:
route-map SET_TAG permit 10
set tag 1001
router ospf 1
redistribute eigrp 1 subnets route-map SET_TAG
route-map MATCH_TAG deny 10
match tag 1002
route-map MATCH_TAG permit 20
router eigrp 1
redistribute ospf 1 metric 100000 1 255 1 1500 route-map MATCH_TAG
R5 configuration:
route-map MATCH_TAG deny 10
match tag 1001
route-map MATCH_TAG permit 20
router eigrp 1
redistribute ospf 1 metric 100000 1 255 1 1500 route-map MATCH_TAG
route-map SET_TAG permit 10
set tag 1002
router ospf 1
redistribute eigrp 1 subnets route-map SET_TAG
The picture will be helpfull to see how it works
Now if we check accessible routes to network 1.0.0.0/24 we notice that there is only one route originates from 10.0.40.2, exactly as we expected!