MPLS(Multiprotocol Label Switching)
MPLS works by assigning short labels to data packets, which are then used to make forwarding decisions within a network.
Instead of examining the packet's IP header to determine its next hop, MPLS routers simply look at the label and forward the packet based on the information in their forwarding table.
- Benefits of MPLS
2. Improved uptime: MPLS can send data over an alternative path in less than 50 milliseconds.
3. Reduced WAN costs: MPLS WAN allows businesses to give control of routing to the service provider they are with.
4. Increased reliability: MPLS has several routes data can take to be transferred, which lowers the chance of a network crashing or overloading.
5. Fast reroute: MPLS has a feature known as Fast Reroute that enables traffic to be switched to an alternative path very rapidly in the event of downtime.
Packet Flow
@startuml participant "Host 1" as h1 participant "switch 1" as s1 participant "MPLS \n Router 1\n(Label=10)" as r1 participant "internet" as i participant "MPLS \n Router 3\n(Label=30)" as r3 participant "MPLS \n Router 2\n(Label=20)" as r2 participant "switch 2" as s2 participant "Host 2" as h2 == LDP Protocol Start (to exchange labels) == r1 -> r2: My label=10 r1 -> r3: My label=10 r2 -> r1: My label=20 r2 -> r3: My label=20 r3 -> r1: My label=30 r3 -> r1: My label=30 == LDP Protocol End == == Routing updates Start (Exposed Hosts) == r1 -> r2: I have route to host1 r1 -> r3: I have route to host1 r2 -> r3: I have route to host2 r2 -> r1: I have route to host2 == Routing updates end == note over r1 Forwarding Table dst nextHop cost host2 r2 2 end note note over r2 Forwarding Table dst nextHop cost host1 r1 2 end note h1 -> s1: |dstMAC=r1 | dstIP=h2| s1 -> r1: |dstMAC=r1 | dstIP=h2| note over r1 Add MPLS hdr Route to host2 is via r2 end note r1 -> i: |dstMAC=r1 | \nMPLS hdr(label=50) | \ndstIP=h2| i -> r2: |dstMAC=r1 | \nMPLS hdr(label=50) | \ndstIP=h2| @enduml