MPLS, RSVP, etc Olof Hagsand KTHNOC/NADA · OSPF ISIS BGP Label ... BGPfree core (No need for IBGP)...
-
Upload
vuongthien -
Category
Documents
-
view
231 -
download
1
Transcript of MPLS, RSVP, etc Olof Hagsand KTHNOC/NADA · OSPF ISIS BGP Label ... BGPfree core (No need for IBGP)...
Background● MPLS Multiprotocol Label Switching● Originally thought to simplify IP forwarding
– Small label lookup instead of longest prefix match
● Roots in ATM (Asynchronous Transfer Mode)– Early 90s, most telecoms thought ATM would take over all data
and telecommunication
● MPLS was standardized in IETF in mid 90s.
MPLS Advantages
Originally, the motivation was speed and cost.
But routers does IP lookup in hardware at very high speeds.
Current advantages:● Label switching can be used for traffic engineering
– Aggregating a class of traffic and treating it in a specific way
– Control of traffic in a network
● Labels can be used to forward using other fields than destination address● Label switching can be used to support VPNs – virtual private networks● The generalized form of MPLS: GMPLS is ideal for optical network management
MPLS Terminology
MPLS uses some new terminology (MPLS ~ IP)● LSR: Label Switching Router ~ Router
● LER: Label Edge Router ~ Border router– Alternative: PE Provider Edge / CE – Customer Edge
– Also: Egress/Ingress/Transit LSR
● LSP: Label Switched Path ~ Tunnel● FEC: Forwarding Equivalence Class ~ Flow● Label distribution ~ Routing● LFIB: Label Forwarding Information Base ~ FIB
Control and Data Planes
Control Plane(Binding Layer)
Data Plane(Forwarding Layer)
LFIB
LSR
MPLSpacket
MPLSpacket
Control Plane(Routing Layer)
Data Plane(Forwarding Layer)
FIB
Router
IPpacket
IPpacket
Routing:OSPFISISBGP
LabelDistribution:LDPRSVPTEMBGP
Routing:OSPFISISBGP
LabelDistribution:LDPRSVPTEMBGP
Labels● A label is an integer identifying a FEC (or a flow).● You cannot have globally or network unique labels
– Too complex to negotiate
– Too large labels
● Labels are unique only between two nodes● Labels 01048575.
– 015 reserved by the IETF.
● Labels change at each node as a packet traverses a path● You can set labels manually(worse than static routing), or use label
distribution● Example of Label Forwarding Information Base LFIB (MPLS forwarding
table):
20-bit label
InInterface inlabel op outlabel outinterface
if 3 99 swap 203 if1if 3 333 swap 978 if2
Encapsulation
● MPLS uses a 32bit shim header:– Label: value for table lookup in router
– TTL: Time To Live (resembles IP TTL)
– Exp: experimental, several ways to support QoS has been defined
– Stack: indicates that the bottom of a stack of labels has been reached
● Shim headers may be concatenated into stacks
Label hdrEth hdr IP hdr IP payload
20-bit label8bitTTL
1bitstack
3bitexp
Forwarding Equivalence Class (FEC)
Sort packets into different classes – classify them.Example1: All packets to one destination.
Example2: All UDP packets with the ToS field set to 0x42 from subnetwork 192.168.20.0/24
Such a subset is called a Forwarding Equivalence Class
MPLS binds labels to different FECs – Labelling
FECs granularityCoarse – good for scalability
Fine – good for expressibility
FEC label
FEC1 99FEC2 2345... ...
Label assignment
● The border router (LER) classifies packets into FECs– Classification is a more general form of lookup
● Binds a label to the packet– Or to an LSP, which in turn is mapped to a label
● Pushes an MPLS header on the packet● And sends it on
pkt 99 pkt LSP
LER
FEC op outlabel interface
F1 push 99 if1F2 push 300 if2
if1
Label swapping
● A router (LSR) makes a label lookup and swaps the labels● Rewrites the MPLS header● And sends it further on the LSP
99 pktLSPLSP
203 pkt
InInterface inlabel op outlabel outinterface
if 3 99 swap 203 if1if 3 333 swap 978 if2
if1if3
Label popping
● The border router (LER) pops the MPLS packet● And then forwards it as usual depending on the packets protocol● Example: pkt is an IP packet > pkt is sent to IP forwarding
– Thus both MPLS and IP forwarding on same node!
pktLSP
LER
203 pkt
InInterface inlabel op outlabel outinterface
if 3 203 pop (IP lookup) if 3 333 swap 978 if2
if1if3
Penultimate popping
● To make it easier for the border router, pop the label on the previous router (penultimate)
● The penultimate LSR does MPLS pop● The LER does only IP routing
pktLSP
PenultimateLSR
203 pkt
LER
MPLS pop IP routing
if1if3
InInterface inlabel op outlabel outinterface
if 3 203 pop if1 if 3 333 swap 978 if2
Label Switched Path – LSP
LSP
IP pkt33IP pkt
98IP pkt
17IP pkt
58IP pkt
IP pkt
Label hdrEth hdr IP hdr IP payload
Push label
Pop label
Swap label
20-bit label 3-bitexp
1-bitstack
8-bitTTL
An LSP is an abstraction of a set of labels – an MPLS tunnel
Label Stacking
● Used when packet forwarded through transit routing domain● An inner label is transferred through the domain● Push outer label onto stack at ingress LSR, ● swap outer label in domain● pop outer label at egress LSR
inner=3IP pkt
inner=5IP pkt
inner=3IP pkt outer=6
outer=6inner=5IP pkt
inner=3IP pkt outer=7
outer=7inner=5IP pkt
inner=3IP pkt
inner=5IP pkt
Transit Routing Domain
Typical use: MPLS for transit
● Use an IGP to compute internal routes● Setup LSPs between BGP border routers
● Send transit traffic through LSPs!● We do not need to distribute external routes in our IGP● BGPfree core (No need for IBGP)
MPLS+IGP
BGP
BGP
BGP
Label operations
● Label operations are interfacespecific● Push a label (typically at ingress)
– Double push (label stacking)
● Swap a label (typically at transit or penultimate)● Pop a label (typically at egress or penultimate)
Special labels operations
● 0: IPv4 explicit NULL
– Pop unconditionally when packet is received
– Popped packet is an IPv4 datagram
● 1: Router alert
– Deliver to control plane – do not forward
● 2: IPv6 explicitNULL
– Pop unconditionally when packet is received
– Popped packet is an IPv6 datagram
● 3: ImplicitNULL
– Downstream router should pop
– does not appear on link – only in signaling protocol
Label Distribution ● Labels need to be assigned● And LFIBs programmed● A signaling protocol distributes labels
– Creates an LSP through an MPLS network
● New protocol– LDP – Label Distribution Protocol
● Extend existing protocols– BGP – Border Gateway Protocol
– RSVP – Resource Reservation Protocol● These protocols all distributes labels
– But they are somewhat different and can be combined to transfer different labels, eg BGP+RSVP
Label distribution and IGP
● Label distribution protocols typically rely on an IGP (eg OSPF) to find the shortest path of their LSP.– Although RSVP may use sourcerouting as well
● They then assign labels to the LSP on the shortest path.● Labels are assigned in upstream direction normally ● During setup of LSPs, traffic may be blackholed
– IGP and label distribution
– Same is true during reconvergence
Resource Reservation Protocol
● RSVP is a network control protocol used to express quality of service (QoS).– Binds a QoS request to a flow
● RSVP is a receiver oriented protocol.● RSVP delivers QoS reservations along a path from source to
destination(s).– no routing – IGP computes path
– uses soft state – periodically refresh● With MPLS, RSVPTE is used for traffic engineering
– To guarantee a quality for a FEC
– Aggregated flows
– Extended to carry MPLS labels
RSVP Building Blocks
RSVP carries the following information:● Classification information
– Flows with QoS requirements must be recognized within the network
– Includes src and dst IP addr and UDP/TCP port numbers● Or MPLS labels
● Traffic specification (TSpecs)● QoS requirements (FlowSpecs)
RSVP is explicitly designed to support multicastbut MPLS is not,...
RSVP Model
Two types of messages to set up reservations:● PATH message
– From a sender to one or several receivers, carrying TSpec and classification information provided by sender
● RESV message– From receiver, carrying FlowSpec indicating QoS required by receiver
Sender
Receiver
Receiver
PATH msg (TSpec)
RESV msg (FlowSpec)
RSVP and Router Operation
● At each router, RSVP applies admission control
● If the router cannot reserve resources the traffic an error message is returned.
● PATH messages flowing downstreams indicate how the traffic will flow.
● RESV messages flowing upstreams negotiate the actual reservation
– And MPLS labels
MPLS Support for RSVP
● RSVP has been successfully adapted to support MPLS● New objects defined carrying labels● RSVP can express QoS (Tspec, FlowSpec)
– Each LSR associates QoS resources with an LSP
– The ingress router needs to classify and bind traffic to an LSP
– Network resources are then bound to that LSP throughout the network.
Ingess EgressPATH
RESVRESV lbl=5RESV lbl=9
Objects in PATH messages
● Label Request Object– Request an MPLS label for a path
● Explicit Route Object (ERO)– Addresses through which the LSP must pass.
– Used for source routing
● Record Route Object (RRO)– Record the path of the PATH message
● Sender Traffic Specification (Tspec)– A specification of the traffic of this LSP
– Eg: 2Mbps
Objects in RESV messages
● Label Object– Contains a label that was requested
– Labels are thus allocated upstreams
● Record Route Object (RRO)– Record the path pf the RESV message
● Flow Specification (Flowspec)– What was actually reserved
Traffic engineering with RSVPTE/MPLS● RSVP can reserve resources in the network (eg 20Mbps)● RSVP can signal alternative paths using
– Strict source routing
– Loose source routing
● Why? Traffic distribution, alternate paths– Difficult to do with regular routing protocols.
● Example:– LSP loose source routing: via D (Typically node addresses!)
– LSP strict source routing: B1,C,D,E (Typically interface addresses!)
A
B D
E
C
B1
C1
D1 E1
Fast reroute and BFD
● With alternative paths already computed, switchover can be fast● No need to recompute a new best path● Link failures can be detected in many ways
– Loss of signal
– RSVP Path/Resv loss
– BFD – Bidirectional Forwarding Detection
● BFD can detect link failures in ~100ms– Based on a simple ”ping” method
– Is also used for other protocols: OSPF, BGP, etc
● But it is complex to admin several alternate paths in a large network
IP network
L3VPN
netw 1
netw 1
Customer A
Customer B
MPLS LSPs
netw 3
netw 3
Customer A
Customer B
netw 2
Customer A
netw 2
Customer B
Routing between LAN islandsCE/PEs exchange routing
PE PE
PE