longest-match

Function

The longest-match command configures the inter-domain LDP extension capability and enables LDP to search for routes for establishing label switched paths (LSPs) based on the longest match rule.

The undo longest-match command restores the default configuration.

By default, LDP searches for routes for establishing LSPs based on the exact matching rule.

Format

longest-match

undo longest-match

Parameters

None

Views

MPLS-LDP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mpls-ldp write

Usage Guidelines

Usage Scenario

On a large-scale network, multiple Interior Gateway Protocol (IGP) areas usually need to be configured for flexible network deployment and fast route convergence. In this situation, when advertising routes between IGP areas, to prevent a large number of routes from consuming too many resources, an area border router (ABR) needs to aggregate the routes in an area and then advertise the aggregated route to neighbor IGP areas. By default, when establishing LSPs, LDP searches the routing table for the route that exactly matches the forwarding equivalence class (FEC) carried in the received Label Mapping message. For aggregated routes, only liberal LDP LSPs, not inter-area LDP LSPs, can be set up.

In this case, you can run the longest-match command to enable LDP to search for routes or establishing inter-area LDP LSPs based on the longest match rule.

Prerequisites

MPLS LDP has been enabled globally using the mpls ldp command in the system view.

Precautions

Configuring this command is not allowed during LDP GR.

Example

# Enable LDP to search for routes for establishing LDP LSPs based on the longest match rule.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls ldp
[*HUAWEI-mpls-ldp] longest-match
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >