< Home

(Optional) Configuring an apply Clause

Context

An apply clause specifies the action of setting attributes for routes that have matched a routing policy node. If a node does not have an apply clause configured, the node will only filter routes. If one or more apply clauses are configured in a node, all the apply clauses are applied to routes that have matched the node.

Procedure

  1. Run system-view

    The system view is displayed.

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

    The route-policy view is displayed.

  3. Run the following commands as required to configure apply clauses. A node can have multiple or no apply clauses.

    • Run apply as-path { { as-number-plain | as-number-dot } &<1-10> { additive | overwrite } | none overwrite }

      An apply clause is configured to change the AS_Path attribute of BGP routes.

    • Run apply backup-interface interface-type interface-number

      An apply clause is configured to change the backup outbound interface of routes.

    • Run apply backup-nexthop { ip-address | auto }

      An apply clause is configured to change the backup next hop of routes.

    • Run apply comm-filter { basic-comm-filter-number | adv-comm-filter-number | comm-filter-name } delete

      An apply clause is configured to delete the specified community attribute of BGP routes.

      To delete the community attributes, you can run the ip community-filter command several times to configure community attributes one by one, and apply the routing policy containing the apply comm-filter delete command to delete these community attributes. If multiple community attributes are specified in one community filter, none of them can be deleted.

    • Run apply community none

      An apply clause is configured to delete all community attributes of BGP routes.

    • Run apply community { community-number | aa:nn | internet | no-advertise | no-export | no-export-subconfed } &<1-32> [ additive ]

      An apply clause is configured to set the community attributes of BGP routes.

    • Run apply cost [ + | - ] cost

      The route cost is set.

    • Run the following commands as required to set the cost type of a route:

      • Run apply cost-type { external | internal }

        The IS-IS cost type is set.

      • Run apply cost-type { type-1 | type-2 }

        The OSPF cost type is set.

    • Run apply dampening half-life-reach reuse suppress ceiling

      The dampening parameters of EBGP routes are set.

    • Run apply extcommunity { rt { as-number:nn | 4as-number:nn | ipv4-address:nn } }&<1-16> [ additive ]

      An extended community attribute (route-target) of BGP is set.

    • Run apply ip-address next-hop { ipv4-address | peer-address }

      The next-hop address of the IPv4 route is set.

    • Run apply ipv6 next-hop { peer-address | ipv6-address }

      The next-hop address of the IPv6 route is set.

    • Run apply isis { level-1 | level-1-2 | level-2 }

      The level of the IS-IS route is set.

    • Run apply local-preference preference

      The local preference for BGP routes is set.

    • Run apply origin { egp { as-number-plain | as-number-dot } | igp | incomplete }

      The Origin attribute of BGP routes is set.

    • Run apply ospf { backbone | stub-area }

      An OSPF area into which routes are imported is set.

    • Run apply preference preference

      The preference of the routing protocol is set.

    • Run apply preferred-value preferred-value

      A preferred value is set for BGP routes.

    • Run apply tag tag

      The route tag is set.

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