if-match mpls-label

Function

The if-match mpls-label command configures a filtering rule based on MPLS labels.

The undo if-match mpls-label command cancels the configuration.

By default, no filtering rule based on MPLS labels is configured.

Format

if-match { mpls-label | mpls-label2 } *

undo if-match { mpls-label | mpls-label2 } *

Parameters

Parameter Description Value
mpls-label2

Configures an MPLS-label2-based matching rule for IRB routes.

-

Views

Route-policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

In an inter-AS VPN Option C or CSC scenario, you can use the if-match mpls-label command to match routes that carry MPLS labels.

In an EVPN scenario, you can run the if-match mpls-label2 command to filter IRB routes that carry MPLS-label2 labels.

Prerequisites

A route-policy has been configured using the route-policy command.

Example

# Define a filtering rule to permit the routes with MPLS labels.
<HUAWEI> system-view
[~HUAWEI] route-policy policy permit node 10
[*HUAWEI-route-policy] if-match mpls-label
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >