Configuring BGP Peer Groups

XSR(config-router)#neighbor 192.168.57.90 send-community

XSR(config-router)#neighbor 192.168.57.90 route-map 111 out

XSR(config-router)#neighbor route-map 111 10 permit

XSR(config-route-map)#match as-path 1

XSR(config-route-map)#set community 50 50 additive

XSR(config-route-map)#route-map 111 20 permit

XSR(config-route-map)#match as-path 2

XSR(config-route-map)#ip as-path access-list 1 permit 7$

XSR(config-route-map)#ip as-path access-list 2 permit .*

Thirdly, community-based matching selectively sets MED and local-preference values for neighbor 192.168.57.55’s routes. All the routes that match community list 1 get a MED of 60 including any with communities 10 20 30 or 90 91. These routes may have other community parameters too.

A local preference of 30 is set for all routes that pass community list 2 including those with community values 8 or 9. If the routes belong to any other community, no matching by community list 2 is done.

A local preference of 40 is set for all routes matching community list 3 which matches all the routes because they are members of the Internet community. So, the remainder of neighbor 192.168.57.55’s routes get local preference 40.

XSR(config)#router bgp 20

XSR(config-router)#neighbor 192.168.57.55 remote-as 10

XSR(config-router)#neighbor 192.168.57.55 route-map 101 in

XSR(config-router)#route-map 101 10 permit

XSR(config-route-map)#match community-list 1

XSR(config-route-map)#set metric 60

XSR(config-route-map)#route-map 101 20 permit

XSR(config-route-map)#match community-list 2

XSR(config-route-map)#set local-preference 30

XSR(config-route-map)#route-map 101 30 permit

XSR(config-route-map)#match community-list 3

XSR(config-route-map)#set local-preference 40

XSR(config-route-map)#exit

XSR(config)#ip community-list 1 permit 10 20 30

XSR(config)#ip community-list 1 permit 90 91

XSR(config)#ip community-list 2 permit 8

XSR(config)#ip community-list 2 permit 9

XSR(config)#ip community-list 3 permit internet

Route map 55 is applied to the outgoing updates for neighbor 192.168.57.50 in this example. Routes that pass ACL 1 have the special community attribute value local-as,with other routes advertised as usual. Local-asautomatically prevents BGP speakers outside AS 20 from advertising those routes.

XSR(config)#router bgp 23

XSR(config-router)#network 1.0.0.0 mask 255.0.0.0

XSR User’s Guide 6-27

Page 175
Image 175
Enterasys Networks X-PeditionTM manual XSRconfig#router bgp XSRconfig-router#network 1.0.0.0 mask