- Enterasys Security Router User's Guide

Configuring BGP Route Maps
6-22 Configuring the Border Gateway Protocol
Show BGP peer group data: show ip bgp peer-group
Show routes matching regular AS path expressions: show ip bgp regexp
Show summary BGP neighbor status: show ip bgp summary
Configuring BGP Route Maps
The following example illustrates the use of a route map to modify inbound data from a neighbor.
Any route received from 192.168.10.1 matching the filter values set in AS ACL 110 will be
permitted with its weight set to 55 and its local preference set to 60. Note the use of regular
expressions.
XSR(config)#router bgp 1
XSR(config-router)#neighbor 192.168.10.1 route-map 55 in
XSR(config-router)#neighbor 192.168.10.1 remote-as 1
XSR(config-router)#route-map
55 permit 5
XSR(config-route-map)#match as-path 110
XSR(config-route-map)#set local-preference 60
XSR(config-route-map)#set weight 55
XSR(config-route-map)#ip as-path access-list 110 permit ^650$
XSR(config-route-map)#ip as-path access-list 110 permit ^700
In the following example, route map 99 marks all paths originating from AS 57 with a MED metric
attribute of 99. The second permit clause is needed so that routes not matching AS path list 1 will
all be relayed to neighbor 192.168.10.1.
XSR(config)#router bgp 1
XSR(config-router)#neighbor 192.168.10.1 route-map 99 out
XSR(config)#exit
XSR(config)#ip as-path access-list 1 permit ^57_
XSR(config)#ip as-path access-list 2 permit .*
XSR(config)#router bgp 1
XSR(config-router)#route-map 99 permit 5
XSR(config-route-map)#match as-path 1
XSR(config-route-map)#set metric 99
XSR(config-route-map)#route-map 99 permit 10
XSR(config-route-map)#match as-path 2
BGP correctly does not accept any AS path not matching the match clause of the route map. This
means that you will not set the metric and the XSR will not accept the route. But, you can
configure the router to accept AS paths not matched in the match clause of the route map
command by using multiple maps of the same name, some without accompanying set commands.
XSR(config-router)#route-map 44 permit 8
XSR(config-route-map)#match as-path 1
XSR(config-route-map)#set local-preference 3
XSR(config-route-map)#route-map 44 permit 12
XSR(config-route-map)#match as-path 2
In the following example, route map 77 is assigned to outgoing updates for neighbor 192.168.57.4.
Route map 77 will prepend AS path 100 to routes that pass ACL 12. The remaining route map
configuration allows other routes to be advertised.
XSR(config)#router bgp 33
XSR(config-router)#network 230.57.10.0
XSR(config-router)#network 231.57.10.0