cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2148
Views
10
Helpful
7
Replies

MPLS Label push pop

pgyogeshkumar
Level 1
Level 1

I understand that in mpls forwarding we have VPN label and the next hop label in which next hop label will be swapped at each lsr?

 

How based on VPN label P routers can find the next hop ? Does VPN labels known to P router also ?

 

Please confirm the label push pop and swap operation in MPLS shortly if possible. Thanks

7 Replies 7

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

How based on VPN label P routers can find the next hop ? Does VPN labels known to P router also ?

P routers do not process or analyze the VPN label (the inner label). They are only concerned about the transport label (the outer label). Please keep in mind that in order for the packet to get to a distant VPN site, it must first get to the distant PE router that attaches the remote site to VPN. This is all what P router's need to know - how to get to the individual PE routers. Once a PE router receives a packet, it will associate it with the proper VRF and destination network in that VRF based on the inner label (in fact, the only label that remained, as the transport label was PHP-ed on the P router immediately before the target PE).

Best regards,
Peter

Hi Peter

Still slight confusion here.. apologies for that

 

If a packet arrives at PE that needs to traverse far end PE (same VRF on both PEs). Below topology taken as an example.

PE1-->P--->P--->P----> PE2

 

PE1 will tag inner label (VPN label of far end PE2, since PE2 might have different VRFs so easy to map the destination is for which VRF), hope this is correct. Also the inner label never changes while traversing through MPLS network. Please correct me if I am wrong

 

Now coming to Outer Label (transport label)------> Whether the outer label will be referring to far-end PE2 or the outer label will be referring just the P router so as to reach the next hop ? If the outer label is referring just the next hop P router, then how the P router swaps the label towards next P router without knowing to which PE router it has to forward ?

 

If the outer label refers that far-end PE2 then i dont think any swapping is required at P routers as the destination label is already defined ?

 

Sorry I am bit confused here, please confirm if my question is not clear.

 

 

 

 

 

 

Hi Yogesh,

PE1 will tag inner label (VPN label of far end PE2, since PE2 might have different VRFs so easy to map the destination is for which VRF), hope this is correct. Also the inner label never changes while traversing through MPLS network. Please correct me if I am wrong

<Nagendra> Right. PE1 will impose inner label (application label) as the label that is advertised by PE2. THis inner label will not change along the path and will reach PE2 with the same label that was imposed by PE1.

 

Now coming to Outer Label (transport label)------> Whether the outer label will be referring to far-end PE2 or the outer label will be referring just the P router so as to reach the next hop ? If the outer label is referring just the next hop P router, then how the P router swaps the label towards next P router without knowing to which PE router it has to forward ?

<Nagendra> The Outer label (transport label) will be the label used by PE1 to reach PE2. 

 

If the outer label refers that far-end PE2 then i dont think any swapping is required at P routers as the destination label is already defined ?

 

<Nagendra> It is required to swap the label in each hop. A label is locally significant to a router that assign the label for a prefix. For example,

 

PE1---P1---P2---PE2

 

Assume PE2 loopback address is 10.1.2.2. Each node will perform the below:

 

1. PE2 will assign label 3 (imp-null) for 10.1.2.2 as it is directly connected.

2. P2 will assign label 100.

3. P1 will assign label 101 (It can even assign 100)

4. PE1 will assign label 200

 

Now PE1 will use the label advertised by P1 (which is the next-hop to reach 10.1.2.2) as the transport label. So in this case, it will impose 101 as transport label and forward towards P1. P1 will simply swap 101 with 100 and send to P2, P2 will pop (as it received imp-null from its next-hop which is PE2) the top transport label and forward to PE2. PE2 will receive it with application label as top label.

 

HTH,

Nagendra

Cool.. Thanks Nagendra and Peter

Hi Peter and Narendra,

 

how the PE router knows that if a packet arrives at PE it has to assign label with local or remote binding?

 

If a packet is without any VPN label tag then is it like it will assign remote binding label for that route and if a packet comes with VPN label then it will just POP the label and forward towards exit interface.. Is the above understanding correct ?

Hi,

how the PE router knows that if a packet arrives at PE it has to assign label with local or remote binding?

<Nagendra> Routers will only use remote binding for label imposition. Any router will not impose the local label in any of the packet.

 

If a packet is without any VPN label tag then is it like it will assign remote binding label for that route and if a packet comes with VPN label then it will just POP the label and forward towards exit interface.. Is the above understanding correct ?

<Nagendra> It depends on the incoming packet. It can be differentiated by the Ethertype in L2 header. If the incoming packet is IP,  the ethertype will be 0800 for IPv4 or 86DD for IPv6. So it looks into respective (v4 or v6) CEF table which will have the set of labels (derived from remote binding of next-hop) to be PUSHed.
 
If the incmong packet is MPLS packet (with label), the ethertype will be 8847. So it will look into LFIB table which will say the action associated (like POP, swap, PUSH etc) to the top label.
 
HTH,
-Nagendra
 

Thanks Nagendra for clarifying things. It really helped

 

If possible can you please comment on below query as well please.

 

https://supportforums.cisco.com/discussion/12444101/role-igp-mpls#comment-10648251

 

I have updated with my understandings. It will be good if you can clarify on this as well please. Thanks