By default, no Border Gateway Protocol (BGP) community information is associated with static routes. To associate community information with IPv4 routes, include the community statement:
-
static (defaults | route) {
-
community [ community-ids ];
- }
To associate community information with IPv6 routes, include the community statement:
-
rib inet6.0 static (defaults | route) {
-
community [ community-ids ];
- }
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.
community-ids is one or more community identifiers for either communities or extended communities.
The format for community identifiers is:
-
as-number:community-value
as-number is the autonomous system (AS) number and can be a value in the range from 1 through 65,534. community-value is the community identifier and can be a number in the range from 0 through 65,535.
You also can specify community-ids as one of the following well-known community names, which are defined in RFC 1997:
You can also explicitly exclude BGP community information with a static route using the none option. Include none when configuring an individual route in the route portion of the static statement to override a community option specified in the defaults portion of the statement.
![]() |
Note: Extended community attributes are not supported at the [edit routing-options] hierarchy level. You must configure extended communities at the [edit policy-options] hierarchy level. For information about configuring extended communities information, see the “Configuring the Extended Communities Attribute” section in the JUNOS Policy Framework Configuration Guide. |