Redistribution into EIGRP

ccnp-routing
Lab on mutual redistribution between OSPF, EIGRP, and RIP, the suboptimal routing it can cause, and route tags that prevent routing domain loops.
Published

Jan 18, 2018

redistributeintoeigrp
R1 Configuration
hostname R1
!
interface GigabitEthernet0/1
 ip address 10.10.10.1 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/2
 ip address 10.10.20.1 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
router ospf 1
 network 10.10.10.1 0.0.0.0 area 0
 network 10.10.20.1 0.0.0.0 area 0
RD1 Configuration
hostname RD1
!
interface GigabitEthernet0/0
 ip address 10.10.11.1 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/1
 ip address 10.10.10.2 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
router eigrp RD1
 !
 address-family ipv4 unicast autonomous-system 1
  !
  topology base
   redistribute ospf 1 metric 1000000 20 255 1 1500
  exit-af-topology
  network 10.10.11.1 0.0.0.0
 exit-address-family
!
router ospf 1
 redistribute eigrp 1 subnets
 network 10.10.10.2 0.0.0.0 area 0
RD2 Configuration
hostname RD2
!
interface GigabitEthernet0/0
 ip address 10.10.21.1 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/1
 ip address 10.10.20.2 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
router eigrp RD2
 !
 address-family ipv4 unicast autonomous-system 1
  !
  topology base
   redistribute ospf 1 metric 1000000 20 255 1 1500
  exit-af-topology
  network 10.10.21.1 0.0.0.0
 exit-address-family
!
router ospf 1
 redistribute eigrp 1 subnets
 network 10.10.20.2 0.0.0.0 area 0
RD3 Configuration
hostname RD3
!
interface GigabitEthernet0/0
 ip address 172.20.0.1 255.255.0.0
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/1
 ip address 10.10.11.2 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/2
 ip address 10.10.21.2 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
!
router eigrp RD3
 !
 address-family ipv4 unicast autonomous-system 1
  !
  topology base
   redistribute rip metric 1000000 2000 255 1 1500
  exit-af-topology
  network 10.10.11.2 0.0.0.0
  network 10.10.21.2 0.0.0.0
 exit-address-family
 !
 service-family ipv4 autonomous-system 1
  !
  topology base
  exit-sf-topology
 exit-service-family
!
router rip
 version 2
 redistribute eigrp 1 metric 2
 network 172.20.0.0
 no auto-summary
!
R2 Configuration
hostname R2
!
interface GigabitEthernet0/0
 ip address 172.20.0.255 255.255.0.0
 duplex auto
 speed auto
 media-type rj45
!
router rip
 version 2
 network 172.20.0.0
 no auto-summary
!
Let us verify the end-to-end reachability
R1#traceroute 172.20.0.255
  1 10.10.10.2 5 msec 6 msec 4 msec
  2 10.10.11.2 8 msec 7 msec 5 msec
  3 172.20.0.255 9 msec 13 msec 9 msec
We see that the connectivity between R1 and R2 passes from RD1. Everything seems to be okay and we have end-to-end reachability! But there is a problem. We have inefficient routing. Let us check how RD2 reaches 172.20.0.0
RD2#traceroute 172.20.0.255
  1 10.10.20.1 7 msec 6 msec 22 msec
  2 10.10.10.2 10 msec 9 msec 9 msec
  3 10.10.11.2 10 msec 9 msec 8 msec
  4 172.20.0.255 13 msec 9 msec 8 msec

We see that if RD2 wants to reach R2 (instead of using RD3) it goes to R1, RD1, then RD3, which is sub-optimal!

Here is the reason.

Here are the solutions

  1. Use per-route Administrative Distance (AD)
  2. Use route map to filter the subnet
  • Both RD1 and RD2 apply a route map to their redistribution from OSPF into EIGRP, filtering routes with prefix 172.20.0.0
  1. Use route tags to prevent domain loops
  • A route tag is a unitless 32-bit integer. Most routing protocols can assign one to any given route. It is like a sticky note on a specific route
    RD1(config-router)#router ospf 1 RD1(config-router)#redistribute eigrp 1 subnets route-map TAG11 RD1(config)#route-map TAG11 permit 10 RD1(config-route-map)#set tag 11

RD1(config)#router eigrp RD1 RD1(config-router)#a ipv4 a 1 RD1(config-router-af)#topology base RD1(config-router-af-topology)#redistribute ospf 1 metric 1000000 20 255 1 1500 route-map STOPTAG12 RD1(config)#route-map STOPTAG12 deny 10 RD1(config-route-map)#match tag 12 RD1(config)#route-map STOPTAG12 permit 20

RD2(config)#router eigrp RD2
RD2(config-router)#a ipv4 a 1
RD2(config-router-af)#topology base 
RD2(config-router-af-topology)#redistribute ospf 1 metric 1000000 20 255 1 1500 route-map STOPTAG11        
RD2(config)#route-map STOPTAG11 deny 10
RD2(config-route-map)#match tag 11
RD2(config)#route-map STOPTAG11 permit 20

RD2(config)#router ospf 1
RD2(config-router)#redistribute eigrp 1 subnets route-map TAG12
RD2(config)#route-map TAG12 permit 10
RD2(config-route-map)#set tag 12
Back to top