10/15/2014

Redistribute EIGRP and OSPF / Route Tagging

In route redistribution, the router process asks this question first:

Ask this question:

1. Does the route exist in my router process that it will redistribute into?
    No, then Redistribute the route.
    Yes, then Go TO 2.

2. If so, Does the route have a better AD?
    NO, then Don't redistribute the route.
    YES, then Redistribute the route.

Example:
    So, change the external EIGRP route from default 170 to 171 when redistribute into OSPF.

170 = is AD for External EIGRP routes.
171 = in this example, we use 171 for external OSPF route to stop the routing loops, but when you shutdown the interface with the injected route, the route updated LSAs still goes in circle.

R2(config)#

router eigrp 10
    redistribute ospf 1
    network x.x.x.x 0.0.0.255
    default-metric 100000 0 255 1 1500
    no-auto

router ospf 1
redistribute eigrp 10 subnets
distance ospf external 171   ==== only locally significant.

Use route tagging is better.

Route Tagging:

Most situation, you don't need route tags, since the above 2 questions hold.  But in situations where you have external routes coming into your domain, then you'll need route tagging.


STEPS:


route-map OSPF-TO-EIGRP deny 10
    match tag 170

route-map OSPF-TO-EIGRP PERMIT 20
    SET tag 110

route-map EIGRP-TO-OSPF DENY 10
    match tag 110

route-map EIGRP-TO-OSPF permit 20
    set tag 170


R2:
conf t

router eigrp 10
 network 10.1.12.0 0.0.0.3
 network 10.1.15.0 0.0.0.3
 redistribute ospf 1 metric 100000 1 255 1 1500 route-map OSPF-TO-EIGRP ===
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 10 subnets route-map EIGRP-TO-OSPF  ======
 network 10.1.22.0 0.0.0.3 area 0.0.0.0


R3:
conf t

router eigrp 10
 network 10.1.13.0 0.0.0.3
 network 10.1.15.0 0.0.0.3
 redistribute ospf 1 metric 100000 1 255 1 1500 route-map OSPF-TO-EIGRP  ====
!
router ospf 1
 log-adjacency-changes
 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF  ==========
 network 10.1.23.0 0.0.0.3 area 0.0.0.0

DONE.

TEST:
R4-EIGRP-ROUTER# sh ip ro 192.168.1.1
Routing entry for 192.168.1.1/32
  Known via "eigrp 100", distance 170, metric 28416
  Tag 110, type external
  Redistributing via eigrp 100
  Last update from 10.1.12.2 on FastEthernet1/0, 00:38:36 ago
  Routing Descriptor Blocks:
  * 10.1.13.2, from 10.1.13.2, 00:38:36 ago, via FastEthernet1/1
      Route metric is 28416, traffic share count is 1
      Total delay is 110 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
      Route tag 110
    10.1.12.2, from 10.1.12.2, 00:38:36 ago, via FastEthernet1/0
      Route metric is 28416, traffic share count is 1
      Total delay is 110 microseconds, minimum bandwidth is 100000 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
      Route tag 110

R1-OSPF-ROUTER# sh ip ro 172.16.1.1
Routing entry for 172.16.1.0/24
  Known via "ospf 1", distance 110, metric 20
  Tag 170, type extern 2, forward metric 1
  Last update from 10.1.22.2 on FastEthernet1/0, 00:40:31 ago
  Routing Descriptor Blocks:
  * 10.1.23.2, from 10.1.23.2, 00:48:47 ago, via FastEthernet1/1
      Route metric is 20, traffic share count is 1
      Route tag 170
    10.1.22.2, from 10.1.22.2, 00:40:31 ago, via FastEthernet1/0
      Route metric is 20, traffic share count is 1
      Route tag 170


No comments:

Post a Comment