Allied Telesis x908 BGP Route Map Filtering Example, BGP configuration, Route map configuration

Models: X8100 x908

1 52
Download 52 pages 56.44 Kb
Page 48
Image 48

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 remote-as 15557

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 prefix-list plist1 seq 1 permit 0.0.0.0/0 ip community-list 1 permit 15557

route-map accDef15557 permit 1 match ip address prefix-list plist1 route-map accDef15557 permit 2 match community 1 exact-match

router bgp 3816

neighbor 172.26.1.1 route-map accDef15557 in

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 prefix-list plist2 seq 1 permit 192.168.2.0/24 ip prefix-list plist3 seq 1 permit 192.168.3.0/24 ip prefix-list plist4 seq 1 permit 192.168.4.0/24

route-map outdef permit 1

match ip address prefix-list plist2 set as-path prepend 1645

route-map outdef permit 2

match ip address prefix-list plist3 set as-path prepend 65501 63901 43312

set community 0:23445 0:33445 no-advertise

Page 48 Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes

Page 48
Image 48
Allied Telesis x908, X8100 manual BGP Route Map Filtering Example, BGP configuration, Route map configuration