Arista – dealing with inactive routes in BGP

By | October 22, 2019

In EOS, BGP implementation normally considers only active routes in RIB for advertisement to its peers.

In certain deployments, IGP protocol like OSPF may carry same set of prefixes as BGP (especially if we use OSPF to form iBGP). In addition, routes from OSPF and BGP may be mutually redistributed. As a result, when local BGP process advertises these prefixes to its neighbors, it would always choose OSPF routes over corresponding BGP routes (admin distance of OSPF is better than that of BGP).

For a Cisco network engineer, this is totally deviate from their normal understanding. In Cisco, if the similar situation happened, it only marked as rib failure, but the BGP prefixes are still advertised out to other BGP peer.

Coincidentally, I encountered this situation and I will share my findings and workaround for reference.

Option 1 – advertise-inactive

This is documented by Arista, basically it tells the BGP to advertised out prefixes even though it is inactive (inactive due to better AD is exist in other routing protocol).
https://eos.arista.com/eos-4-15-0f/bgp-advertise-inactive/

Option 2 – override the AD for prefixes learnt from iBGP peer

ip prefix-list default-only seq 10 permit 0.0.0.0/0
!
route-map set-distance-for-default permit 10
    match ip address prefix-list default-only
    set distance 20
 !
 route-map set-distance-for-default permit 20
!
router bgp 65999
   neighbor 10.3.36.2 route-map set-distance-for-default in

For my case, the 0.0.0.0/0 is not installed in BGP because the switch is also receiving the same prefix from OSPF. Above config will set the AD for 0.0.0.0/0 to 20 (instead of 200) when it received the BGP update from the peer. I can set it to any value as long as it is lower than 110 (OSPF)

https://eos.arista.com/forum/change-ad-for-specific-prefix-in-bgp-or-ospf/



Loading