BGP Route Map Filtering

Route maps can filter routes in or out to neighbours. Route maps can also provide attribute modification properties to routes advertised outbound or inbound too.

Route maps are applied on a per neighbour basis, and different route maps can be activated for inbound and outbound directions.

ip prefix-list lan-addresses ge 16
ip prefix-list public-addresses ge 24
ip as-path access-list 1 permit _65125$

route-map INBOUND-CHECK deny 10
 description Deny any networks via a prefix-list match
 match ip address prefix-list lan-addresses

route-map INBOUND-CHECK permit 20
 description Change local preference for public range
 match ip address prefix-list public-addresses
 match as-path 10
 set local-preference 200

route-map INBOUND-CHECK permit 30
 description Change the local preference of all other routes to a lower value
 match as-path 10
 set local-preference 50

router bgp 65124
 address-family ipv4 unicast
  neighbor route-map INBOUND-CHECK in



, ,




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.