The apply-label per-route pop-go command configures a device to assign labels to VPNv6 routes sent to its peer, removes such a label in a data packet received from the peer, and forward the data packet through the outbound interface found in the ILM table. With this command configuration, the device uses the per-route label allocation mode, so that it assigns a unique label to each VPNv6 route.
The undo apply-label per-route pop-go command restores the default configuration.
The apply-label per-nexthop pop-go command configures a device to assign labels to VPNv6 routes sent to its peer, removes such a label in a data packet received from the peer, and forward the data packet through the outbound interface found in the ILM table. With this command configuration, the device uses the per-next-hop label allocation mode, so that it assigns the same label to the VPNv6 routes that have the same next hop.
The undo apply-label per-nexthop pop-go command restores the default configuration.
By default, after a device receives a labeled data packet, the device removes the label of the data packet and forwards the packet based on a forwarding entry found in its IP forwarding table according to the longest-match rule.
Usage Scenario
By default, after the local device in the BGP/MPLS VPN networking receives a labeled data packet from the VPN instance IPv6 address family, the local device removes the label, searches the IP forwarding table for a forwarding entry according to the longest-match rule, and sends the packet based on the found forwarding entry.
After the apply-label per-route pop-go command is configured, the local device records in the ILM table the mapping between the label assigned to each VPNv6 route and the outbound interface of the route. Then, after the local device receives a labeled data packet from its BGP VPNv6 peer, the local device directly searches the ILM table for an outbound interface based on label information carried in the packet and forwards the packet through the found outbound interface after removing its label. This implementation significantly accelerates packet forwarding. After the apply-label per-nexthop pop-go command is run, the local device records in the ILM table the mapping between the label assigned to BGP VPNv6 routes with the same next-hop address and the outbound interface of the route. After the local device receives a labeled data packet from its peer, the local device directly searches the ILM table for an outbound interface based on label information carried in the packet and forwards the packet through the found outbound interface after removing its label. This implementation significantly accelerates packet forwarding.Prerequisites
An RD has been configured using the route-distinguisher command in the VPN instance IPv6 address family view.
Precautions
The apply-label pop-go command is mutually exclusive with the apply-label command (VPN instance IPv6 address family view). The latest configuration overrides the previous one.
After the apply-label pop-go command is run, the device removes the label, searches the ILM table for the corresponding outbound interface, and forwards the data packet, without querying the IP forwarding table. The apply-label command, however, needs the device to query the IP forwarding table for forwarding.<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 pop-go
<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 pop-go