< Home

Creating a Route-Policy

By Creating a Route-Policy, you can set attributes for the imported routes according to networking requirements.

Context

A Route-Policy is used to match routes or certain route attributes, and to change these attributes when the matching rules are met.

A Route-Policy consists of multiple nodes. Each node is classified into the following clauses:

  • if-match clauses: define the matching rules. The matching rules are used by the routes that match the Route-Policy. The matching objects refer to some attributes of the route.
  • apply clauses: specify actions, that is, configuration commands used to modify certain attributes.

Procedure

  1. Access the system view.

    system-view

  2. Create a node of the Route-Policy and access the Route-Policy view.

    route-policy route-policy-name { permit | deny } node node

    • The parameter permit specifies a node in a Route-Policy in permit mode. If a route matches the node, the router performs actions defined by the apply clauses and the matching is complete.

    • The parameter deny specifies a node in a Route-Policy in deny mode. In deny mode, the apply clauses are not used. If a route entry matches all the if-match clauses of the node, the route is denied by the node and the next node is not matched. If the entry does not match all the clauses, the next node is matched.

    If multiple nodes are defined in a Route-Policy, at least one of them should be in permit mode. When the parameter route-policy is used to filter routes, note the following:

    • If a route does not match any node, it is denied by the Route-Policy.
    • If all the nodes in the routing policy are in deny mode, all the routes are denied by the Route-Policy.

    When a Route-Policy is used to filter the routing information, the node with the smaller value of node is tested first.

  3. (Optional) Configure a description for the routing policy.

    description text

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