- community name {
- invert-match;
- members [ community-ids ];
- }
- [edit logical-systems logical-system-name policy-options],
- [edit policy-options]
Statement introduced before JUNOS Release 7.4.
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:community-value
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:administrator:assigned-number
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 Open Shortest Path First (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: Beginning with JUNOS Release 9.1, the AS number range has been extended to provide BGP support for 4-byte AS numbers as defined in RFC 4893, BGP Support for Four-octet AS Number Space. For extended communities, you can now specify an AS value in plain-number format in the range from 1 through 4,294,967,295. To configure an extended community for a target or an origin that includes a 4-byte AS number in plain-number format, you must append the letter “L” to the end of the number. For example, to configure a target for the 4-byte AS number 334,324 with an assigned number of 132, include the following statement: target:334324L:132. Beginning with JUNOS Release 9.2, you can also configure a 4-byte AS number using the AS-dot notation format of two integer values 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 of 65546 in plain-number format is represented as 1.10 in the AS-dot notation format. The target and origin extended communities support the AS-dot notation format for 4-byte AS numbers. |
See Configuring Communities, Inverting Community Matches, and Configuring Link Bandwidth.
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.