MPLS
Multi Protocol Label Switching (an introduction)
Karst Koymans
Cosmin Dumitru
Informatics Institute
University of Amsterdam
(version 1.4, 2013/03/14 15:51:41)
Thursday, March 14, 2013
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 1 / 26
1 Faster IP forwarding
ATM and MPLS
2 MPLS Operation
Labels, paths and switching
MPLS Control and Label Management
3 MPLS Applications
MPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 2 / 26
Faster IP forwarding
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 3 / 26
Faster IP forwarding
IP Forwarding
Forwarding IP packets
Normally done by destination IP address
Routing protocols are used to distribute layer 3 information
Decisions are made hop-by-hop independently
Connectionless operation
Routing protocol should offer consistency
Shortcomings
Routing tables may become very large
Search time is ≈ O(logN) for table of size N
Limited traffic engineering options
Layer 2 and layer 3 information is unrelated
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 4 / 26
Faster IP forwarding ATM and MPLS
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 5 / 26
Faster IP forwarding ATM and MPLS
ATM (Asynchronous Transfer Mode)
Uses small fixed size cells to transport dataEach cell contains 53 bytes
A fixed size header of 5 bytesA fixed size payload of 48 bytes
Often data needs to be fragmented
Uses VCs (Virtual Circuits) between endpointsSwitching based on labels
An 8-bit (UNI) or 12-bit (NNI) Virtual Path Identifier (VPI)An 16-bit Virtual Channel Identifier (VCI)
Switching lookup is now O(1)Promises QoS, for instance low jitter
Higher level protocols use the ATM Adaptation Layer (AAL)
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 6 / 26
Faster IP forwarding ATM and MPLS
MPLS (Multi Protocol Label Switching)
Defined in RFC 3031
Combine the best of both worlds
Packet forwarding
Circuit switching
Route at the edges, switch at the core
Multi Protocol
Agnostic to the protocol used at layer 2
Label Switching
Uses labels instead of IP addresses
Routing at the speed of switching
Hybrid, “layer 2.5”, shim protocolKarst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 7 / 26
MPLS Operation
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 8 / 26
MPLS Operation
MPLS Network
MPLS Network
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 9 / 26
MPLS Operation Labels, paths and switching
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 10 / 26
MPLS Operation Labels, paths and switching
MPLS Label (RFC 3032)
0 19 20 22 23 24 31
Label Exp S TTL
MPLS packet label fields
Label Per router local semantics
Exp(erimental)a Class of Service
S(tack) Bottom of stack indication
T(ime) T(o) L(ive) Incoming IP TTL
aRenamed to TC (Traffic Class) by RFC 5462
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 11 / 26
MPLS Operation Labels, paths and switching
LER (Label Edge Router)
LSR (Label Switching Router)
Label Edge Router
Positioned at the edge of the MPLS network
Adds or removes labels for incoming and outgoing traffic
Also called Edge Label Switch Router (eLSR)
Label Switch Router
Positioned in the core of the MPLS network
Swaps labels and forwards packets
Does not need to know about IP forwarding
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 12 / 26
MPLS Operation Labels, paths and switching
FEC (Forwarding Equivalence Class) and
LSP (Label Switched Path)
Forwarding Equivalence Class
Packets which are forwarded in the same manner
Each label on a link determines a unique FEC
Every FEC is associated with a certain LSP
Label Switched Path
Sequence of intermediate routers on same stack depth
on the path from ingress to egress router
Hop-by-hop routing
Explicit routing
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 13 / 26
MPLS Operation Labels, paths and switching
LIB (Label Information Base)
Mapping between previous hop (incoming port, label) and FEC
Mapping between FEC and next hop (outgoing port, label)
Each router has its own LIB
Details are implementation dependent
Generates an LFIB (Label Forwarding Information Base)
Input Port Incoming Port Label Output Port Outgoing Port Label
1 green 3 blue
2 red 1 orange
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 14 / 26
MPLS Operation Labels, paths and switching
MPLS Operation (continued)
MPLS Network
1
3
2
4 5
6
0 Receive IP packet at edge router
1 Classify into FEC green
2 Push (label green)
3 Swap (label green, label red)
4 Swap (label red, label blue)
5 Pop (label blue)
6 Forward IP packet to destination
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 15 / 26
MPLS Operation MPLS Control and Label Management
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 16 / 26
MPLS Operation MPLS Control and Label Management
MPLS Separation of Control and Data
Control Plane
Exchange layer 3 and label information
Several label distribution protocols (LDP, CR-LDP, RSVP-TE)
Also piggybacked on routing protocols (OSPF-TE, ISIS-TE, MP-BGP)
Data Plane
Switch (forward) packets based on labels
Push (ingress)
Swap (intermediate)
Swap and push (start LSP tunnel)
Pop and swap (end LSP tunnel)
Pop (egress)
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 17 / 26
MPLS Operation MPLS Control and Label Management
LDP (Label Distribution Protocol)
UDP discovery and TCP session with peers
Adjacent LSRs inform each other of the label bindings
Downstream LSR determines the label
On demand or unsolicited
An IGP protocol is configured on all LSRs
New IGP routes lead to new label bindings
Labels can be withdrawn when IGP routes are no longer valid
Hard-state
Expected to work until explicitly torn down
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 18 / 26
MPLS Operation MPLS Control and Label Management
RSVP-TE
(Resource Reservation Protocol – Traffic Engineering)
Extension of RSVP
Unreliable delivery (protocol 46; sometimes UDP)
Soft-state
Information needs to be periodically refreshed
An LSP is created by propagating an RSVP message to the endpoint
Paths are terminated if not refreshed on time
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 19 / 26
MPLS Applications
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 20 / 26
MPLS Applications
Applications (1)
TE (Traffic Engineering)
Traffic steering across network in order to fully utilize resources
With the help of RSVP-TE and OSPF-TE or IS-IS-TE
Full network view (OSPF, IS-IS) and extra information about link state
RSPV-TE creates LSPs on demand
QoS (Quality of Service)
Different types of service across the network
Enforcing drop probability, bandwidth and delay (queueing)
CoS bits or FEC (destination + class of service)
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 21 / 26
MPLS Applications
Applications (2)
VPN (Virtual Private Network)
Private connections over shared networks
Layer 2 or layer 3 based
Business can choose the needed type of service
Stacked labels: egress router and VPN identity
LDP (layer 2) or BGP (layer 3) is used to transport label information
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 22 / 26
MPLS Applications MPLS VPN techniques
Outline
1 Faster IP forwardingATM and MPLS
2 MPLS OperationLabels, paths and switchingMPLS Control and Label Management
3 MPLS ApplicationsMPLS VPN techniques
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 23 / 26
MPLS Applications MPLS VPN techniques
Layer 2 VPN (1)
AToM (Any Transport over MPLS)
Transports layer 2 frames over an MPLS Network
ATM, Frame-Relay, PPP, Ethernet
Point-to-point service
From ingress router/interface to egress router/interface
Identified by using an inner label
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 24 / 26
MPLS Applications MPLS VPN techniques
Layer 2 VPN (2)
VPLS (Virtual Private LAN Service)
Transports layer 2 frames over an MPLS Network
Works multipoint-to-multipoint
The IP/MPLS core operates as a big virtual switch
Outer label used for normal MPLS forwarding
Inner label used for VPLS instances
Karst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 25 / 26
MPLS Applications MPLS VPN techniques
Layer 3 VPN
Uses the MP-BGP (Multi Protocol BGP) extension of BGP
Introduces the VPN-IPv4 address family
Extends the 32-bit IPv4 address with a 64-bit RD (route distinguisher)
A BGP route for VPN-IPv4 includes an MPLS label
Each VPN has its own VRF (VPN Routing and Forwarding) instance
Keeping separate routing tables for the VPNs
Also separate from the global routing table
MPLS forwarding uses stacked labels
Outer label for LSP forwarding
Inner label to differentiate between different VPNsKarst Koymans Cosmin Dumitru (UvA) MPLS Thursday, March 14, 2013 26 / 26