The Community attribute is a private BGP route attribute. It is transmitted between BGP peers and is not restricted within an AS. The Community attribute allows a group of BGP devices in multiple ASs to share the same routing policies, which simplifies routing policy applications and facilitates routing policy management and maintenance. A BGP device can add or change the community attributes of routes to be advertised.
The system view is displayed.
A node is configured for a route-policy, and the view of the route-policy is displayed.
By default, all routes meet matching rules. For details, see (Optional) Configuring an if-match Clause.
Run apply community { community-number | aa:nn | internet | no-advertise | no-export | no-export-subconfed } &<1-32> [ additive ]
Common community attributes are configured for BGP routes.
Run apply extcommunity { rt { as-number:nn | ipv4-address:nn } } &<1-16> [ additive ]
An extended community attribute (route-target) is configured.
Extended community attributes are extensions to community attributes in services. Currently, only the route-target attribute is supported in VPN.
Return to the system view.
The BGP view is displayed.
Run ipv4-family { unicast | multicast }
The IPv4 address family view is displayed.
Run ipv6-family [ unicast ]
The IPv6 address family view is displayed.
The Community attribute is added to the routes advertised to BGP peers or peer groups.
The Community attribute is added to the routes received from BGP peers or peer groups.
The Community attribute is added to the routes imported by BGP in import mode.
The Community attribute is added to the routes imported by BGP in network mode.
Step 9 is required only when the Community attribute needs to be added to the routes advertised to BGP peers or peer groups.
Run peer { ipv4-address | group-name | ipv6-address } advertise-community
BGP is allowed to advertise community attributes to BGP peers or peer groups.
By default, BGP does not advertise community attributes to any peer or peer group.
Run the peer { ipv4-address | group-name | ipv6-address } advertise-ext-community command to advertise an extended community attribute to a specified peer or peer group.
Run the ext-community-change enable command to enable the device to change extended community attributes using a routing policy.
By default, BGP peers cannot change extended community attributes using a route-policy; specifically, BGP peers advertise only the extended community attributes carried in routes to a specified peer or peer group, and the peer route-policy command cannot be used to modify the extended community attributes.