ā02-23-2013 11:29 PM - edited ā03-04-2019 07:07 PM
Hi Experts,
For MPLS ingress router, when IP packet enters ingress router, how does the router determine which routing table(FIB or LFIB) is used for packet forwarding?
CE-----------PE(Ingress)----------P---------PE(Egress)------------CE----10.1.1.0/24
1. #show ip route --------------- IP based
2. #show mpls forwarding ---- Label based
Can anyone explain the detail?
Thanks,
Bo
ā02-24-2013 01:45 PM
Hello Bo,
I hope my explanation and interpretation is correct and welcome any feedback good/bad from any other CSC'ers, so here goes!
Between mpls ingress and egress routers, an LSP ( label switch path) is created on MPLS enabled routers which are called LSR's ( label switch routers), This is a unidirectional ( 1 way) path a labeled must use to get to the egress router, Another LSP is required for any return traffic.
L3 routing:
RIBRouting information Base-Ip routing table - control plane
FIB-Forwarding information Base -where the actual forwarding decision is made - Data Plane
Mpls label switching:
LIB- Label Information Base - where all labels are held and assigned by the LSR's - control plane
LFIB-Label Forwarding information Base - where the actual label forwarding decision is made - Data Plane
Edge LSR - Mpls enabled routers which can either prepend or remove (pop) labels and have non mpls router neighbours.
Note:
All routers in MPLS domain have both FIB and LFIB tables but only edge routers use FIB/LFIB
Sh ip route - RIB
Sh ip cef -FIB
Sh mpls ldp binding - LIB
Sh mpls forwarding-table - LFIB
Ingress to Egress traffic:
1) packet enters edge ingress mpls router
2)L3 lookup (RIB/FIB) is performed and a label is assigned to this packet ( LIB)
3) LFIB is then used to actual perform the forwarding of the label onto the next LSR in the LSP path.
4)Core LSR's receive this labled packet and performs a label lookup and swaps it with a local label from it own LIB
5) step 3 is perform again all the way along the LSP
6) The edge egress LSR can and usually does request a PHP (Penultimate Hop Popping) This is when its upstream neighbor routers remove the label packet and sends a pure ip packet to the edge Egress LSR - this is so the edge egress LSR doesn't need to perform two (double) lookup ( lablel & L3)
7) The Edge Egress LSR receives only an IP packet and performs a L3 lookup FIB and sends it on its way via prue l3 forwarding
I hope this helps
res
Paul
Please don't forget to rate this post if it has been helpful.
ā02-24-2013 02:38 PM
Hi Paul,
The packet is routed based on the cef route (sh ip cef
My question is at step 2.
Let's say for a particular prefix, we have two paths; one is IP based path, the other one is MPLS label based path.
What determines the MPLS path is preferred to IP based path?
The #show ip cef outputs only shows the label switching formation.
Thanks,
Bo
ā02-24-2013 05:26 PM
Hello,
If you are querying from a CE router perspective and this router has multiple paths to the same destination prefix then route selection is based on the routing protocol you are using and normal L3 lookup is used.
If the best path is via it neighboring PE router then once the packet it hits the PE router the process has I have stated will be initiated.
The the mpls infrastructure will invisible to the CE router.
On the Edge PE routers the rib will be consulted (as above) prior to imposing or removing labels
res
Paul
Please don't forget to rate this post if it has been helpful.
ā02-24-2013 06:44 PM
Hi Paul,
I am doning the query from the PE router.
There are two ways for the packet to get routed to the destination:
1. routed via pure IP addess
2. routed via the MPLS label, which is imposed by the PE router
If the packet is checked by RIB first, then the packet should be forwarded without imposing any labels to the next lop.
So again, my question is what determines that the packet is routed based on FLIB?
Thanks,
Bo
ā02-24-2013 11:47 PM
Hello Bo,
unless the IP only path has a lower IGP cost, the LFIB entry is preferred over the the FIB entry. This is an automatic administrative choice of the LSR router.
You could see this like if the path over the LSP would have a lower administrative distance over the IP only IGP path.
This kind of competition happens only for IPv4 traffic, the traffic of all MPLS based services like L3 VPN, L2 VPN, EoMPLS require the use of an MPLS path to send and receive successfully.
So the logic of an edge LSR is to use MPLS when possible.
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide