Tuesday, October 9, 2018

BGP Backdoor

BGP backdoor is a way to prefer a higher administrative distance protocol over eBGP for a specific prefix.
for example blow layout:

we have eBGP connection with (R1-R3) but it's with serial link which has a lower bandwidth than our EIGRP link with (R1-R5) from a network performance point of view, we would need to use the higher bandwidth link, and keep low speed link as backup, since we have eBGP we can do that using (BGP backdoor) feature, which would allow router to install a higher administrative distance protocol in the RIB for the same prefix instead of eBGP which is (20)

in each router we have internal link to core switch which will be (192.168.X.X) where X is the router name.

let's configure it:

First step we will configure normal BGP and EIGRP, and we will advertise INTERNAL lan on R3 under both BGP and EIGRP, and we will see R1 is using the route coming via eBGP
R1#show ip route bgp | b Gate
Gateway of last resort is not set

B     192.168.3.0/24 [20/0] via 13.0.0.3, 00:00:28
R1#


R1#show ip cef 192.168.3.0
192.168.3.0/24
  nexthop 13.0.0.3 Serial1/1



Now let's configure BGP Backdoor feature on R1 in order to use the better performance link
R1:
#router bgp 1
#network 192.168.3.0 mask 255.255.255.0 backdoor

showing IP BGP table you will notice (r>) which indicates RIB failure due to Higher administrative distance

R1#show ip bgp | be RPK
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.1.0      0.0.0.0                  0         32768 ?
 r>  192.168.3.0      13.0.0.3                 0             0 3 i

R1#show ip bgp rib-failure
  Network            Next Hop                      RIB-failure   RIB-NH Matches
192.168.3.0        13.0.0.3               Higher admin distance              n/a
R1#


Now checking the routing table (RIB) which will show the installed routes that will be used to reach prefixes.

R1#show ip route eigrp  | be Ga
Gateway of last resort is not set

      35.0.0.0/24 is subnetted, 1 subnets
D        35.0.0.0 [90/307200] via 15.0.0.5, 00:07:27, Ethernet0/0
D     192.168.3.0/24 [90/435200] via 15.0.0.5, 00:00:26, Ethernet0/0
D     192.168.5.0/24 [90/409600] via 15.0.0.5, 00:08:07, Ethernet0/0
R1#
Now (R1) is using EIGRP with AD of (90) path instead of (eBGP).

Final check:

R1#traceroute 192.168.3.3 num
Type escape sequence to abort.
Tracing the route to 192.168.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 15.0.0.5 1 msec 0 msec 1 msec
  2 35.0.0.3 1 msec *  2 msec
R1#



I hope this is useful.


















No comments:

Python-Jinja template configuration generator for Cisco devices and printout configs to external text files

 In this post, I worked on collecting a code that works with Jinja template. the nice thing in working with Jinja is that you can have basel...