LSR (TSR) stands for Label (Tag) Switched Router. This is where you can see how MPLS can work. An LSR, if it is at the network edge, can impose (Push) or dispose (POP) of a label, while the intermediate LSRs swap labels. We are going to base our discussion on the below diagram.
The above MPLS routers (Linked in red) are advertising their labels to their neighbors. So if a packet is generated from CE1 toward the FEC of 10.0.0.0, this is how it will look when going over the LSP;
- CE1 sends the unlabeled packet to PE1
- PE1 receives an unlabeled packet and does a lookup on how to send the packet to 10.0.0.0
- PE1 will impose (push) on a label of 24 and send it to P1
- P1 gets the labeled packet, does a label lookup, and sees that label 24 needs to be swapped for label 55 and sent
- P2 receives a labeled packet, does a label lookup, and sees that the next hop wants the label disposed of (popped) before it is sent to PE2. P2 removes the label and sends an unlabeled IP packet over to PE2
- PE2 will send the packet to CE2 just by performing a route lookup
As you can see, the LSP for the FEC of 10.0.0.0 is unidirectional; if you want to see the return traffic, you need to visualize the packet coming back and the diagram looking like this;
- PE2 imposes label 55
- P2 swaps label 55 for 24
- P1 pops the label
- PE1 forwards the unlabeled IP packet to CE1
A few things to note about LSR’s
- They must be configured to run MPLS
- Labels only have local significance to that one LSR
- Label allocations are asynchronous
- The local label to each LSR is advertised to every neighbor regardless of whether they are upstream or downstream neighbors.
- Labels are stored in the LIB (Label Information Base)
How to label allocation and distribution is accomplished in a frame-mode MPLS network
- IP routing protocol builds the routing table
- Each LSR assigns a label to every destination prefix in the IP routing table.
- LSRs announce their assigned labels to their neighboring LSR
- Every LSR builds its own LIB, LFIB (Label Forwarding Information Base), and FIB (Forward Information Base) structure on labels the LSR receives
We are introduced to a few new acronyms when talking about LSRs; they are
- LIB (Label Information Base): Where all labels are stored about all prefixes and neighbors the router knows about
- LFIB (Label Forwarding Information Base): This is where the “best path labels” are chosen and used by the LSR in the LSP. This is just like the IP routing table but for labels
- FIB (Forward Information Base): CEF, how we forward packets
MPLS Data and Control Plane
- IP Routing protocol populates the Routing Information Base
- RIB – IP Control Plane
- RIB populates CEF and its Forwarding Information Base
- FIB – IP Data Plane
- Label Distribution Protocol (LDP) populates the Label Information Base
- LIB – MPLS Control Plane
- LIB and RIB populate the Label Forwarding Information Base
- LFIB – MPLS Data Plane
- CEF also stores some label information