routeprotocol.com

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 192.168.0.0/16 ge 16
ip prefix-list public-addresses 1.1.1.0/24 ge 24
ip as-path access-list 1 permit _65125$

route-map INBOUND-CHECK deny 10
 description Deny any 192.168.0.0 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 1.1.1.0/24
 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 65.14.112.153 route-map INBOUND-CHECK in

Posted

in

, ,

by

Tags:

Comments

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.