Redistribute EIGRP into BGP with backup routes

Answered Question
Apr 20th, 2010
User Badges:

Here is the scenario. I have two routers, each router has a single WAN link but to two different providers. RouterA is connected to ProviderA and RouterB is connected to PrivderB. The providers are using BGP for their routing. I am exchanging routers to them using BGP.  In RouterA I have a loopback adaptor for H.323 traffic that I need to distribute to both providers. Also I need to make sure that both routers see the head end IP subnet of 192.168.200.x. I am running EIGRP internally and BGP into the provider. I have successfully configured redistribution between BGP and EIGRP. Everything works fine on the redistribution except when a WAN link fails. When one of the circuits fails it causes me to loose connectivity to the head end router, I then loose my BGP routes from that link. It then immediately installs the EIGRP routes learned from the other router into my routing table and all connectivity remains intact. The problem is when the Serial link is back and the BGP routes a learned they do not remove the EIGRP routes and the serial link is not used because the router things it should send traffic over EIGRP to the other router. If I reset the EIGRP neighbors then the BGP route is reinserted. The BGP as an AD of 20 and the EIGRP has AD of 170 so I don’t understand why it is not removing the EIGRP route once BGP comes back online.

Correct Answer by Giuseppe Larosa about 7 years 1 week ago

Hello Bill,

int this case you want to prefer the EIGRP route over the BGP route for specific IP subnets.

I will assume that the IP subnets of interest are those of the loopbacks:

192.168.200.x  on router Ry



this effect can be achieved by using the network backdoor command in router bgp configuration


R1:

router bgp 65001


network 192.168.200.3 mask 255.255.255.255 backdoor


R2:

router bgp 65001


network 192.168.200.2 mask 255.255.255.255 backdoor


the result is that eBGP route for 192.168.200.x on Ry is presented on IP routing table with AD 200 and EIGRP route will be installed for its lower Administrative distance (170 worst case if D EX)


see

http://www.cisco.com/en/US/docs/ios/iproute_bgp/configuration/guide/irg_basic_net_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1056114




Hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Tue, 04/20/2010 - 11:28
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Bill,


>> The BGP as an AD of 20 and the EIGRP has AD of 170 so I don’t understand why it is not removing the EIGRP route once BGP comes back online.


The issue is created in the BGP table: a locally injected BGP route into the BGP table as a result of redistribution of EIGRP into BGP has weight 32,768 by default and when the original eBGP route is restored is not able to be considered the BGP best path for its lower weight.


AD plays no role in BGP table. An AD is attached to the route that BGP choices as best path by the IP routing table maintainer process.


The solution I used to solve the problem of eBGP restore is to give a weight of 40,000 > 32,768 to eBGP routes coming from eBGP neighbor.


In this way when the eBGP session is restored its routes are again chosen as best paths  and reinstalled in the BGP table and then in the IP routing table.


Hope to help

Giuseppe

Bill19795_2 Tue, 04/20/2010 - 13:21
User Badges:

Do you think you can help me out with the configuration? This is from RouterA

Ignore the allowas-in command. This is in my lab and I have it connected to a simulated PSTN router.

router eigrp 50

redistribute bgp 65001

network 10.1.2.0 0.0.0.255

network 192.168.2.0

network 192.168.200.2 0.0.0.0

default-metric 1000 100 250 100 1500

no auto-summary

!

router bgp 65001

no synchronization

bgp log-neighbor-changes

redistribute eigrp 50

neighbor 172.16.200.9 remote-as 2020

neighbor 172.16.200.9 allowas-in 1

no auto-summary

!

Giuseppe Larosa Tue, 04/20/2010 - 23:50
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Bill,

given the configuration template that you have provided I suggest the following change:


router bgp 65001

neigh 172.16.200.9 weight 40000

!


the reasons are explained in my previous post on this thread


Hope  to help

Giuseppe

Bill19795_2 Wed, 04/21/2010 - 05:40
User Badges:

Thanks for all your help so far. While adjusting the weight does work I now have other problems.

Each Router has a loopback adaptor that needs to be seen be each other router locally and throughout the BGP network. When I use the weight commands the BGP routes are reinserted but it is also using BGP to route traffic for the loopback adaptors. These are both connected via the same Ethernet network so I want them to stay local instead of going through the MPLS network. Also if I shut down the S0/0 from R2 it will start using the BGP routes but R1 does not use EIGRP and keeps using the BGP routes so it is trying to send traffic over the MPLS when it should send it locally.

R1:

!

interface Loopback10

ip address 192.168.200.3 255.255.255.255

interface FastEthernet0/0.1

encapsulation dot1Q 1 native

ip address 10.1.2.13 255.255.255.0

glbp 1 ip 10.1.2.10

glbp 1 timers 1 3

glbp 1 timers redirect 2 14400

glbp 1 priority 105

glbp 1 preempt

glbp 1 weighting 110 lower 95 upper 105

glbp 1 weighting track 1 decrement 20

glbp 1 forwarder preempt delay minimum 2

!        

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 192.168.2.13 255.255.255.0

glbp 2 ip 192.168.2.10

glbp 2 timers 1 3

glbp 2 timers redirect 2 14400

glbp 2 priority 105

glbp 2 preempt

glbp 2 weighting 110 lower 95 upper 105

glbp 2 weighting track 1 decrement 20

glbp 2 forwarder preempt delay minimum 2

interface Serial0/0

ip address 172.16.200.14 255.255.255.252

service-module t1 timeslots 1-24

router eigrp 50

redistribute bgp 65001

network 10.1.2.0 0.0.0.255

network 192.168.2.0

network 192.168.200.3 0.0.0.0

default-metric 1000 100 250 100 1500

no auto-summary

!

router bgp 65001

no synchronization

bgp log-neighbor-changes

redistribute eigrp 50

neighbor 172.16.200.13 remote-as 2020

neighbor 172.16.200.13 allowas-in 1

neighbor 172.16.200.13 weight 40000

no auto-summary

LAP_B1R2#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

D EX    1.1.1.10 [170/2588160] via 192.168.2.12, 00:13:27, FastEthernet0/0.2

                 [170/2588160] via 10.1.2.12, 00:13:27, FastEthernet0/0.1

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.10 [20/0] via 172.16.200.13, 00:04:17

     172.16.0.0/30 is subnetted, 1 subnets

C       172.16.200.12 is directly connected, Serial0/0

     192.168.200.0/32 is subnetted, 3 subnets

B       192.168.200.1 [20/0] via 172.16.200.13, 00:04:17

B       192.168.200.2 [20/0] via 172.16.200.13, 00:04:18

C       192.168.200.3 is directly connected, Loopback10

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.2.0 is directly connected, FastEthernet0/0.1

C    192.168.2.0/24 is directly connected, FastEthernet0/0.2

LAP_B1R2#

R2:

!

interface Loopback10

ip address 192.168.200.3 255.255.255.255

!

interface FastEthernet0/0

no ip address

speed auto

!

interface FastEthernet0/0.1

encapsulation dot1Q 1 native

ip address 10.1.2.13 255.255.255.0

glbp 1 ip 10.1.2.10

glbp 1 timers 1 3

glbp 1 timers redirect 2 14400

glbp 1 priority 105

glbp 1 preempt

glbp 1 weighting 110 lower 95 upper 105

glbp 1 weighting track 1 decrement 20

glbp 1 forwarder preempt delay minimum 2

!        

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 192.168.2.13 255.255.255.0

glbp 2 ip 192.168.2.10

glbp 2 timers 1 3

glbp 2 timers redirect 2 14400

glbp 2 priority 105

glbp 2 preempt

glbp 2 weighting 110 lower 95 upper 105

glbp 2 weighting track 1 decrement 20

glbp 2 forwarder preempt delay minimum 2

!

interface Serial0/0

ip address 172.16.200.14 255.255.255.252

service-module t1 timeslots 1-24

!

router eigrp 50

redistribute bgp 65001

network 10.1.2.0 0.0.0.255

network 192.168.2.0

network 192.168.200.3 0.0.0.0

default-metric 1000 100 250 100 1500

no auto-summary

!        

router bgp 65001

no synchronization

bgp log-neighbor-changes

redistribute eigrp 50

neighbor 172.16.200.13 remote-as 2020

neighbor 172.16.200.13 allowas-in 1

neighbor 172.16.200.13 weight 40000

no auto-summary

LAP_B1R2#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

D EX    1.1.1.10 [170/2588160] via 192.168.2.12, 00:15:24, FastEthernet0/0.2

                 [170/2588160] via 10.1.2.12, 00:15:24, FastEthernet0/0.1

     2.0.0.0/32 is subnetted, 1 subnets

B       2.2.2.10 [20/0] via 172.16.200.13, 00:06:14

     172.16.0.0/30 is subnetted, 1 subnets

C       172.16.200.12 is directly connected, Serial0/0

     192.168.200.0/32 is subnetted, 3 subnets

B       192.168.200.1 [20/0] via 172.16.200.13, 00:06:14

B       192.168.200.2 [20/0] via 172.16.200.13, 00:06:15

C       192.168.200.3 is directly connected, Loopback10

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.2.0 is directly connected, FastEthernet0/0.1

C    192.168.2.0/24 is directly connected, FastEthernet0/0.2

LAP_B1R2#

Shutdown S0/0 on R2:

LAB_B1R2(config)#int s0/0

LAB_B1R2(config-if)#sh

LAB_B1R2(config-if)#shutdown

LAB_B1R2(config-if)#e

*Mar  5 03:19:28.631: %TRACKING-5-STATE: 1 interface Se0/0 line-protocol Up->Down

*Mar  5 03:19:28.635: %BGP-5-ADJCHANGE: neighbor 172.16.200.13 Down Interface flapnd

LAB_B1R2#

LAB_B1R2#

LAB_B1R2#

*Mar  5 03:19:30.426: %SYS-5-CONFIG_I: Configured from console by console

*Mar  5 03:19:30.626: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down

*Mar  5 03:19:30.803: %GLBP-6-FWDSTATECHANGE: FastEthernet0/0.1 Grp 1 Fwd 2 state Active -> Listen

*Mar 5 03:19:30.803: %GLBP-6-FWDSTATECHANGE: FastEthernet0/0.2 Grp 2 Fwd 2 state Active -> Listen

*Mar  5 03:19:31.628: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down

LAB_B1R2#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

D EX    1.1.1.10 [170/2588160] via 192.168.2.12, 00:16:16, FastEthernet0/0.2

                 [170/2588160] via 10.1.2.12, 00:16:16, FastEthernet0/0.1

     192.168.200.0/32 is subnetted, 3 subnets

D EX    192.168.200.1

           [170/2588160] via 192.168.2.12, 00:00:17, FastEthernet0/0.2

           [170/2588160] via 10.1.2.12, 00:00:17, FastEthernet0/0.1

D       192.168.200.2

           [90/156160] via 192.168.2.12, 00:00:17, FastEthernet0/0.2

           [90/156160] via 10.1.2.12, 00:00:18, FastEthernet0/0.1

C       192.168.200.3 is directly connected, Loopback10

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.2.0 is directly connected, FastEthernet0/0.1

C    192.168.2.0/24 is directly connected, FastEthernet0/0.2

LAB_B1R2#

LAB_B1R2#

R1:

LAB_B1R1#show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets

B       1.1.1.10 [20/0] via 172.16.200.9, 00:17:20

     172.16.0.0/30 is subnetted, 1 subnets

C       172.16.200.8 is directly connected, Serial0/0

     192.168.200.0/32 is subnetted, 3 subnets

B       192.168.200.1 [20/0] via 172.16.200.9, 00:17:20

C       192.168.200.2 is directly connected, Loopback10

D       192.168.200.3

           [90/156160] via 192.168.2.13, 00:00:05, FastEthernet0/0.2

           [90/156160] via 10.1.2.13, 00:00:05, FastEthernet0/0.1

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.2.0 is directly connected, FastEthernet0/0.1

C    192.168.2.0/24 is directly connected, FastEthernet0/0.2

LAB_B1R1#

Correct Answer
Giuseppe Larosa Wed, 04/21/2010 - 11:49
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Bill,

int this case you want to prefer the EIGRP route over the BGP route for specific IP subnets.

I will assume that the IP subnets of interest are those of the loopbacks:

192.168.200.x  on router Ry



this effect can be achieved by using the network backdoor command in router bgp configuration


R1:

router bgp 65001


network 192.168.200.3 mask 255.255.255.255 backdoor


R2:

router bgp 65001


network 192.168.200.2 mask 255.255.255.255 backdoor


the result is that eBGP route for 192.168.200.x on Ry is presented on IP routing table with AD 200 and EIGRP route will be installed for its lower Administrative distance (170 worst case if D EX)


see

http://www.cisco.com/en/US/docs/ios/iproute_bgp/configuration/guide/irg_basic_net_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1056114




Hope to help

Giuseppe

Bill19795_2 Wed, 04/28/2010 - 05:49
User Badges:

Thanks for the help. I ended up using the weighting that you said plus using a route map to only distribute the routes into BGP that I needed.

Everything is working as desired.

Actions

This Discussion