Configuring Community Attribute Advertisement

A community attribute defined in a routing policy takes effect only after community attribute advertisement is configured.

Procedure

  • Use a route-policy to define specific community attributes when configuring BGP community attribute advertisement.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family unicast

      The BGP-IPv4 unicast address family view is displayed.

    4. Run peer { ipv4-address | group-name } route-policy route-policy-name export

      An export route-policy is configured.

    5. Run either of the following commands as required to advertise community attributes to a specified peer or peer group.

      • To enable the device to advertise a standard community attribute to a specified peer or peer group, run the peer { ipv4-address | group-name } advertise-community command.

      • To enable the device to advertise an extended community attribute to a specified peer or peer group, run the peer { ipv4-address | group-name } advertise-ext-community command.

        After the peer advertise-ext-community command is run, BGP advertises the routes with extended community attributes to the specified peer or peer group. If the peer or peer group only needs to accept the routes but not the extended community attributes, you can run the peer discard-ext-community command on the peer or peer group to discard the extended community attributes from the received routing information.

    6. Run commit

      The configuration is committed.

  • Use a route-filter to define specific community attributes when configuring BGP community attribute advertisement.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family unicast

      The BGP-IPv4 unicast address family view is displayed.

    4. Run peer { ipv4-address | group-name } route-filter route-filter-name export

      An export route-filter is configured.

    5. Run either of the following commands as required to advertise community attributes to a specified peer or peer group.

      • To enable the device to advertise a standard community attribute to a specified peer or peer group, run the peer { ipv4-address | group-name } advertise-community command.

      • To enable the device to advertise an extended community attribute to a specified peer or peer group, run the peer { ipv4-address | group-name } advertise-ext-community command.

        After the peer advertise-ext-community command is run, BGP advertises the routes with extended community attributes to the specified peer or peer group. If the peer or peer group only needs to accept the routes but not the extended community attributes, you can run the peer discard-ext-community command on the peer or peer group to discard the extended community attributes from the received routing information.

        To enable the device to advertise the Link Bandwidth extended community attribute to a specified EBGP peer, run the peer advertise ebgp link-bandwidth command.

        To enable the device to convert the Link Bandwidth extended community attribute (optional non-transitive) carried in BGP routes to an optional transitive attribute before advertising the routes to other peers, run the peer advertise link-bandwidth transitive command.

        However, if a device changes the next-hop address of a received route carrying the Link Bandwidth extended community attribute to its own address, the device deletes this attribute before advertising it to other peers.

    6. Run commit

      The configuration is committed.

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