cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1429
Views
0
Helpful
5
Replies

Need to Understand the Packet Flow

Sanjib Pradhan
Level 1
Level 1

Dear Friend,

I need to understand the packet flow of the below diagram.

rrr.png

I have configured MPLS on R2,R3 and R4. And IBGP is configured on R2 and R4. Now I am able to reach from R1 to R5's Loopback address. I need to understand the packect flow from R1 to R5 like If I ping from R1's Loopback  to R5's Loopback address then Source IP is 1.1.1.1 and destination IP is 5.5.5.5. What will be the packet structure at R2, R3,R4...??????????

Please explain in details......Me really confused as R4 has not route about 5.5.5.5 also 1.1.1.1...How it forwards the packets??????

1 Accepted Solution

Accepted Solutions

Sanjib

It is a similiar process to what i have described with a few additonal details.

So assuming all P/PE devices have full reachability to each other via the MPLS forwarding table and that all PE devices have exchanged MPLS VPN information with each other -

1) R1 sends packet to R2. R2 receives that packet on an interface configured to be in VPN_A.

2) R2 does a lookup within the VPN_A routing rable (a VRF) and sees the next hop as R4. R2 assigns a VPN label and adds it to MPLS header.

3) R2 then consults it's MPLS forwarding table to see how to reach R4 and adds another label and sends it to R3.

3) R3 only looks at the top label. It does not look at the MPLS VPN label because it would be meaningless. It simply adds a new label so it can send the packet to R4.

4) R4 removes the top label and then the VPN label and using the VPN label does a route lookup to see which interface to send the packet out on.

Again because of Penultimate Hop Popping (PHP) R3 would actually just send the packet with only the VPN label attached to R4. If you had multiple P devices then each device would remove the top label and add a new one leaving the VPN label untouched until you got to the last P device before the PE device and this one would simply remove the top label but not add a new one so R4 can simply remove the MPLS VPN label to see where to send the packet.

Jon

View solution in original post

5 Replies 5

Bilal Nawaz
VIP Alumni
VIP Alumni

Hi Sanjib

This may help you. http://www.youtube.com/watch?v=2K11sOeaLHs

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Jon Marshall
Hall of Fame
Hall of Fame

Sanjib

So R2 and R4 are PE devices and R3 is a P device ? And you are not doing MPLS VPNs, just normal MPLS ?

If so R4 must have a route to 5.5.5.5. Did you mean R3 does not have a route ?

With MPLS any P device only knows how to get to other P devices and PE devices. It does not know about any networks outside the MPLS network. The PE devices have routes to any external networks connected to them and know how to get to P and other PE devices.

Note that in terms of PE/P reachability the routing/LDP information has already been exchanged and an MPLS forwarding table built. So for reachability between PE/P routers (ie. not outside the MPLS network) route lookup do not need to be performed, it is simply a matter of removing and adding labels.

So assuming you are not using MPLS VPNs and that MPLS labels have been exchanged between all P and PE routers -

R1 pings 5.5.5.5

1) R1 does a route lookup for 5.5.5.5 and sends it to R2.

2) R2 is a PE device. It does a route lookup for 5.5.5.5 and sees R4 as the next hop (this route has been exchanged via MP-BGP).

3) R2 then need to send the packet to R4. To do this it looks in it's MPLS forwarding table to see how to get to R4. The MPLS forwarding table tells it which label to attach to the packet. It adds this label and sends the packet out of it's interface to R3.

3) R3 is a P device. It does not need to do a route lookup for 5.5.5.5. It simply looks at the incoming MPLS label and consults it's MPLS forwarding table. It will have an entry in it's table saying that an incoming packet with an MPLS label of x should be sent out with an MPLS label of y. It changes the label and sends it out to R4.

4) R4 receives the packet, removes the label, does an IP lookup for 5.5.5.5 and sends it to R5.

Note that actually R3 might not add a label as there is something called Penultimate Hop Popping where if the net hop from the P router is a PE router it sends the packet without a label to save extra processing on the PE router. If you had multiple P routers only the last P router before the PE router would do PHP.

The key thing to understand is that the P devices don't do route lookups when forwarding data. They simply switch labels. Whereas the PE devices do need to do route lookups for destinations outside the MPLS network. 

Jon

Thanks Jon...

As I have used MPLS VPN SO R3 has no route to R5. I want to know how R2 add double tag with the packet i.e double Label...And how R3 forwads the packet to R4. Please explain the details packet flow from R1 to R5 in case of MPLS VPN...

Please!!!!!!!!!!!! 

Sanjib

It is a similiar process to what i have described with a few additonal details.

So assuming all P/PE devices have full reachability to each other via the MPLS forwarding table and that all PE devices have exchanged MPLS VPN information with each other -

1) R1 sends packet to R2. R2 receives that packet on an interface configured to be in VPN_A.

2) R2 does a lookup within the VPN_A routing rable (a VRF) and sees the next hop as R4. R2 assigns a VPN label and adds it to MPLS header.

3) R2 then consults it's MPLS forwarding table to see how to reach R4 and adds another label and sends it to R3.

3) R3 only looks at the top label. It does not look at the MPLS VPN label because it would be meaningless. It simply adds a new label so it can send the packet to R4.

4) R4 removes the top label and then the VPN label and using the VPN label does a route lookup to see which interface to send the packet out on.

Again because of Penultimate Hop Popping (PHP) R3 would actually just send the packet with only the VPN label attached to R4. If you had multiple P devices then each device would remove the top label and add a new one leaving the VPN label untouched until you got to the last P device before the PE device and this one would simply remove the top label but not add a new one so R4 can simply remove the MPLS VPN label to see where to send the packet.

Jon

Thanks a lot Jon.....I got it

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card