PHP is penultimate hop popping which means remove the label one hop before its destination.It refers to the process whereby the outermost label of an MPLS tagged packet is removed by a Label Switch Router (LSR) before the packet is passed to an adjacent Label Edge Router.
The process is important in a Layer 3 MPLS VPN environment as it reduces the load on the LER. If this process didn’t happen, the LER would have to perform at least 2 label lookups:
- The outer label, identifying that the packet was destined to have its label stripped on this router.
- The inner label, to identify which Virtual Routing and Forwarding (VRF) instance to use for the subsequent IP routing lookup.
In a large network this can result in the CPU load on the LER reaching unacceptable levels. By having PHP for an LER done on the LSRs connected to it, the load is effectively distributed among its neighbor routers.
To avoid this extra work on the very last (ultimate) LSR, MPLS uses a feature called penultimate hop popping (PHP). (Penultimate simply means “1 less than the ultimate.”) So the penultimate hop is not the very last LSR to process a labeled packet, but the second-to-last LSR to process a labeled packet. PHP causes the penultimate-hop LSR to pop the outer label, so that the last LSR—the ultimate hop if you will—receives a packet that only has the VPN label in it. With only this single label, the egress PE needs to look up only one entry in the LFIB