< Home

peer advertise-community (BGP)

Function

The peer advertise-community command configures routers to advertise the community attributes to a peer or peer group.

The undo peer advertise-community command cancels the existing configuration.

By default, the community attribute is not advertised to any peer or peer group.

Format

peer { group-name | ipv4-address | ipv6-address } advertise-community

undo peer { group-name | ipv4-address | ipv6-address } advertise-community

Parameters

Parameter Description Value

group-name

Specifies the name of the peer group.

The name is a string of 1 to 47 characters without any space. It is case-sensitive.

ipv4-address

Specifies the IPv4 address of the peer.

-

ipv6-address

Specifies the IPv6 address of the peer.

-

  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPN-Target address family view, and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 multicast address family view, BGP-VPN-Target address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer advertise-community command is used to configure a device to advertise a community attribute to its peer or peer group. If a device advertises a community attribute to its peer group, all the members of the peer group will inherit the community attribute. This simplifies the application of routing policies and facilitates route maintenance and management.

Prerequisites

A specific community attribute has been defined by in a routing policy.

Configuration Impact

If the peer advertise-community command is run to configure a device to advertise a community attribute to its peer group, all the members of the peer group will inherit the community attribute.

Precautions

To configure IPv6 provider edge (6PE), specify the address of the peer as an IPv4 unicast address in the IPv6 unicast address family view.

Example

# Advertise the community attributes to the peers.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] peer 1.1.1.2 advertise-community
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >