We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is Why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 617 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)


374 New Members signed up the last 30 days!


100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!


Forum Replies

  1. Hi Kumaran,

    These have to do with PHP (Penultimate Hop Popping).

    Imagine you have a couple of routers like this:

    CE1 - PE1 - P1 - P2 - PE2 - CE2

    Let’s say CE1 sends an IP packet meant for CE2. What happens is that PE1 adds a label and then it gets label switched from PE1 to P1 > P2 > PE2.

    To save PE2 a label lookup, we use PHP. This means that P2 will remove the label before forwarding it to PE2. This will save PE2 a label lookup.

    P2 knows that it has to do PHP because PE2 will tell it to. This is done with the implicit NULL label which has a value of 3. This is the default behavior btw.

    The problem with PHP is QoS…In the MPLS header, we can use the EXP bits for marking. When P2 pops the label, how does PE2 know what marking the packet should have? It doesn’t have a clue…

    To prevent this from happening, we can use the explicit NULL label which has a value of 0. The PE2 will use this to signal P2 to use label value 0 where we can store the EXP bits. The label won’t be popped and PE2 will receive the marking.

    Hope this helps!


  2. Hi Rene,

    Hope you are doing great …

    I have some questions …

    1. What is the advantage Using PHP over Ultimate HOP popping . I am facing some confusion regarding why we will use PHP.
    2. Suppose 3 ldp Router connected serially … R1+R2+R3 , R1 has a prefix that tag: imp-null and advertise to R2 . R2 also created Tag :16 for and advertise to R1, R3 . Also R3 created Tag:20 for and advertise to R2. So, R2 got those Tags for : 1. Tag :imp-null from R1, 2. Tag: 16 (own creation), 3. Tag:20 from R3 . So my questions is how R2 create LFIB where 3 tags available for same Prefix .
    3. When PE will receive regular IP packect ,then it will add Label, right ?My questions is why MPLS will kick in . It can forward packet based on IP . What is the lookup process behind this .
  3. Hi @Zaman.rubd

    Let’s look at an example of PHP first. Take a look at this picture:

    In this example, P3 pops the label and forwards only the IP packet to PE2. The advantage here is that we saved a lookup for PE2. It only has to route the packet, not another lookup for the label.

    Without PHP, (that’s Ultimate Hop Popping), the egress router (PE2) has to pop the label and do a lookup in the IP routing table.

    PHP helps to move some of the load (label lookup / pop) from the PE2 to the P3 router. Keep in mind the PE routers have more work to do than the P routers…

    About the LFIB, keep this picture in mind:

    R2 will have the IP address of R1 installed as the next hop for, that won’t change:

    R2#show ip route
    Routing entry for
      Known via "ospf 1", distance 110, metric 2, type intra area
      Last update from on GigabitEthernet0/1, 00:03:17 ago
      Routing Descriptor Blocks:
      *, from, 00:03:17 ago, via GigabitEthernet0/1
          Route metric is 2, traffic share count is 1

    Here you can see the labels that were created/advertised:

    R2#show mpls ldp bindings     
      lib entry:, rev 16
            local binding:  label: 19
            remote binding: lsr:, label: imp-null
            remote binding: lsr:, label: 20

    And the LFIB:

    R2#show mpls forwarding-table 
    Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop    
    Label      Label      or Tunnel Id     Switched      interface              
    16         Pop Label   0             Gi0/2
    17         Pop Label       0             Gi0/2
    18         Pop Label   0             Gi0/1
    19         Pop Label       0             Gi0/1


  4. Hi Gareth,

    Each routing protocol has its own “RIB”. The OSPF LSDB can be called the OSPF RIB and the EIGRP topology table is the EIGRP RIB.

    The routing table can be considered the “main” RIB of the router.

    The FIB is your forwarding table, on Cisco routers, this is the CEF table. It doesn’t only contain L3 information like the RIB does but also L2 information (needed to reach the next hop).

    Here’s the main RIB of a router:

    R1#show ip route 
 is variably subnetted, 2 subnets, 2 masks
    C is directly connected, GigabitEthernet0/1
    L is directly connected, GigabitEthernet0/1

    It only has directly connected subnets. Here is the CEF table of this router:

    R1#show ip cef
    Prefix               Next Hop             Interface            no route            drop           receive                   drop      attached             GigabitEthernet0/1      receive              GigabitEthernet0/1      receive              GigabitEthernet0/1      attached             GigabitEthernet0/1    receive              GigabitEthernet0/1          drop         receive                   drop   receive

    As you can see, there are some additional entries here (for example, for multicast traffic). This router knows how to reach, a host on the subnet:

    R1#show ip cef longer-prefixes 
    Prefix               Next Hop             Interface      receive              GigabitEthernet0/1      receive              GigabitEthernet0/1    receive              GigabitEthernet0/1      attached             GigabitEthernet0/1

    Here you can see the IP address and the interface, but there’s more. The MAC address to reach is in the ARP table:

    R1#show ip arp
    Protocol  Address          Age (min)  Hardware Addr   Type   Interface
    Internet           46   fa16.3ec1.417c  ARPA   GigabitEthernet0/1

    The FIB also has a section where L2 information is stored, the adjacency table:

    R1#show adjacency detail 
    Protocol Interface                 Address
    IP       GigabitEthernet0/1
                                       0 packets, 0 bytes
                                       epoch 0
                                       sourced in sev-epoch 0
                                       Encap length 14

    Above you can see the IP, interface, and the MAC address (FA163EC1417C).

    To answer your question, the routes from the main RIB are copied to the FIB but the FIB has additional information that is needed for forwarding (like the L2 information).

    I hope this helps!


20 more replies! Ask a question or join the discussion by visiting our Community Forum