A community list is a sequential collection of permit and deny conditions. Each condition
describes the community number to be matched. If you issued the
ip bgp-community
new-format
command, the community number is in
AA
:
NN
format; otherwise, it is in
decimal format (the hexadecimal octets converted to decimal).
The router tests the community attribute of a route against each condition in a community
list. The first match determines whether the router accepts (the route is permitted) or
rejects (the route is denied) a route that has the specified community. Because the router
stops testing conditions after the first match, the order of the conditions is critical. If no
conditions match, the router rejects the route.
Consider the network structure shown in Figure 5 on page 38.
Figure 5: Community Lists
Suppose you want router Albany to set metrics for routes that it forwards to router Boston
based on the communities to which the routes belong. You can create community lists
and filter the routes with a route map that matches on the community list. The following
example configures router Albany:
host1(config)#
router bgp 293
host1(config-router)#
neighbor 10.5.5.2 remote-as 32
host1(config-router)#
neighbor 10.2.2.1 remote-as 451
host1(config-router)#
neighbor 10.2.2.4 remote-as 17
host1(config-router)#
neighbor 10.2.2.4 route-map commtrc out
host1(config-router)#
exit
host1(config)#
route-map commtrc permit 1
host1(config-route-map)#
match community 1
host1(config-route-map)#
set metric 20
host1(config-route-map)#
exit
host1(config)#
route-map commtrc permit 2
host1(config-route-map)#
match community 2
host1(config-route-map)#
set metric 75
host1(config-route-map)#
exit
host1(config)#
route-map commtrc permit 3
host1(config-route-map)#
match community 3
host1(config-route-map)#
set metric 85
Copyright © 2010, Juniper Networks, Inc.
38
JunosE 11.2.x IP Services Configuration Guide
Summary of Contents for JUNOSE 11.2.X IP SERVICES
Page 6: ...Copyright 2010 Juniper Networks Inc vi...
Page 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x IP Services Configuration Guide...
Page 18: ...Copyright 2010 Juniper Networks Inc xviii JunosE 11 2 x IP Services Configuration Guide...
Page 22: ...Copyright 2010 Juniper Networks Inc xxii JunosE 11 2 x IP Services Configuration Guide...
Page 28: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x IP Services Configuration Guide...
Page 116: ...Copyright 2010 Juniper Networks Inc 90 JunosE 11 2 x IP Services Configuration Guide...
Page 144: ...Copyright 2010 Juniper Networks Inc 118 JunosE 11 2 x IP Services Configuration Guide...
Page 230: ...Copyright 2010 Juniper Networks Inc 204 JunosE 11 2 x IP Services Configuration Guide...
Page 262: ...Copyright 2010 Juniper Networks Inc 236 JunosE 11 2 x IP Services Configuration Guide...
Page 294: ...Copyright 2010 Juniper Networks Inc 268 JunosE 11 2 x IP Services Configuration Guide...
Page 328: ...Copyright 2010 Juniper Networks Inc 302 JunosE 11 2 x IP Services Configuration Guide...
Page 345: ...PART 2 Index Index on page 321 319 Copyright 2010 Juniper Networks Inc...
Page 346: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x IP Services Configuration Guide...
Page 356: ...Copyright 2010 Juniper Networks Inc 330 JunosE 11 2 x IP Services Configuration Guide...