MPLS push-pop-swap labels

Assuming this is the topology. CE1 is advertising prefix and CE2 is and they're both communicating each other.

CE1-PE1-P1  - P2 - PE2 - CE2

going back to the MPLS process, unlabeled packet adds label and MPLS routers do the rest of push-pop-swap and send across and stripped off the label as regular IP unlabeled format on the other side.

Let's say Host is communicating to Host and vice versa.

From PE's standpoint, how to determine that host is added a label 10 (for example) ?  And I can trace mpls labels from left to right of the topology.






  • ON PE1,

    using vrf, say X

    sh ip cef vrf X --- shows you label, say Y

    ON P1

    sh mpls forwarding label Y ---- shoud swap to another label, say Z

    ON P2

    sh mpls forwarding label Z ---- should pop to the bottom label, say A

    ON PE2

    sh mpls forwarding label A ------ should show vrf X interface as egress.



  • If your talking about a simple LDP based LSP, non-L3 VPN,  there are a number of simple things you can do.

    -          Show mpls forwarding … it will show you via the control plane what label it should get pushed

    -          Show ip cef detail,  will show you which label CEF things it should actual push  (hopefully those two results match J )

    -          You can traceroute from CE1 to CE2, and assuming your code is recent (12.3, 12.4, 15.x) it can interpret the modified icmp responses that will include the label values on a hop by hop.

    -          Also you can go the next hop router … your “P1”  and perform a “debug mpls packet”  this will then allow you to verify the label that PE1 put on the wire.

    Sample Outputs:

    R1#show mpls forwarding-table

    Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop

    Label      Label      or Tunnel Id     Switched      interface

    106        208       0             Fa0/0.12



    R1#show ip cef de

    R1#show ip cef detail, epoch 0

      local label info: global/106

      nexthop FastEthernet0/0.12 label 208





    Type escape sequence to abort.

    Tracing the route to


      1 [MPLS: Label 208 Exp 0] 96 msec 140 msec 116 msec

      2 [MPLS: Label 307 Exp 0] 120 msec 72 msec 100 msec

      3 124 msec 108 msec


    R2#deb mpls pac

    Packet debugging is on

    R2#u all

    *Jan 15 13:20:: MPLS turbo: Fa0/0.12: rx: Len 64 Stack {208 0 2} - ipv4 data

    *Jan 15 13:20:: MPLS turbo: Fa0/0.23: tx: Len 64 Stack {307 0 1} - ipv4 data

  • great thanks. yeah that's the thing i need .,.. appreciated all your feedback.

Sign In or Register to comment.