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 45 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.
+
Using Regular Expressions
■
45
Chapter 1: Configuring Routing Policy
Summary of Contents for IP SERVICES - CONFIGURATION GUIDE V 11.1.X
Page 6: ...vi...
Page 8: ...viii JUNOSe 11 1 x IP Services Configuration Guide...
Page 18: ...xviii Table of Contents JUNOSe 11 1 x IP Services Configuration Guide...
Page 20: ...xx List of Figures JUNOSe 11 1 x IP Services Configuration Guide...
Page 22: ...xxii List of Tables JUNOSe 11 1 x IP Services Configuration Guide...
Page 28: ...2 Chapters JUNOSe 11 1 x IP Services Configuration Guide...
Page 138: ...112 Monitoring J Flow Statistics JUNOSe 11 1 x IP Services Configuration Guide...
Page 286: ...260 Monitoring IP Tunnels JUNOSe 11 1 x IP Services Configuration Guide...
Page 312: ...286 Monitoring IP Reassembly JUNOSe 11 1 x IP Services Configuration Guide...
Page 357: ...Part 2 Index Index on page 333 Index 331...
Page 358: ...332 Index JUNOSe 11 1 x IP Services Configuration Guide...