Multiprotocol Label Switching
Multiprotocol Label Switching
-Simhadri
Internet
LER
LER IP
LSR
LSR
MPLS LSR
LSR MPLS
LER IP
9
Copyright © 2013 Tech Mahindra. All rights reserved. 9
MPLS Benefits
Comparing MPLS with existing IP core and IP/ATM
technologies, MPLS has many advantages and benefits:
The performance characteristics of layer 2 networks
The connectivity and network services of layer 3
networks
Improves the price/performance of network layer
routing
Improved scalability
Improves the possibilities for traffic engineering
Supports the delivery of services with QoS guarantees
Avoids need for coordination of IP and ATM address
allocation and routing information
10
Copyright © 2013 Tech Mahindra. All rights reserved. 10
Necessity of L3 Forwarding
For security
To allow packet filtering at firewalls
Requires examination of packet contents, including the
IP header
For forwarding at the initial router - used when hosts don’t
do MPLS
For Scaling
Forward on a finer granularity than the labels can
provide
11
Copyright © 2013 Tech Mahindra. All rights reserved. 11
Carrying a Label
Certain link layer technologies can carry label as a part
of their link layer header
e.g ATM & Frame Relay
Link layers that do not support labels in their header
carry them in a “shim” label header
12
Copyright © 2013 Tech Mahindra. All rights reserved. 12
MPLS Header Format
20 3 1 8
13
Copyright © 2013 Tech Mahindra. All rights reserved. 13
Establishing Label Switched Path
LSPs are generated and maintained in a distributed
fashion
Each LSR negotiates a label for each Forwarding
Equivalence Class (FEC) with its upstream and
downstream neighbors using a distribution method
Label Information Base (LIB) - Result of negotiation
14
Copyright © 2013 Tech Mahindra. All rights reserved. 14
LDP - Terminology
Label Distribution Protocol (LDP)
– set of procedures by which LSRs establish LSPs
– mapping between network-layer routing information
directly to data-link layer switched paths
LDP peers:
– two LSRs which use LDP to exchange label/stream
mapping
– information exchange known as “LDP Session”
15
Copyright © 2013 Tech Mahindra. All rights reserved. 15
LDP Message Exchange
Discovery messages - used to announce and maintain
the presence of an LSR
Session messages - used to establish, maintain and
terminate sessions between LDP peers
Advertisement messages - used to create, change,
and delete label mappings
Notification messages - used to provide advisory
information and to signal error information
16
Copyright © 2013 Tech Mahindra. All rights reserved. 16
LDP Message Format
0 1 2 3
01234567890123456789012345678901
Message ID
Mandatory Parameters
Optional Parameters
17
Copyright © 2013 Tech Mahindra. All rights reserved. 17
LDP Protocol Data Units (PDUs)
LDP message exchanges are accomplished by
sending LDP PDUs
Each LDP PDU is an LDP header followed by LDP
message
The LDP header is:
0 1 2 3
01234567890123456789012345678901
LDP Identifier
18
Copyright © 2013 Tech Mahindra. All rights reserved. 18
Forwarding Equivalence Class (FEC)
Introduced in MPLS standards to denote packet
forwarding classes
Comprises traffic
Why FEC?
– To precisely specify wto a particular destination
– to destination with distinct service requirements
– hich IP packets are mapped to each LSP
– Done by providing a FEC specification for each
LSP
19
Copyright © 2013 Tech Mahindra. All rights reserved. 19
LSP - FEC Mapping
20
Copyright © 2013 Tech Mahindra. All rights reserved. 20
Rules for Mapping packet to a LSP
If exactly one LSP’s Host Address FEC element ~ packet’s
IP destination address, packet is mapped to that LSP
If there are multiple LSPs satisfying the above condition,
then the packet is mapped to one of those LSPs†
If a packet matches exactly one LSP, packet is mapped to
that LSP
If packet matches multiple LSPs, mapped to one with the
longest prefix match
21
Copyright © 2013 Tech Mahindra. All rights reserved. 21
Label Spaces
22
Copyright © 2013 Tech Mahindra. All rights reserved. 22
LDP Identifiers
A six octet quantity
used to identify specific label space within an LSR
First four octets encode LSR’s IP address
Last two octets identify specific label space
Representation <IP address> : <label space id>
– e.g., 171.32.27.28:0, 192.0.3.5:2
Last two octets for platform-wide label spaces are
always both zero
23
Copyright © 2013 Tech Mahindra. All rights reserved. 23
LDP Discovery
A mechanism that enables an LSR to discover potential
LDP peers
Avoids unnecessary explicit configuration of LSR label
switching peers
Two variants of the discovery mechanism
– basic discovery mechanism: used to discover LSR
neighbors that are directly connected at the link level
– extended discovery mechanism: used to locate LSRs
that are not directly connected at the link level
24
Copyright © 2013 Tech Mahindra. All rights reserved. 24
LDP Discovery contd..
Basic discovery mechanism
– To engage - send LDP Hellos periodically
– LDP Hellos sent as UDP packets for all routers on that
subnet
Extended discovery mechanism
– To engage - send LDP targeted Hellos periodically
– Targeted Hellos are sent to a specific address
– Targeted LSR decides whether to respond or to ignore the
targeted Hello
LDP Link Hello sent by an LSR
– carries the LDP identifier for the label space the LSR
intends to use for the interface
25
Copyright © 2013 Tech Mahindra. All rights reserved. 25
Session establishment
Exchange of LDP discovery Hellos triggers session establishment
Two step process
Transport connection establishment
– If LSR1 does not already have a LDP session for the exchange of label spaces
LSR1:a and LSR2:b, it attempts to open a TCP connection with LSR2
– LSR1 determines the transport addresses at it’s end (A1) and LSR2’s end (A2) of
the TCP connection
– If A1>A2, LSR1 plays the active role; otherwise it is passive
Session initialization
– Negotiate session parameters by exchanging LDP initialization messages
26
Copyright © 2013 Tech Mahindra. All rights reserved. 26
Diagram
NON EXISTENT
Session connection Rx Any LDP msg except
Rx Any other established Init msg or Timeout
msg or (Passive
Timeout Role) INITIALIZED (Active
Tx NAK msg Rx Role)
Acceptable
Tx Init msg
Init msg/
Tx Init msg &
KeepAlive
msg
OPENREC OPENSENT Rx Any other
Rx KeepAlive msg or
Timeout
msg Rx Acceptable Init msg Tx NAK msg
Tx KeepAlive msg
OPERATIONAL Rx Shutdown
All other LDP msgs msg or Timeout
Tx Shutdown msg
Rx - Receive
Tx - Transmit
Copyright © 2013 Tech Mahindra. All rights reserved. 27
Session Initialization State Transition
Table
STATE EVENT NEW STATE
30
Copyright © 2013 Tech Mahindra. All rights reserved. 30
Label Distribution Control Mode
31
Copyright © 2013 Tech Mahindra. All rights reserved. 31
Label Distribution Control Mode
contd..
Ordered Label Distribution Control
Initiates transmission of label mapping for a FEC only if it has next FEC next
hop or is the egress
If not, the LSR waits till it gets a label from downstream LSR
LSR acts as an egress for a particular FEC, if
– next hop router for FEC is outside of label switching network
– FEC elements are reachable by crossing a domain boundary
32
Copyright © 2013 Tech Mahindra. All rights reserved. 32
Label Retention Mode
33
Copyright © 2013 Tech Mahindra. All rights reserved. 33
Label Information Base
34
Copyright © 2013 Tech Mahindra. All rights reserved. 34
Hierarchical Operation in MPLS
Example:
•External Routers A,B,C,D,E,F - Talk BGP
•Internal Routers 1,2,3,4,5,6 - Talk OSPF
C D
Domain #2
1 6
2 3 4 5
A B E F
Domain #1 Domain #3
When IP packet traverses domain #2, it will contain two labels, encoded as a “label
stack”
Higher level label used between routers C and D, which is encapsulated inside a
lower level label used within Domain #2
Operation at C
C needs to swap BGP label to put label that D expects
C also needs to add an OSPF label that 1 expects
C therefore pushes down the BGP label and adds a lower level label
36
Copyright © 2013 Tech Mahindra. All rights reserved. 36
Label Stack
37
Copyright © 2013 Tech Mahindra. All rights reserved. 37
Multipath
38
Copyright © 2013 Tech Mahindra. All rights reserved. 38
Multipath contd..
Second approach
Only one switched path from one ingress node to a destination
Conserves switched paths but cannot balance loads across downstream links as well
as other approaches
LSP may be different from the normal L3 path
Third approach:
Allows single stream to be split into multiple streams, by using L3 forwarding
e.g. might use a hash function on source and destination IP addresses
Conserves paths at the cost of switching performance
40
Copyright © 2013 Tech Mahindra. All rights reserved. 40
Explicit Routing in MPLS contd..
41
Copyright © 2013 Tech Mahindra. All rights reserved. 41
Loops and Loop Handling
42
Copyright © 2013 Tech Mahindra. All rights reserved. 42
Loop Survival
43
Copyright © 2013 Tech Mahindra. All rights reserved. 43
Loop Detection
44
Copyright © 2013 Tech Mahindra. All rights reserved. 44
Loop Detection (cont.)
45
Copyright © 2013 Tech Mahindra. All rights reserved. 45
Loop Prevention
46
Copyright © 2013 Tech Mahindra. All rights reserved. 46
Leaf Leaf
Leaf
Detects loop
immediately
Ingress Node
Egress Node 47
Copyright © 2013 Tech Mahindra. All rights reserved. 47
Traffic Engineering and Performance
Objectives
Traffic Engineering (TE) is concerned with performance optimization of
operational networks
The key performance objectives
traffic oriented - aspects that enhance the QoS of traffic streams e.g
minimization of packet loss
resource oriented - aspects that pertain to the optimization of resource
utilization e.g efficient management of bandwidth
48
Copyright © 2013 Tech Mahindra. All rights reserved. 48
Performance Objectives (cont.)
49
Copyright © 2013 Tech Mahindra. All rights reserved. 49
Traffic and Resource Control
50
Copyright © 2013 Tech Mahindra. All rights reserved. 50
MPLS and Traffic Engineering
51
Copyright © 2013 Tech Mahindra. All rights reserved. 51
Augmented Capabilities
52
Copyright © 2013 Tech Mahindra. All rights reserved. 52
Basic operation on traffic trunks
53
Copyright © 2013 Tech Mahindra. All rights reserved. 53
Basic attributes of traffic trunk
54
Copyright © 2013 Tech Mahindra. All rights reserved. 54
Resource Attributes
Part of the topology state parameters used to constrain the routing of traffic trunks
through specific resources
Main components
Maximum Allocation Multiplier (MAM) - administratively configured to determine the
proportion of resource available for allocation
Resource Class Attribute - administratively assigned parameters which express some
notion of “Class” for resources
55
Copyright © 2013 Tech Mahindra. All rights reserved. 55
Constraint Based Routing
56
Copyright © 2013 Tech Mahindra. All rights reserved. 56
Constraint Based Routing (cont.)
57
Copyright © 2013 Tech Mahindra. All rights reserved. 57
Constraint Based Routing (cont.)
Traffic Characteristics
Described in the Traffic Parameter TLV in terms of peak rate, committed
rate and service granularity
Preemption
Setup and Holding priorities are used to rank new and existing paths
respectively to determine if new paths can preempt existing paths
Allocation of these priorities is a network policy
58
Copyright © 2013 Tech Mahindra. All rights reserved. 58
Constraint Based Routing (cont.)
Route Pinning
applicable to segments of an LSP that are loosely routed i.e the next hop
is an abstract node
used if the LSP need not be changed
Resource Class
While setup , indication must be given as to which class the CRLSP can
draw resources from
59
Copyright © 2013 Tech Mahindra. All rights reserved. 59
Implementation Consideration
Management Interface
61
Copyright © 2013 Tech Mahindra. All rights reserved. 61
Tag Switching
63
Copyright © 2013 Tech Mahindra. All rights reserved. 63
Destination Based forwarding model of
Tag Switching
A B
64
Copyright © 2013 Tech Mahindra. All rights reserved. 64
Information for constructing TFIB
65
Copyright © 2013 Tech Mahindra. All rights reserved. 65
Initial TFIB Entries
66
Copyright © 2013 Tech Mahindra. All rights reserved. 66
TFIB Entries after Tag Distribution
67
Copyright © 2013 Tech Mahindra. All rights reserved. 67
Behavior during routing change
A B
if1 if2
Link Down
68
Copyright © 2013 Tech Mahindra. All rights reserved. 68
Updated TFIB
69
Copyright © 2013 Tech Mahindra. All rights reserved. 69
Hierarchy of Routing Knowledge
70
Copyright © 2013 Tech Mahindra. All rights reserved. 70
Hierarchy of Routing Knowledge (cont.)
71
Copyright © 2013 Tech Mahindra. All rights reserved. 71
Hierarchy of Routing knowledge model
Routing Routing
domain Routing domain A domain
B C
V T X Y W Z
TSR
72
Copyright © 2013 Tech Mahindra. All rights reserved. 72
TFIB Entries in Routing Domain A
73
Copyright © 2013 Tech Mahindra. All rights reserved. 73
Label Stack During Hierarchical Routing
Top of
Stack
10 Top of
Stack
2 2
Stack after processing in Stack after processing in
TSR T TSR W
74
Copyright © 2013 Tech Mahindra. All rights reserved. 74
Multicast in Tag Switching
75
Copyright © 2013 Tech Mahindra. All rights reserved. 75
Multicast in Tag Switching (cont.)
Procedures are used to partition the set of tags for use with multicast into
disjoint subsets and care is taken to avoid overlapping with the help of
HELLO packets
TSR connected to a common sub-network and those which are a part of
the same distribution tree elect one TSR that will create the tag bindings
and distribute them and any TSR can join the group using the JOIN
command
76
Copyright © 2013 Tech Mahindra. All rights reserved. 76
Multicast model in Tag Switching
A B
TSR
if0
D
if0 if1
if2
if0 if0
E 77 F
Copyright © 2013 Tech Mahindra. All rights reserved. 77
RSVP with Tag Switching
78
Copyright © 2013 Tech Mahindra. All rights reserved. 78
Explicit Routes
Tag switching supports explicit routes with the help of a RSVP object - the
Explicit Route Object
The object is carried in the RSVP “PATH” message
The tag information is carried in the Tag Object by the RSVP “RESV”
79
Copyright © 2013 Tech Mahindra. All rights reserved. 79
IP Switching
Introduced by Ipsilon
Already been tested in the field
Significant Innovation: Defined a switch management protocol (GSMP)
along with label binding protocol called Ipsilon Flow Management Protocol
(IFMP)
General Switch Management Protocol (GSMP) - allows an ATM switch to
be controlled by an “IP switch controller”
80
Copyright © 2013 Tech Mahindra. All rights reserved. 80
IP Switching Overview
IP over ATM models are complex and inefficient - involve running two
control planes
ATM Forum signaling and routing
IP routing and address resolution on top
In contrast IP Switching uses
IP component plus label binding protocol
completely removes ATM control plane
Goal: To integrate ATM switches and IP routing in a simple and efficient
way
81
Copyright © 2013 Tech Mahindra. All rights reserved. 81
Removing ATM Control Plane
IP
ATM MARS NHRP
ARP
PNNI
IP IFMP
Q.2931
(a) (b)
82
Copyright © 2013 Tech Mahindra. All rights reserved. 82
IP Switching Architecture
Switch controller
control processor of the system
uses GSMP to communicate with ATM switch itself
runs IP routing and forwarding code
Default VC
defined to get control traffic before IP Switching is performed
uses well known VCI/VPI value
also used for data that doesn’t yet have a label
Switch controller
Flow Classification and control
To
To Routing downstream
GSMP
IFMP
upstream and switch
switch forwardin
g
GSMP
Default Default
VC VC
Data Data
VC VC
Switch
84
Copyright © 2013 Tech Mahindra. All rights reserved. 84
IP Switching Basics
Redirect: Redirect:
Flow y VPI/VCI 3/57 Flow y VPI/VCI 2/22
Switch
A B C Controller
Default Default
VC VC Switch
Element
3/57 2/22
Switch B and C redirect the same flow, allowing it to be switched at B
Copyright © 2013 Tech Mahindra. All rights reserved. 87
Ipsilon Flow Management Protocol
(IFMP)
88
Copyright © 2013 Tech Mahindra. All rights reserved. 88
IFMP’s Redirection Protocol
89
Copyright © 2013 Tech Mahindra. All rights reserved. 89
FMP Redirect Protocol Message Format
Version Op code Checksum
Sender Instance
Peer Instance
Sequence Number
Label
Flow identifier
91
Copyright © 2013 Tech Mahindra. All rights reserved. 91
General Switch Management Protocol
(GSMP)
GSMP is a master/slave protocol
ATM switch is the slave
Master could be any general purpose computer
The protocol allows the master to
Establish and release VC connections across the switch
Perform port management (Up, Down, Reset, Loopback)
Request Data (configuration information, statistics)
Allows slave to inform master if something interesting, such as link failure, happens
on the switch
92
Copyright © 2013 Tech Mahindra. All rights reserved. 92
GSMP contd..
GSMP packets are LLC/SNAP encapsulated and sent over ATM link using
AAL5
GSMP Adjacency Protocol
used to gain information about the system at the other end of the link and
to monitor link status
GSMP Connection Management Protocol
used to ensure consistency between the GSMP master and slave
also specifies the QoS using a priority field
93
Copyright © 2013 Tech Mahindra. All rights reserved. 93
Implementations & Contributions
IP Switching products
available since 1996
Ipsilon product family uses Intel Pentium-based PC as the switch controller
Also offers a number of ATM switches that are controlled by the switch controller
IP Switching made the following significant contributions to label switching effort:
first to deliver real products and caused activity that resulted in the development of
Tag Switching and ultimately the formation of MPLS working group
contributed GSMP
94
Copyright © 2013 Tech Mahindra. All rights reserved. 94