[Contents]
[Prev]
[Next]
[Index]
[Report an Error]
Configuring
the Community Attribute
To create a named community and define the community
members, include the community statement:
-
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]
To include the community in a routing policy, include
the community condition in the from statement:
- [edit policy-options]
-
community name members [ community-ids ];
-
policy-statement policy-name {
-
- term term-name {
-
- from {
- community [ names ];
- }
- }
- }
 |
Note:
You can include the names of multiple communities
in the community match condition in the from statement.
If you do this, only one community needs to match for a match to occur.
The community matching is effectively a logical OR operation.
|
name identifies the
community or communities. 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 defines
one or more members of the community. It consists of two components,
which you specify in the following format:
-
as-number:community-value;
-
as-number—AS number
of the community member. It can be a value from 0 through 65,535.
For more information about configuring the AS number for the router
and the Border Gateway Protocol (BGP), see the JUNOS Routing
Protocols Configuration Guide. You can specify the AS number
in one of the following ways:
- AS number.
- Asterisk (*)—A wildcard character that matches all
AS numbers. (In the definition of the community attribute, the asterisk
also functions as described in Table 21.)
- Period (.)—A wildcard character that matches any
single digit in an AS number.
- Group of AS numbers—A single AS number or a group
of AS numbers enclosed in parentheses. Grouping the numbers in this
way allows you to perform a common operation on the group as a whole
and to give the group precedence. The grouped numbers can themselves
include regular expression operators. For more information about the
community regular expressions, see Configuring
the Community Attribute Using UNIX Regular Expressions.
-
community-value—Identifier
of the community member. It can be a number from 0 through 65,535.
You can specify the community value in one of the following ways:
- Community value number.
- Asterisk (*)—A wildcard character that matches all
community values. (In the definition of the community attribute, the
asterisk also functions as described in Table 21.)
- Period (.)—A wildcard character that matches any
single digit in a community value number.
- Group of community value numbers—A single community
value number or a group of community value numbers enclosed in parentheses.
Grouping the regular expression in this way allows you to perform
a common operation on the group as a whole and to give the group precedence.
The grouped path can itself include regular expression operators.
You also can specify community-id as one of the following well-known community names, which are
defined in RFC 1997, BGP Communities Attribute:
-
no-advertise—Routes in this community name
must not be advertised to other BGP peers.
-
no-export—Routes in this community must
not be advertised outside a BGP confederation boundary.
-
no-export-subconfed—Routes in this community
must not be advertised to external BGP peers, including peers
in other members’ ASs inside a BGP confederation.
Additionally, you can explicitly exclude BGP community
information with a static route by using the none option.
Include this option when configuring an individual route in the route portion to override a community option specified in the defaults portion.
See also Configuring the Extended Communities Attribute.
The following sections discuss the following topics:
[Contents]
[Prev]
[Next]
[Index]
[Report an Error]