The if-match route-type command configures a filtering rule based on route types.
The undo if-match route-type command cancels the configuration.
By default, no filtering rule based on route types is configured.
if-match route-type { external-type1 | external-type2 | external-type1or2 | is-is-level-1 | is-is-level-2 | internal | nssa-external-type1 | nssa-external-type2 | nssa-external-type1or2 }
if-match route-type { ibgp | ebgp }
if-match route-type mvpn { 1 | 3 } *
if-match route-type evpn { ad | es | inclusive | join | leave | mac | prefix | smet } *
undo if-match route-type { external-type1 | external-type2 | external-type1or2 | is-is-level-1 | is-is-level-2 | internal | nssa-external-type1 | nssa-external-type2 | nssa-external-type1or2 }
undo if-match route-type { ibgp | ebgp }
undo if-match route-type mvpn
undo if-match route-type evpn
| Parameter | Description | Value |
|---|---|---|
| external-type1 |
Indicates OSPF external Type 1 routes. |
- |
| external-type2 |
Indicates OSPF external Type 2 routes. |
- |
| external-type1or2 |
Indicates OSPF external routes. |
- |
| is-is-level-1 |
Indicates IS-IS Level-1 routes. |
- |
| is-is-level-2 |
Indicates IS-IS Level-2 routes. |
- |
| internal |
Indicates internal routes, including OSPF inter-area routes and intra-area routes. |
- |
| nssa-external-type1 |
Indicates NSSA external Type 1 routes. |
- |
| nssa-external-type2 |
Indicates NSSA external Type 2 routes. |
- |
| nssa-external-type1or2 |
Indicates NSSA external routes. |
- |
| ibgp |
Indicates IBGP routes. |
- |
| ebgp |
Indicates EBGP routes. |
- |
| mvpn |
Indicates MVPN routes. |
- |
| 1 |
Indicates intra-AS I-PMSI A-D routes. |
- |
| 3 |
Indicates S-PMSI A-D routes. |
- |
| evpn |
Indicates EVPN routes. |
- |
| ad |
Indicates EVPN Ethernet A-D routes. |
- |
| es |
Indicates EVPN Ethernet segment routes. |
- |
| inclusive |
Indicates EVPN inclusive multicast routes. |
- |
| join |
Indicates EVPN IGMP Join Synch routes. |
- |
| leave |
Indicates EVPN IGMP Leave Synch routes. |
- |
| mac |
Indicates EVPN MAC advertisement routes. |
- |
| prefix |
Indicates EVPN IP prefix routes. |
- |
| smet |
Indicates EVPN SMET routes. |
- |
Usage Scenario
To filter routes based on the route type, run the if-match route-type command.
Prerequisites
A route-policy has been configured using the route-policy command.
Precautions
For the same node in a route-policy, if two if-match route-type clauses are the same, the latter if-match route-type will not override the previous one. After the latter clause is configured, both clauses take effect. The relationship between if-match route-type clauses is "OR". That is, the actions defined in apply clauses can be performed on a route if the route matches one of the filtering 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.
NOTE: 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.<HUAWEI> system-view [~HUAWEI] route-policy policy permit node 10 [*HUAWEI-route-policy] if-match route-type nssa-external-type1
<HUAWEI> system-view [~HUAWEI] route-policy policy permit node 10 [*HUAWEI-route-policy] if-match route-type mvpn 1