Thursday, November 6, 2008

What Is PHP (Penultimate Hop Popping)

What is PHP ?
PHP is penultimate hop popping which means remove the label one hop before its destination. In figure 1 LER-1 wants to reach on CPE lan for this it is getting route from LER-2 with its loopback as next-hop address. For loopback it will check the routing table lookup and reverse lookup will be performed. After that packet will be forwarded to the next router and same process will be followed till it reach LER-2. You can see the label exchange on LER-1 which is pushing a label of 17 and forwarding to LSR-1. LSR will swap the label with 20 and forward the packet to LSR-2. LSR-2 will swap the label with 21 and forward to LER-2. Now LER-2 will check this is the directly connected interface and label will be popped off and normail ip packet will be delivered.



Lets see in figure 2 what will happen in case of PHP. The packet will be forwarded to the next router and same process will be followed till it reach LER-2. You can see the label exchange on LER-1 which is pushing a label of 17 and forwarding to LSR-1. LSR will swap the label with 20 and forward the packet to LSR-2. Now LSR-2 will forward the packet by removing the label. When LER-2 will get the packet it has to do perform only ip lookup. This is case of directly connected interface.
But in case of VPN when the CPE routes will be forwarded a vpn label is also forwarded along with MP-BGP. So a packet consists of two labels one is vpn label and another is ip label. The top label of stack is always igp label and inner label is vpn label. So when PHP will perform on LSR-2 it wll remove the IGP label and forward the packet with vpn label. On LER-2 it wil check it is for my directly connected interface and vpn label will popped off and normail ip packet will be delivered to CPE.

Note:- For directly connected interfaces and summary addresses always label 3 will be advertised to adjacent neighbors which is used for PHP.


Author of the post is Shivlu Jain

People who read this post also read :



6 comments:

alex smith said...

I love vpn because it allows me to be free. I am not tied down to the limits of my ISP.

rahul said...

this post realy cool.i liked it

samyuktha raj said...

thanks for this post..

Mokhtar_Network said...

thank you very much

Anonymous said...

this is really cool and superb post

Anonymous said...

Very usefull