< Home

apply-label per-nexthop

Function

The apply-label per-nexthop command enables the ASBR to allocate labels for IPv4 VPN routes or IPv6 VPN routes based on the next hop.

The undo apply-label per-nexthop command disables the ASBR from allocating labels for IPv4 VPN routes or IPv6 VPN routes based on the next hop.

By default, next-hop-based label allocation for VPN routes is disabled on the ASBR, and a label is allocated to each VPN instance.

Format

apply-label per-nexthop

undo apply-label per-nexthop

Parameters

None

Views

BGP-VPNv4 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In inter-AS VPN Option B or HoVPN networking, if MPLS label resources on the ASBR or SPE are insufficient for the advertised VPNv4 or VPNv6 routes to use, the apply-label per-nexthop command can be run to minimize MPLS label consumption on the ASBR or SPE.

By default, the ASBR or SPE allocates a label to each VPNv4 or VPNv6 route when advertising it to an MP-BGP peer. If the apply-label per-nexthop command is run, the ASBR or SPE will allocate one label to all the routes with the same next hop and outgoing label. To make the routes learned from the same next hop have the same outgoing label, run the apply-label per-instance command on the PE. Otherwise, the effect of the apply-label per-nexthop command will be affected.

Configuration Impact

After next-hop-based label allocation is enabled or disabled, the label allocated by the ASBR to a route changes, which leads to a transient loss of VPN packets.

Example

# In the BGP-VPNv4 view, enable the ASBR to allocate labels to IPv4 VPN routes based on the next hop.

<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] ipv4-family vpnv4
[HUAWEI-bgp-af-vpnv4] apply-label per-nexthop
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >