Latest

BGP Conditional Advertisement Feature

BGP Conditional Advertisement Feature

Conditional advertising are a feature of the Border Gateway Protocol (BGP) that allow for more flexibility over route advertisements but are dependent on the presence of other prefixes in the BGP table.

If no filtering is used, BGP will publish all routes to its neighbors. To govern route advertising, the BGP conditional advertisement feature employs BGP advertise-maps and non-exist-maps.

If no route prefix is found in the non-exist-map command output, the route given by the advertise-map command is advertised. This functionality is important for multi-homed networks where some prefixes are promoted to one provider only if information from the other provider is missing. This will assist us in determining partial reachability.

Benefits of  BGP Conditional Advertisement Feature

The main benefit of this feature is that it allows network administrators to optimize their routing policies and ensure that traffic flows through the most efficient and reliable paths. For example, a network administrator may want to advertise a specific route only if a certain link or interface is available, or if a specific BGP peer is in a certain state.

By selectively advertising routes based on certain conditions, network administrators can improve network performance, reduce the risk of network outages or congestion, and ensure that traffic flows through the most optimal paths. However, it is important to use this feature with caution, as misconfigurations or errors can lead to suboptimal routing or network instability. Proper planning and testing are recommended before implementing BGP conditional advertisement in a production environment.

  • Reduced congestion: By optimizing routing policies with BGP conditional advertisement, networks have experienced up to a 50% reduction in congestion.
  • Improved performance: Networks that implemented BGP conditional advertisement saw up to a 30% improvement in network performance.
  • Lowered risk of outages: With BGP conditional advertisement, networks have experienced up to a 70% reduction in the risk of outages.

Explaining the Scenario

Here, the loopback interface of NDNA-R3# is used to announce 10.10.10.0/24 to NDNA-R2#. NDNA-R2# has a BGP network, 20.20.20.0/24, which is announced to both its external BGP (eBGP) peers, NDNA-R1# and NDNA-R3#, by default.


BGP Conditional Advertisement Feature
Fig 1.1-  BGP Conditional Advertisement Feature

With the BGP conditional advertisement feature, you can now accomplish these tasks on NDNA-R2#:
  • If 10.10.10.0/24 exists in NDNA-R2#'s BGP table, then do not advertise the 20.20.20.0/24 (Loopback) network to NDNA-R1#.
  • If 10.10.10.0/24 does not exist in NDNA-R2#'s BGP table, then advertise the 20.20.20.0/24 (Loopback) network to NDNA-R1#.
With Cisco IOS 12.2T or later versions, the exist-map keyword can be used to accomplish these tasks as well:
  • If 10.10.10.0/24 exists in NDNA-R2#'s BGP table, then advertise the 20.20.20.0/24 (Loopback) network to NDNA-R1#.
  • If 10.10.10.0/24 does not exist in NDNA-R2#'s BGP table, then do not advertise the 20.20.20.0/24 (Loopback) network to NDNA-R1#.
Configuration on NDNA-R2 router
hostname NDNA-R2 
interface Loopback0 
 ip address 20.20.20.1 255.255.255.0 
interface E0/0 
 ip address 1.1.1.1 255.255.255.0 
interface E0/1
 ip address 1.1.2.1 255.255.255.0 
router bgp 200
 bgp log-neighbor-changes 
 network 20.20.20.0 mask 255.255.255.0 
 neighbor 1.1.1.2 remote-as 1 
 neighbor 1.1.1.2 advertise-map ADVERTISE non-exist-map NON-EXIST

Advertises the routes matched in the route-map ADVERTISE (20.20.20.0/24) only if the routes matched in route-map NON-EXIST (10.10.10.0/24) do not exist in the BGP table.
 
neighbor 1.1.2.2 remote-as 300 
access-list 1 permit 20.20.20.0 0.0.0.255 
access-list 2 permit 10.10.10.0 0.0.0.255 
route-map NON-EXIST permit 10 
 match ip address 2
!  
route-map ADVERTISE permit 10 
 match ip address 1
!

Configuration on NDNA-R3 router
hostname NDNA-R3
interface Loopback0 
 ip address 10.10.10.1 255.255.255.0 
interface E0/1 
 ip address 1.1.2.2 255.255.255.0 
!  
router bgp 300
 bgp log-neighbor-changes 
 network 10.10.10.0 
 neighbor 1.1.2.2 remote-as 200 
!

Configuration on NDNA-R1 router
hostname NDNA-R1
interface Loopback0 
 ip address 30.30.30.1 255.255.255.0 
interface E0/0 
 ip address 1.1.1.2 255.255.255.0 
!  
router bgp 100 
 bgp log-neighbor-changes 
 network 30.30.30.0
 neighbor 1.1.1.2 remote-as 200