Professional Documents
Culture Documents
community name {
invert-match;
members [ community-ids ];
}
[edit policy-options]
[edit logical-systems logical-system-name policy-options]
name identifies the community. It can contain letters, numbers, and hyphens (-) and can be up to
255 characters long. To include spaces in the name, enclose the entire name in quotation marks
(“ ”).
community-ids identifies one or more members of the community. Each community ID consists
of two components, which you specify in the following format:
as-number:community-value;
You can also include one of the following well-known community names (defined in RFC 1997,
BGP Communities Attribute) in the community-ids option for the members statement:
When specifying the members of a named BGP community (in the members [ community-ids ]
statement), you can use UNIX-style regular expressions to specify the AS number and the
member identifier. A regular expression consists of two components, which you specify in the
following format:
term operator;
Community regular expressions are identical to the UNIX regular expressions. Both implement
the extended (or modern) regular expressions as defined in POSIX 1003.2.
78:65000
AS number is 56. Community value is any number that ^56:(2.*)$ 56:2
starts with 2.
56:222
56:234
AS number is any number. Community value is any number ^(.*):(.*[579])$ 1234:5
that ends with 5, 7, or 9.
78:2357
34:65009
AS number is 56 or 78. Community value is any number ^((56) | (78)): 56:22
that starts with 2 and ends with 2 through 8. (2.*[2–8])$
56:21197
78:2678
community name {
invert-match;
members [ community-ids ];
}
You can include this statement at the following hierarchy levels:
[edit policy-options]
[edit logical-systems logical-system-name policy-options]
name identifies the community. It can contain letters, numbers, and hyphens (-) and can be up to
255 characters long. To include spaces in the name, enclose the entire name in quotation marks
(“ ”).
community-ids identifies one or more members of the community. Each community ID consists
of three components, which you specify in the following format:
type:administrator:assigned-number
type is the type of extended community and can be either the 16-bit numerical identifier of a
specific BGP extended community or one of these types:
Note: The link bandwidth attribute does not work concurrently with
per-prefix load balancing.
src-as—Identifies the AS from which the route originated. You must specify an AS
number, not an IP address.
In JUNOS Release 9.2 and later, you can also use AS-dot notation when defining a 4-byte AS
number for the target and origin extended communities. Specify two integers joined by a period:
16-bit high-order value in decimal.16-bit low-order value in decimal. For example, the 4-byte
AS number represented in plain-number format as 65546 is represented in AS-dot notation
as 1.10.
For more information about configuring AS numbers, see the JUNOS Routing Protocols
Configuration Guide.
Configure a target community with an administrative field of 10458 and an assigned number of
20:
[edit policy-options]
community test-a members [ target:10458:20 ];
Configure a target community with an administrative field of 10.1.1.1 and an assigned number of
20:
[edit policy-options]
community test-a members [ target:10.1.1.1:20 ];
Configure an origin community with an administrative field of 10.1.1.1 and an assigned number
of 20:
[edit policy-options]
community test-a members [ origin:10.1.1.1:20 ];
invert-match;