BGP: Route Map Filtering Example
BGP: Route Map Filtering Example
Here is an example of a set of route maps.
BGP configuration
First, we need to set the router’s ASN and the ASN of the peer.
router bgp 3816
neighbor 172.26.1.1
neighbors are enabled by default.
Route map configuration
Next, we want to limit the routes that we accept from this peer. We will accept the default route from any community, but will only accept any other updates from community 15557.
ip
router bgp 3816
neighbor 172.26.1.1
Next, we want to change the attributes of certain routes before advertising them to the neighbor 172.26.1.v. For 192.168.2.0/24, we will add to the AS path. For 192.168.3.0/24 and 192.168.4.0/24, we will add a different set of entries to the AS path, and set the community and the local preference. All other routes will be advertised unchanged this neighbor.
ip
match ip address
match ip address
set community 0:23445 0:33445
Page 48 Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes