Cisco Routing – Best Practices for Advertising Routes in BGP

bgpciscocisco-iosrouting

For connect some customer we want to advertise only one network out and different networks in they provide us. For this I read about route-map and advertising-map feature in Cisco Docu.

For example this one for feature advertis-map:

router bgp 2 
 bgp log-neighbor-changes 
 network 128.16.16.0 mask 255.255.255.0 
 neighbor 10.10.10.1 remote-as 1 
 neighbor 10.10.10.1 advertise-map ADVERTISE    
! 
access-list 60 permit 128.16.16.0 0.0.0.255 
!  
route-map ADVERTISE permit 10 
 match ip address 60 
!

And this one for the route-map feature:

router bgp 2 
 bgp log-neighbor-changes 
 network 128.16.16.0 mask 255.255.255.0 
 neighbor 10.10.10.1 remote-as 1 
 neighbor 10.10.10.1 route-map RED out   
! 
ip prefix-list 1 permit 128.16.16.0/24 
!
route-map RED permit 10 
 match ip address prefix-list 1 

I have found this booth Solutions to limit the number of networks that announced to customer. The goal is to Create a routing to a BGP Member and advertise only one subnet to the customer, the customer himself advertise one network in our direction? Is it possible with one of this solution and what is the diffrence between this solutions?

Best Answer

You are conflating two different issues:

Route-maps can act as a policy filter, selecting which prefixes are advertised to neighbors and which are accepted from neighbors. Advertise-maps allow you to conditionally advertise prefixes based on the presence of other prefixes. They don't control prefixes received from neighbors. Generally, route-maps are simpler to use, unless you really need the conditional feature.

Access-lists and prefix-lists can do the same thing, but prefix-lists are easier to read and allow more precise control over route policies. In the context of BGP, prefix lists make more intuitive sense, since BGP advertises prefix reachability.