Configuring a Community Attribute-Related Policy

A policy that references a community attribute needs to be configured before the community attribute is set for routing information.

Procedure

  • Configure a community attribute-based route-policy.
    1. Run system-view

      The system view is displayed.

    2. Run route-policy route-policy-name { deny | permit } node node

      A route-policy node is created, and the route-policy view is displayed.

    3. (Optional) Configure if-match clauses for the route-policy. Community attributes can be added only to the routes that match if-match clauses, and the community attributes of only the routes that match the if-match clauses can be modified. For details about the configuration, see (Optional) Configuring an if-match Clause.
    4. Configure community or extended community attributes for BGP4+ routes.

      • Run apply community { cmntyValue | cmntyNum | internet | no-advertise | no-export | no-export-subconfed } &<1-32> [ additive ]

        Community attributes are set for BGP4+ routes.

        A maximum of 32 community attributes can be configured in the apply community command at a time.

      • Run apply extcommunity { rt extCmntyValue } &<1-16> [ additive ]

        VPN-Target extended community attributes are set for BGP4+ routes.

      • Run apply extcommunity soo { site-of-origin } &<1-16> additive

        Site-of-Origin (SoO) extended community attributes are set for BGP4+ routes.

    5. Run commit

      The configuration is committed.

  • Configure a community attribute-based route-filter.
    1. Run system-view

      The system view is displayed.

    2. Run xpl route-filter route-filter-name or edit xpl route-filter route-filter-name

      A route-filter is created, and the route-filter view is displayed.

    3. (Optional) Configure XPL common and condition clauses. Community attributes can be added only to the routes that match XPL clauses, and the community attributes of only the routes that match the XPL clauses can be modified. For details about the configuration, see Common Clauses and Condition Clauses in "XPL Configuration."
    4. Configure community or extended community attributes for BGP4+ routes.

    5. Run commit

      The configuration is committed.

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