An egress Edge-LSR in an MPLS network might have to perform two lookups on a packet received from an MPLS neighbor and destined for a subnet outside the MPLS domain. It must inspect the label i n the label stack header, and it must perform the label lookup just to realize that the label has to be popped and the underlying IP packet inspected. An additional Layer 3 lookup must be performed on the IP packet before it can be forwarded to its final destination. Figure 2-8 shows the corresponding process in the SuperNet network.
The double lookup in the New York POP router might reduce the performance of that node. Furthermore, in environments where MPLS and IP switching is realized in hardware, the fact that a double lookup might need to be performed can increase the complexity of the hardware implementation significantly. To address both issues, Penultimate Hop Popping (PHP) was introduced into the MPLS architecture.
Penultimate Hop Popping is used only for directly connected subnets or aggregate routes. In the case of a directly connected interface, Layer 3 lookup is necessary to obtain the correct next-hop information for a packet that is sent toward a directly connected destination. If the prefix is an aggregate, a Layer 3 lookup also is necessary to find a more specific route that then is used to route the packet toward its correct destination. In all other cases, the Layer 2 outbound packet information is available within the LFIB and, therefore, a Layer 3 lookup is not necessary and the packet can be label switched.
With penultimate hop popping, the Edge-LSR can request a label pop operation from its upstream neighbors. In the SuperNet network, the Washington router pops the label from the packet (Step 4 in Figure 2-9) and sends a pure IP packet to the New York router. Then the New York router does a simple Layer 3 lookup and forwards the packet to its final destination (Step 5 in Figure 2-9).
Penultimate hop popping is requested through TDP or LDP by using a special label value (1 for TDP, 3 for LDP) that also is called the implicit-null value.
When the egress LSR requests penultimate hop popping for an IP prefix, the local LIB entry in the egress LSR and the remote LIB entry in the upstream LSRs indicate the imp-null value (see Example 2-19) and the LFIB entry in the penultimate LSR indicates a tag pop operation (see Example 2-20).
NewYork#show tag tdp binding 192.168.2.0 24 tib entry: 192.168.2.0/24, rev 10 local binding: tag: imp-null(1) remote binding: tsr: 172.16.3.1:0, tag: 28 Washington#show tag tdp binding 192.168.2.0 24 tib entry: 192.168.2.0/24, rev 10 local binding: tag: 28 remote binding: tsr: 172.16.3.2:0, tag: imp-null(1) remote binding: tsr: 172.16.1.4:0, tag: 30 remote binding: tsr: 172.16.2.1:0, tag: 37
Washington#show tag forwarding tags 28
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
26 Pop tag 192.168.2.0/24 0 Se0/0/2 point2point