< Home

Configuring the BGP4+ Community Attribute

The community attribute is used to simplify the management of routing policies. The management scope of the community attribute is far larger than that of the peer group. The community attribute can control the routing policies of multiple BGP4+ routers.

Procedure

  • Configure the routers to advertise the community attribute to the peers.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv6 unicast address family view.

      ipv6-family unicast

    4. Run the following commands to advertise community attributes to the peer group:

      • Configure the BGP device to send a standard community attribute to its peer or peer group:

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

        routers are configured to advertise the standard community attribute to a peer group.

      • Configure the BGP device to send an extended community attribute to its peer or peer group:

        • Run the peer { ipv4-address | ipv6-address | group-name } advertise-ext-community command to advertise an extended community attribute to a specified peer or peer group.
        • (Optional) 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.

  • Apply the routing policies to the advertised routing information.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Access the BGP IPv6 unicast address family view.

      ipv6-family unicast

    4. Configure the outbound routing policies.

      peer { ipv4-address | ipv6-address | group-name } route-policy route-policy-name export

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >