266
Usage guidelines
The COMMUNITY attribute is a group of specific data carried in update messages. A route can carry
one or more COMMUNITY attribute values (each is represented by a 4-byte integer). The receiving
router processes the route (for example, determining whether to advertise the route and the scope for
advertising the route) based on the COMMUNITY attribute values.
After you execute the
peer advertise-community
command, routing updates advertised to the peer carry
the
COMMUNITY attribute.
After you execute the
undo peer advertise-community
command, BGP, upon receiving a route with the
COMMUNITY attribute, removes the COMMUNITY attribute before sending the route to the peer or peer
group.
Examples
# In BGP IPv4 unicast instance view, advertise the COMMUNITY attribute to peer group
test
.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test advertise-community
# In BGP-VPN IPv4 unicast instance view, advertise the COMMUNITY attribute to peer group
test
.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer test advertise-community
# In BGP IPv6 unicast instance view, advertise the COMMUNITY attribute to peer group
test
.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test advertise-community
Related commands
•
apply community
•
if-match community
•
ip community-list
peer advertise-ext-community
Use
peer advertise-ext-community
to advertise the extended community attribute to a peer or peer
group.
Use
undo peer advertise-ext-community
to disable the extended community attribute advertisement to a
peer or peer group.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer
{
group-name
|
ip-address
}
advertise-ext-community
undo peer
{
group-name
|
ip-address
}
advertise-ext-community
In BGP IPv6 unicast instance view: