- [edit dynamic policy-options],
- [edit logical-systems logical-system-name policy-options],
- [edit policy-options]
Statement introduced before JUNOS Release 7.4.
Support for configuration in the dynamic database introduced in JUNOS Release 9.5.
Define a community or extended community for use in a routing policy match condition.
name—Name that identifies the regular expression. The name can contain letters, numbers, and hyphens (-) and can be up to 255 characters. To include spaces in the name, enclose it in quotation marks (“ ”).
invert-match—Invert the results of the community expression matching.
members community-ids—One or more community members. If you specify more than one member, you must enclose all members in brackets.
The format for community-ids is:
as-number is the AS number and can be a value in the range from 0 through 65,535. 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 for communities as one of the following well-known community names, which are defined in RFC 1997, BGP Communities Attribute:
You can 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.
The format for extended community-ids is the following:
type is the type of extended community and can be either a bandwidth, target, origin, domain-id, src-as, or rt-import community or a 16-bit number that identifies a specific BGP extended community. The target community identifies the destination to which the route is going. The origin community identifies where the route originated. The domain-id community identifies the OSPF domain from which the route originated. The src-as community identifies the autonomous system from which the route originated. The rt-import community identifies the route to install in the routing table.
![]() |
Note: For src-as, you can specify only an AS number and not an IP address. For rt-import, you can specify only an IP address and not an AS number. |
administrator is the administrator. It is either an AS number or an IPv4 address prefix, depending on the type of extended community.
assigned-number identifies the local provider.
The format for linking a bandwidth with an AS number is:
bandwidth:as-number:bandwidth
as-number specifies the AS number and bandwidth specifies the bandwidth in bytes per second.
![]() |
Note: In JUNOS Release 9.1 and later, you can specify 4-byte AS numbers as defined in RFC 4893, BGP Support for Four-octet AS Number Space, as well as the 2-byte AS numbers that are supported in earlier releases of the JUNOS software. In plain-number format, you can configure a value in the range from 1 through 4,294,967,295. To configure a target or origin extended community that includes a 4-byte AS number in the plain-number format, append the letter “L” to the end of number. For example, a target community with the 4-byte AS number 334,324 and an assigned number of 132 is represented as target:334324L:132. 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. |
See Overview of BGP Communities and Extended Communities as Routing Policy Match Conditions, Defining BGP Communities and Extended Communities for Use in Routing Policy Match Conditions, and Configuring Dynamic Routing Policies.
![]() |
Note: We recommend that you use the dynamic database with caution because it is not subject to the same verification required by the commit process for the standard configuration database. |
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.