May 312013
 

R4 redistributes loopback 0 in EIGRP, which is further redistributed by R2 into OSPF. R3 then redistributes OSPF back to EIGRP. This causes R2 to have 2 paths to reach the loopback of R4 and this may cause routing loops

When there are multiple points of redistribution, and the network which is being redistributed could only be reached via one path, then the initial router which is redistributing must not choose any other path other than the one from which it initially learned.

topology

R4#sh run | sec router eigrp
router eigrp 234
 redistribute connected metric 1 1 1 1 1 route-map CONNECTED
 network 10.0.24.4 0.0.0.0
 no auto-summary
 eigrp router-id 4.4.4.4
 
R4#sh run | sec route-map  
route-map CONNECTED permit 10
 match interface Loopback0
 
R2#sh run | sec router
router eigrp 234
 network 10.0.23.2 0.0.0.0
 network 10.0.24.2 0.0.0.0
 no auto-summary
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 redistribute eigrp 234 subnets
 network 10.0.12.2 0.0.0.0 area 0
 
R3#sh run | sec router
router eigrp 234
 redistribute ospf 1 metric 1 1 1 1 1
 network 10.0.23.3 0.0.0.0
 no auto-summary
 eigrp router-id 3.3.3.3
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 10.0.13.3 0.0.0.0 area 0

R2 receives the route to loopback 0 of R4 as an EIGRP external route. When it redistributes this into OSPF, R3 will prefer the OSPF path because of the better AD. R3 then again redistributes the 4.4.4/24 network into EIGRP from OSPF. In this case R2 will have 2 paths to reach the loopback of R4 because the metric values are the same.

R2#sh ip route 4.4.4.0
Routing entry for 4.4.4.0/24
  Known via "eigrp 234", distance 170, metric 2560025856, type external
  Redistributing via ospf 1, eigrp 234
  Advertised by ospf 1 subnets
  Last update from 10.0.23.3 on Ethernet0/1, 04:08:25 ago
  Routing Descriptor Blocks:
  * 10.0.24.4, from 10.0.24.4, 04:08:25 ago, via Ethernet0/2
      Route metric is 2560025856, traffic share count is 1
      Total delay is 1010 microseconds, minimum bandwidth is 1 Kbit
      Reliability 1/255, minimum MTU 1 bytes
      Loading 1/255, Hops 1
    10.0.23.3, from 10.0.23.3, 04:08:25 ago, via Ethernet0/1
      Route metric is 2560025856, traffic share count is 1
      Total delay is 1010 microseconds, minimum bandwidth is 1 Kbit
      Reliability 1/255, minimum MTU 1 bytes
      Loading 1/255, Hops 1
 
R2#sh ip eigrp topology 4.4.4.0 255.255.255.0 | in Originating|External      
      Composite metric is (2560025856/2560000256), Route is External
      External data:
        Originating router is 3.3.3.3 
        External protocol is OSPF, external metric is 20
      Composite metric is (2560025856/2560000256), Route is External
      External data:
        Originating router is 4.4.4.4 
        External protocol is Connected, external metric is 0

To resolve this issue R2 must not accept the route to loopback of R4 from any other sources. This could be done at R2 with the following methods:

Method 1. Increasing the metric of the interface connecting to R3

R2(config-router)#int e0/1
R2(config-if)#delay 10000
RT: delete route to 4.4.4.0 via 10.0.23.3, eigrp metric [170/2560025856]

The problem with this method is, even when R4 withdraws the route, R2 will install the path via R3. This could be simulated by shutting down the loopback at R4. The debug ip routing output below shows that the path via R3 is the entered to RIB

RT: delete route to 4.4.4.0 via 10.0.24.4, eigrp metric [170/2560025856]
 
RT: add 4.4.4.0/24 via 10.0.23.3, eigrp metric [170/2562560256]
R2#sh ip route 4.4.4.0
Routing entry for 4.4.4.0/24
  Known via "eigrp 234", distance 170, metric 2562560256, type external
  Redistributing via ospf 1, eigrp 234
  Advertised by ospf 1 subnets
  Last update from 10.0.23.3 on Ethernet0/1, 00:06:55 ago
  Routing Descriptor Blocks:
  * 10.0.23.3, from 10.0.23.3, 00:06:55 ago, via Ethernet0/1
      Route metric is 2562560256, traffic share count is 1
      Total delay is 100010 microseconds, minimum bandwidth is 1 Kbit
      Reliability 1/255, minimum MTU 1 bytes
      Loading 1/255, Hops 1

Method 2. Filtering the route inbound, by changing AD to 255

Method 3. Filtering the route by using a distribute list

Method 4. Filtering the route by using an offset list

Method 2 to 4 is effective because it denies the path via R3. The filtering method using distribute list , altering distance does not seem to work for external routes.

R2(config-router)#offset-list R4_LOOP_STA in 2147483647 e0/1
ip access-list standard R4_LOOP_STA
 permit 4.4.4.0

 
RT: delete route to 4.4.4.0 via 10.0.23.3, eigrp metric [170/2560025856]

 

To conclude, if a route 'X' could only be originally learned from one particular source, the same route 'X' must not be relearned from any other source.