apply-label per-route (BGP-IPv6 unicast address family view)

Function

The apply-label per-route command enables the one label per route mode in the BGP-IPv6 unicast address family.

The apply-label per-route pop-go command configures the egress of a BGP LSP to forward each labeled data packet (received from the LSP) through the outbound interface found in the incoming label map (ILM) based on the label carried in the packet.

The undo apply-label per-route command restores the default configuration.

By default, the one label per route mode is used in the BGP-IPv6 unicast address family; after the egress of a BGP LSP receives a labeled data packet from the LSP, the egress removes the label of the data packet, and forwards the packet based on a forwarding entry found in the IP forwarding table according to the longest match rule.

Format

apply-label per-route

apply-label per-route pop-go

undo apply-label per-route [ pop-go ]

Parameters

None

Views

BGP-IPv6 unicast address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

In a BGP 6PE scenario in which the apply-label per-route pop-go command is run on the egress of a BGP LSP, after the egress receives a labeled data packet from the LSP, the egress directly searches the ILM for an outbound interface based on the label carried in the packet, removes the label, and then forwards the packet through the found outbound interface. With this configuration, the egress no longer searches the IP forwarding table according to the longest match rule during packet forwarding.

Example

# Configure the egress of a BGP LSP to forward a data packet received from the LSP through the outbound interface found in the ILM based on the label carried in the packet.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv6-family unicast
[*HUAWEI-bgp-af-ipv6] apply-label per-route pop-go
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >