No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010

This document describes the concepts and configuration procedures of IP Service features on the device, and provides the configuration examples.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
(Optional) Configuring an if-match Clause

(Optional) Configuring an if-match Clause

Context

An if-match clause defines matching rules related to route filters and attributes in a routing policy.

If no if-match clause is configured for a node in a routing policy, routes match the routing policy in this node. If one or more if-match clauses are configured in a node, the relationship between the clauses is "AND". This means that a route matches this node only when they match all the if-match clauses in this node. This rule does not apply to if-match as-path-filter, if-match community-filter, if-match extcommunity-filter, if-match interface, or if-match route-type clauses. The relationship between these clauses is "OR", and the relationship between these clauses and other if-match clauses is "AND". For example, if multiple if-match as-path-filter clauses are configured in a node, the relationship between these clauses is "OR", and the relationship between these clauses and other if-match clauses is "AND".

NOTE:

If an if-match clause defines a filter that is not configured, all routes match this if-match clause by default.

The if-match acl and if-match ip-prefix commands cannot be used together in the same node. When both the commands are used in a node, the most recently configured one overrides the previous one.

When modifying the configurations of cooperative routing policies with multiple if-match clauses, it is recommended that you also perform the configuration task of Controlling the Valid Time of Routing Policies. Otherwise, an incomplete routing policy will cause route flapping.

Procedure

  1. Run system-view

    The system view is displayed.

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

    The routing policy view is displayed.

  3. Configure if-match clauses in any sequence for a routing policy according to your network requirements.

    • Run if-match acl { acl-number | acl-name }

      An if-match clause is configured to match the basic ACL.

      When a route-policy is configured to filter routes:
      • If the action specified in an ACL rule is permit, a route that has matched this rule is considered to have passed the check by the if-match clause.

      • If the action specified in an ACL rule is deny, a route that has matched this rule is considered to have failed the check by the if-match clause.

      • If a route has not matched any ACL rules, the route is considered to have failed the check by the if-match clause.

      • If an ACL does not contain any rules, all routes are considered to have failed the check by the if-match clause.

      • In a route-policy where the first node is a permit node, if a route has passed the check by the if-match clause, the system will take the action specified in the apply clause on this route. If the route has not passed the check by the if-match clause, the system will take the action specified in the apply clause in the second node in the route-policy.

      • In a route-policy where the first node is a deny node, if a route has passed the check by the if-match clause, the system will not take the action specified in the apply clause on this route. If the route has not passed the check by the if-match clause, the system will take the action specified in the apply clause in the second node in the route-policy.

    • Run if-match as-path-filter { as-path-filter-number &<1-16> | as-path-filter-name }

      An if-match clause is configured to match AS_Path filters.

    • Run either of the following commands as required to configure an if-match clause based on community filters:
      • if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-filter-num } &<1-16>
      • if-match community-filter comm-filter-name [ whole-match ]
    • Run if-match extcommunity-filter { { basic-extcomm-filter-num | adv-extcomm-filter-num } &<1-16> | extcomm-filter-name }

      An if-match clause is configured to match extended community filters.

    • Run if-match cost cost

      An if-match clause is configured to match the route cost of routes.

    • Run if-match interface { interface-type interface-number } &<1-16>

      An if-match clause is configured to match the outbound interface of routes.

    • Run if-match ip { next-hop | route-source | group-address } { acl { acl-number | acl-name } | ip-prefix ip-prefix-name }

      An if-match clause is configured to match the next hop or source address of IPv4 routes.

    • Run if-match ipv6 { address | next-hop | route-source } prefix-list ipv6-prefix-name

      An if-match clause is configured to match the destination address, next hop, or source address of IPv6 routes.

    • Run if-match ip-prefix ip-prefix-name

      An if-match clause is configured to match the IP prefix list.

    • Run if-match mpls-label

      An if-match clause is configured to match the MPLS label of routes.

    • Run if-match rd-filter rd-filter-number

      An if-match clause is configured to match the RD filter.

    • Run the following commands as required to match the type of route:
      • Run if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 }

        An if-match clause is configured to match a specified type of OSPF routes.

      • Run if-match route-type { is-is-level-1 | is-is-level-2 }

        An if-match clause is configured to match a specified type of IS-IS routes.

    • Run if-match tag tag

      An if-match clause is configured to match the tag of routes.

Translation
Download
Updated: 2019-05-20

Document ID: EDOC1100034072

Views: 109871

Downloads: 158

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next