Configuring the Extended Communities Attribute
To configure extended communities, include the
communitystatement:communityname{invert-match;members [community-ids];}You can include this statement at the following hierarchy levels:
To include the community in a routing policy, include the
communitycondition in thefromstatement at the[edit policy-options policy-statementpolicy-nametermterm-name]hierarchy level:[edit policy-options]communitynamemembers [community-ids];policy-statementpolicy-name{termterm-name{from {communityname;}}}
nameidentifies one or more routers in the BGP extended community.
community-idsidentifies the type of extended community in the following format:type:administrator:assigned-number
typeis the type of extended community and can be either abandwidth,target,origin, ordomain-idcommunity. Thebandwidthcommunity sets up the bandwidth extended community. Thetargetcommunity identifies the destination to which the route is going. Theorigincommunity identifies where the route originated. Thedomain-idcommunity identifies the Open Shortest Path First (OSPF) domain from which the route originated.
administratoris the administrator. It is either an AS number or an IP version 4 (IPv4) address prefix, depending on the type of extended community.
assigned-numberidentifies the local provider.For information about the community attribute, see Configuring the Community Attribute.
NOTE: Regular expressions are not supported for extended communities.
Examples: Configuring the Extended Communities Attribute
Configure a target community with an administrative field of
10458and an assigned number of20:[edit]policy-options {community test-a members [target:10458:20];}Configure a target community with an administrative field of
1.1.1.1and an assigned number of20:[edit]policy-options {community test-a members [target:1.1.1.1:20];}Configure an origin community with an administrative field of
1.1.1.1and an assigned number of20:[edit]policy-options {community test-a members [origin:1.1.1.1:20];}