written 2.8 years ago by |
MPLS forwarding is based on label attached to IP packet. This label attachment is regulated by protocol called Label Distribution Protocol(LDP). Each LSR initially learns routes as normal routers do. This learning starts with PE routers.
Each PE router learns routes to different subnets from CE router. Suppose PE router PE1 learns route to subnet (say subnet1) from CE router. Now PE1 will add label to packet, forward to its neighboring LSR, and tells them that if you receive packet which destination address to subnet1 then forward it to me.
Again this process is repeated by this LSR. In this way, LSR learns routes and add this information in Label Forwarding Information Base(LFIB). Now if any PE receives packet with destination to subnet1, then looking at labels and LFIB, LSRs can easily forward IP packet.
Fig: Packet Forwarding in MPLS:
LSRs receive IP packet CE and add an MPLS header in between layer 3 and layer 2 means it encapsulates the link-layer i.e, layer 2 frames. This feature allows LSRs to support receiving packets containing frames from different protocols like Frame Relay, Metro Ethernet, etc, that’s why it is called multi-protocol.