Community Lists
For a community list, the input string is the community attribute of the routes to which
the list is applied using a
route-map
command. If the community attribute matches the
regular expression in the community list, the route matches the community list.
Example
The following commands apply route map 5 to routes forwarded to BGP peer 10.5.5.4.
Route map 5 uses a regular expression to match community numbers ending with 305,
setting the weight of matching routes to 150.
host1(config-router)#
neighbor 10.5.5.4 remote-as 425
host1(config-router)#
neighbor 10.5.5.4 route-map 5 out
host1(config-router)#
exit
host1(config)#
route-map 5 permit 10
host1(config-route-map)#
match community 305$
host1(config-route-map)#
set weight 150
Community Numbers
When you use a regular expression to match a community number, use the appropriate
format for the community number in the community list. If you issue the
ip bgp-community
new-format
command, the community number has the format
AA
:
NN
where
AA
is a
number that identifies the autonomous system, and
NN
is a number that identifies the
community within the autonomous system. Otherwise, the community number is an
integer in the range 1–4294967295.
Metacharacters
Each regular expression consists of one or more metacharacters and zero or more
complete or partial AS or community numbers. Table 5 on page 43 describes the
metacharacters supported for regular expression pattern-matching.
Table 5: Supported Regular Expression Metacharacters
Description
Metacharacter
Matches the beginning of the input string.
Alternatively, when used as the first character within brackets—[^ ]—matches
any number except the ones specified within the brackets.
^
Matches the end of the input string.
$
Matches any single character, including white space.
.
Matches zero or more sequences of the immediately previous character or
pattern.
*
Matches one or more sequences of the immediately previous character or
pattern.
+
Matches zero or one sequence of the immediately previous character or pattern.
?
43
Copyright © 2010, Juniper Networks, Inc.
Chapter 1: Configuring Routing Policy
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...