Dual Redistribution between BGP and EIGRP TAGs Prevent Loop

ISSUE:

Router B receives the 10.xx.0.0/24 prefixes from PE2 (Secondary Path). It redistributed that prefix into EIGRP like it’s supposed to.

Router A received the prefix from EIGRP and because the same prefix was not received from PE1 (Primary Path) because of their shutdown of the peer, Router A took the EIGRP prefix as the best one and redistributed it into BGP.

Now when the Primary Path came back up, Router A did not take the same prefix as the best one because the same prefix was already in the BGP table originated by itself (Router A – redistributed from EIGRP) with a weight of 32768. You can see this below in the example.

FIX:
Use TAGs to prevent EIGRP from going into BGP when redistributing.

Router A & B:

route-map BGP>EIGRP permit 10
set tag 33613

route-map EIGRP>BGP deny 10
match tag 33613

route-map EIGRP>BGP permit 20

Router A:

router eigrp 1
redistribute bgp 65000 metric 100000 10 255 1 1500 route-map BGP>EIGRP

router bgp 65000
redistribute eigrp 1 route-map EIGRP>BGP

Router B:

router eigrp 1
redistribute bgp 65000 metric 100000 120 255 1 1500 route-map BGP>EIGRP

router bgp 65000
redistribute eigrp 1 route-map EIGRP>BGP

Example:
In this example, you can see that the 10.200.1.0/24 NY subnet became a locally originated route because of the redistribution. At this point, the 10.200.1.0/24 subnet was not accessible.

But you also see that this did not happen to the 10.100.1.0/24 subnet and that subnet was accessible.

tampa-br01-a#sh ip bgp 10.200.1.0
BGP routing table entry for 10.200.1.0/24, version 98835356
Paths: (3 available, best #3, table default)
Not advertised to any peer
Refresh Epoch 1
1 65008
172.16.243.1 from 172.16.243.1 (172.16.243.1)
Origin incomplete, localpref 200, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
1 65008, (received-only)
172.16.243.1 from 172.16.243.1 (172.16.243.1)
Origin incomplete, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
Local
10.2.1.1 from 0.0.0.0 (10.200.200.2)
Origin incomplete, metric 287232, localpref 100, weight 32768, valid, sourced, best
rx pathid: 0, tx pathid: 0x0
tampa-br01-a#sh ip bgp 10.100.1.0
BGP routing table entry for 10.100.1.0/24, version 98837693
Paths: (2 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
1 65096
172.16.243.1 from 172.16.243.1 (172.16.243.1)
Origin incomplete, localpref 200, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 1
1 65096, (received-only)
172.16.243.1 from 172.16.243.1 (172.16.243.1)
Origin incomplete, localpref 100, valid, external
rx pathid: 0, tx pathid: 0

Highlighted above, you can see that the word “Local” and “0.0.0.0”. This is telling you that the route is a locally originated route (this route was redistributed from EIGRP into BGP on Router A). A locally originated route has a weight of 32768 as you can also see above.  In BGP’s Best Path Selection Algorithm weight is the most preferred. It’s #1 on the list.   BGP prefers the path with the highest WEIGHT.