< Home

if-match route-type

Function

The if-match route-type command sets a matching rule that is based on the route type.

The undo if-match route-type command deletes the matching rule based on the specified route type.

By default, no matching rule based on the route type is configured.

Product

Support

S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S

Supported.

S2720-EI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, and S6720S-LI

Not supported.

Format

if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | is-is-level-1 | is-is-level-2 | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 }

undo if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | is-is-level-1 | is-is-level-2 | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 }

Parameters

Parameter Description Value
external-type1 Indicates OSPF external Type 1 routes. -
external-type1or2 Indicates OSPF external routes. -
external-type2 Indicates OSPF external Type 2 routes. -
internal Indicates internal routes, including OSPF inter-area routes and intra-area routes. -
is-is-level-1 Indicates IS-IS Level-1 routes. -
is-is-level-2 Indicates IS-IS Level-2 routes. -
nssa-external-type1 Indicates NSSA external Type 1 routes. -
nssa-external-type1or2 Indicates NSSA external routes. -
nssa-external-type2 Indicates NSSA external Type 2 routes. -

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match route-type command to filter OSPF or IS-IS routes based on the route type.

Multiple if-match route-type clauses can be specified. The relationship between if-match route-type clauses is "OR". The relationship between if-match clauses is "AND".

Prerequisites

The if-match route-type command can be used only after the route-policy command is used.

Precautions

The routing policy matches routes based on the route type. Routes that match the route type will be checked by other if-match clauses of this node. Routes that do not match the route type will be checked by the next node.

For the same node in a routing policy, if two if-match route-type clauses are the same, the latter if-match route-type will not override the previous if-match route-type. After the latter clause is configured, both clauses take effect simultaneously. The relationship between if-match route-type clauses is "OR". That is, the actions defined by apply clauses can be performed on a route as long as the route meets one of the matching rules. For example, if both the if-match route-type is-is-level-1 and if-match route-type external-type1or2 commands are configured on the same node of a route policy, both IS-IS Level-1 routes and OSPF external routes can match the route policy.

external-type1or2 refers to external-type1 or external-type2. For the same node in a route policy, configuring both the if-match route-type external-type1 and if-match route-type external-type2 is equivalent to configuring the if-match route-type external-type1or2 command. The two operations generate the same configuration file.

Similarly, nssa-external-type1or2 refers to nssa-external-type1 or nssa-external-type2. For the same node in a route policy, configuring both the if-match route-type nssa-external-type1 and if-match route-type nssa-external-type2 commands is equivalent to configuring the if-match route-type nssa-external-type1or2 command. The two operations generate the same configuration file.

Example

# Define a rule to match the routes of the specified type.

<HUAWEI> system-view
[HUAWEI] route-policy policy permit node 10
[HUAWEI-route-policy] if-match route-type nssa-external-type1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >