System information

Configuring Routing Policy
7-11
where:
community-list-number identifies a community list.
community-number is a number that identifies a community.
as-community-number is a number that identifies one or more permit or deny
ASs.
Example
This example uses a community list to modify the local preference of routes based on
community number. The commands below specify community list 1 to permit routes
with community number 100 and community list 2 to permit routes with community
number 200.
ip community-list 1 permit 100
ip community-list 2 permit 200
The first instance of the route map defines the appropriate match and set clauses. The
commands below specify route map locpref, instance 10. They set the local
preference of the route to 50, if the route is part of the communities defined in
Community List 1.
route-map locpref permit 10
match community 1
set local preference 50
The next commands define the second instance of the route map, route-map locpref,
instance 20. The commands also set the local preference of the route to 25, if the route
is part of the communities defined in Community List 2.
route-map locpref permit 20
match community 2
set local preference 25
The final commands enable BGP and specify the AS for Router Boston in AS 200,
specify the AS of the BGP neighbor (Router A) to which the route map applies, and
apply the route map localpref for all incoming routes.
router bgp 200
neighbor 160.30.21.10 remote-as 300
neighbor 160.30.21.10 route-map locpref in