To save label resources on an ASBR, you can enable next-hop-based label allocation on the ASBR. Note that next-hop-based label allocation and one label per instance need to be used together on the ASBR.
In a VPN Option B scenario, after next-hop-based label allocation is enabled on the ASBR, the ASBR allocates only one label for the IPv4 VPN routes with the same next hop and outgoing label. Compared with allocating a label for each IPv4 VPN route, next-hop-based label allocation saves label resources.
Perform the following steps on the ASBR.
system-view
bgp { as-number-plain | as-number-dot }
ipv4-family vpnv4
apply-label per-nexthop