(Optional) Configuring MPLS LDP PHP (Penultimate Hop Popping)
Penultimate Hop Popping (PHP) is a fundamental concept in MPLS networks. It refers to the process where the second-to-last router (penultimate hop) in a Label Switched Path (LSP) removes (or "pops") the MPLS label from a packet before forwarding it to the last router (the egress router). This technique helps optimize network performance and reduce processing overhead on the egress router.
Purpose and Benefits of PHP
Reduced Processing Load: PHP offloads the task of MPLS label removal from the egress router, reducing its processing burden. This is particularly beneficial in high-throughput environments where the egress router may be handling large amounts of traffic.
Simplified Egress Processing: The egress router receives the packet as a regular IP packet, which simplifies its processing because it no longer needs to look up and remove an MPLS label before making a forwarding decision.
Efficiency: PHP reduces the overhead of MPLS label operations at the final hop, which can improve overall network efficiency.
How PHP Works
In a typical MPLS scenario, each router along the LSP swaps the incoming MPLS label with a new label before forwarding the packet to the next hop. However, when the packet reaches the penultimate hop, instead of swapping the label, the router pops the label (removes it entirely).
The packet is then forwarded as a regular IP packet (or with an explicit null label if that is configured) to the egress router.
PHP and Implicit Null Label
The mechanism behind PHP is often tied to the use of the Implicit Null Label (label value 3). When an MPLS router advertises the implicit null label to its upstream neighbor, it instructs the penultimate hop to pop the MPLS label and forward the packet as a plain IP packet.
Implicit Null Label: This label is not actually carried in the packet. Instead, it tells the penultimate router to remove the label and forward the packet without any MPLS label.
Explicit Null as an Alternative to PHP
Instead of using PHP, an explicit null label (label value 0 for IPv4) can be used. With explicit null, the MPLS label is preserved (though replaced with the explicit null label), allowing the egress router to receive and process the QoS (Quality of Service) information that might be encoded in the MPLS header.
Configuration
The set protocols mpls ldp {ipv4-family|ipv6-family} label-local-advertise [explicit-null] command configures the label assigned for the penultimate router under the address family on the egress LSP. The explicit-null option assigns an explicit null label(0), to the penultimate router. If explicit-null option is not specified, or this command is not configured, the LSR assigns an implicit null label(3), to the penultimate router.
Example
The following command configures to assign an explicit null label for the penultimate router on the egress LSP.
admin@PICOS# set protocols mpls ldp ipv4-family label-local-advertise explicit-null
admin@PICOS# commit
Copyright © 2024 Pica8 Inc. All Rights Reserved.