apply-label (VPN instance IPv6 address family view)

Function

The apply-label command configures a label allocation mode in a VPN instance IPv6 address family.

The undo apply-label per-instance command restores the default label allocation mode in a VPN instance IPv6 address family.

The command varies in transport and router modes. For detailed differences, see "Differences Between Commands in Transport and Router Modes." The command implementation in router mode is described here.

By default, the VPN instance IPv6 address family assigns mode is a unique label to each instance.

Format

apply-label { per-instance | per-nexthop | per-route }

undo apply-label { per-instance | per-nexthop | per-route }

Parameters

Parameter Description Value
per-instance

Enables the one-label-per-VPN-instance mode.

-

per-nexthop

Enables the one-label-per-next-hop mode.

-

per-route

Enables the one-label-per-route mode.

-

Views

VPN instance IPv6 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l3vpn write

Usage Guidelines

Usage Scenario

By default, all routes of a VPN instance IPv6 address family is assigned a specified label. If a large number of routes of the VPN instance IPv6 address family need to apply for labels, the apply-label per-instance command saves label resources of PEs and lowers the requirements for PE capacities.

In private network packet forwarding, labels are allocated based on routes and next hops. Packets are forwarded based on the next hop information of the labels, and do not need to be forwarded again. The forwarding speed is fast. However, one-label-per-instance label allocation requires devices to additionally search the routing table, lowering the forwarding speed. If label resources are sufficient and a rapid forwarding speed is required, you can configure the one-label-per-route or one-label-per-next-hop mode.

Prerequisites

An RD has been configured using the route-distinguisher command in the VPN instance IPv6 address family view.

Precautions

Changing the label allocation mode will cause re-advertisement of the routes of a VPN instance IPv6 address family and transient service interruption. Exercise caution when using the command.

This command and the apply-label per-nexthop pop-go commands are overwritten. The latest configuration overrides the previous one.

This command applies only to the scenario where MPLS labels are allocated to VPN instances.

Example

# Configure all VPN routes in the VPN instance IPv6 address family to use the one-label-per-next-hop mode.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv6-family
[*HUAWEI-vpn-instance-vpn1-af-ipv6] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpn1-af-ipv6] apply-label per-nexthop
# Configure a PE to assign only one label to each VPNv6 route.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv6-family
[*HUAWEI-vpn-instance-vpn1-af-ipv6] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpn1-af-ipv6] apply-label per-route
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >