Multiprotocol Label Switching (MPLS) 中正大學資工系 黃仁竑.

28
Multiprotocol Label Switching (MPLS) 中中中中中中中 中中中
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    236
  • download

    9

Transcript of Multiprotocol Label Switching (MPLS) 中正大學資工系 黃仁竑.

Multiprotocol Label Switching(MPLS)

中正大學資工系黃仁竑

中正資工 /黃仁竑 2

Outline

Introduction Label Encoding Label Assignment Label Distribution Label Swapping Label Merging Conclusion

中正資工 /黃仁竑 3

Introduction

IETF Multiprotocol Label Switching Working Group created in 1997

Integrates the label swapping forwarding paradigm with network layer routing Use a short, fixed-length label

Examples of MPLS Tag Switching (Cisco)

中正資工 /黃仁竑 4

Why MPLS

MPLS versus Datagram Routed Network Simplified forwarding Efficient explicit routing Traffic engineering QoS routing Complex mapping from IP packets to FEC (Forwarding

Equivalence Class) MPLS versus ATM

Scaling of the routing protocol Common operation over packet and cell media Easier management

中正資工 /黃仁竑 5

Basics of MPLS

Semantics assigned to a stream label Labels are associated with specific streams of data (FEC)

Forwarding Methods Short fixed length labels to identify streams Looking up a label in a table, swapping labels, and

possibly decreasing and checking a TTL May make direct use of layer 2 forwarding (e.g. ATM)

Label Distribution Methods Allow nodes to determine which labels to use for specific

streams May use some sort of control exchange, or be

piggybacked on a routing protocol By LDP

中正資工 /黃仁竑 6

Next Hop Label Forwarding Entry

NHLFE is used when forwarding a labeled packet, it contains next hop operations

replace the label at the top of the label stack with a new label

pop the label stack replace and push one or more new labels data link encapsulation how to encode the label stack other information for properly dispose of the

packet

中正資工 /黃仁竑 7

Label Stack

Label stack A labeled packet may carry a number of labels

A Label A short fixed length significant identifier Based on the stream or forwarding equivalence class (FEC

) Only have local significance

Label encoding MPLS generic encapsulation mechanism ATM SVC, SVP, SVP multipoint encoding methods Others

中正資工 /黃仁竑 8

Label Switched Path (LSP)

Begins with an LSR (LSP Ingress) that pushes on a level m label

Intermediate LSRs make their forwarding decision by label switching on a level m label

Ends (LSP Egress) when forwarding decision is made by label switching on a level m-k label (k>0) or when a forwarding decision is made by non-MPLS forwarding procedures

The label stack may be popped at the penultimate LSR of the LSP, rather than at the LSP Egress reduce times of label lookup at LSP egress

中正資工 /黃仁竑 9

Label Encoding

Generic MPLS encapsulation Between the data link layer and network layer headers Network layer protocol independent A label contains

Label Stack A sequence of label stack entries

Time-to-Live (TTL) Similar to what is provided by IP (e.g. traceroute)

Class of Service (CoS) Allows multiple service classes within the same la

bel

中正資工 /黃仁竑 10

Label Stack Entry

Label(20bits) carries the actual value of the label 0/2:IPv4/v6 Explicit NULL Label

must be sole label stack entry (forward based on IPv4/v6) 1:Router Alert Label;(need software process) 3:Implicit NULL Label

Exp(3bits):reserved S(1bits):Bottom of Stack TTL(8bits):Time to Live

0 20 23 31

Label Exp S TTL

中正資工 /黃仁竑 11

Label Encoding

ATM Switches as LSRs SVC Encoding

Use the VPI/VCI field to encode the label Each LSP is realized as an ATM SVC ATM-LSR cannot perform PUSH or POP

SVP Encoding VPI : Top of label stack VCI : Second label on the stack Permits the use of ATM VP switching can’t include a non-MPLS ATM network

SVP Multipoint Encoding VPI : Top of label stack VCI : Part for the second label on the stack, the remainder to identify th

e LSP ingress Multipoint-to-point VPs

中正資工 /黃仁竑 12

Label Assignment

Topology driven (Tag) In response to normal processing of routing protocol control t

raffic Labels are pre-assigned; no label setup latency at forwarding t

ime Request driven (RSVP)

In response to normal processing of request based control traffic

May require a large number of labels to be assigned Traffic driven (Ipsilon)

The arrival of data at an LSR triggers label assignment and distribution

Label setup latency; potential for packet reordering

中正資工 /黃仁竑 13

Label Distribution

Explicit Label Distribution Downstream label allocation

label allocation is done by the downstream LSR most natural mechanism for unicast traffic

Upstream label allocation label allocation is done by the upstream LSR may be used for optimality for some multicast traffic

A unique label for an egress LSR within the MPLS domain

Any stream to a particular MPLS egress node could use the label of that node.

中正資工 /黃仁竑 14

Label Distribution

Explicit Label Distribution Protocol (LDP) Reliability : by transport protocol (TCP) or as part of LDP Separate routing computation and label distribution

Piggybacking on Other Control Messages Use existing routing/control protocol for

distributing routing/control and label information OSPF, BGP, RSVP, PIM Combine routing and label distribution

Label purge mechanisms By time out Exchange of MPLS control packets

中正資工 /黃仁竑 15

Label Distribution Protocol LDP Peer:

Two LSRs that exchange label/stream mapping information via LDP LDP messages

Discovery messages announce and maintain the presence of LSR via UDP

Session messages maintain session between LDP peers

Advertisement message label operation (Label distribution)

Notification message advisory information and signal error information Error notification:signal fatal errors Advisory notification: status of the LDP session or some previous message

received from the peer.

中正資工 /黃仁竑 16

Label Swapping

Labeled Packet Map the incoming label to

an next hop label, determines where to forward the packet

Encodes the new label stack into the packet, and then forwards it

Unlabeled Packet LSR analyzes the L3 header,

to determine the packet’s stream

Map the stream to a next hop, determines where to forward the packet

Encodes the new label stack into the packet, and then forwards it

L a b e l S w itc h in g R o u te r(L S R )

IP R o u te rM o d u le

1 2

L a b e l

L 3 H e a d e r

P o rt1

L a b e l4

P o rt2

L a b e l6

O u tp u tIn p u t

In c o m in g L a b e l M a p (IL M )

E xam p le : Fo rw ard in g a L ab eled P ack et

D at H 3 6 H 2D at H 3 4 H 2

L 2 H e a d e r

中正資工 /黃仁竑 17

Use of MPLS in a Hierarchy

R 3R 2

R 6R 5R 4

R 1

D om ain 1 D om ain 2

O S P F

B G PL 1

P u shL 2

L 1

L 1S w a p

L 4

L 1P o p

L 3

L 1

S w a pL 3

L 1

L 2

L 1

O U T

L 2

IN

L 3

O U T

L 1

IN

L 1

O U T

L 4

IN

L 2

O U T

L 3

中正資工 /黃仁竑 18

Route Selection

Hop by hop routing Like conventional IP routing Each hop makes independent choice of next hop Repair of a failed route done locally

Explicit routing Manual or based on dynamic routing The LSP next hop is chosen by a single node Useful for policy routing and/or traffic

engineering If an explicit route is specified for an LSP, then

that route must be followed

中正資工 /黃仁竑 19

Loop Handling

Loop Survival minimizes the impact of loops

Loop Detection allows loops to be set up, but detects them

and eliminates them later Loop Prevention

avoiding setting up a loop

中正資工 /黃仁竑 20

Loop Survival

Allow the network to operate well even though short term transient loops may be formed by the routing protocol

Possible solutions Use of TTL to limit the hops that a packet traversed Use of dynamic routing protocol which converges fast

looping packets may cause congestion which may then affect the converge speed of routing protocol

Use of fair queueing to limit the impact of looping packets on normal packets

中正資工 /黃仁竑 21

Loop Detection

Loop may be set up, but will be subsequently detected.

Possible solutions Loop Detection Control Protocol (LDCP)

transmit LDCP packet when route change LDCP is forwarded towards destination until

destination TTL exceeded return to a node which originally transmitted it

Path Vector Control message: list of LSRs on the path hop count to each egress node (like RIP?)

中正資工 /黃仁竑 22

Loop Prevention Ensure loops are never set up Possible solutions

labels are propagated from the egress switch, control packets which propagate the labels also include the path

diffusion mechanism when route changes colored mechanism

a color consist of address of the node that created the color and a local id that is unique within the node

a node that finds a change in the next hop creates a color and passes it to the new next hop

stops when a loop or a loop free path is found explicit routing

configured use routing protocol (link state or path vector)

中正資工 /黃仁竑 23

Diffusion Algorithm

On a route change, R ask N for a label and the associated LSR ID for that stream

R looks in the LSR ID list If R is in the list (route loop), the

old LSP will continue to be used until the route protocol break the loop

If R is not in the list, R will start a diffusion computation

Diffusion computation prunes tree of paths that would loop if R switches to new LSP

When the diffusion completes, R switches to new LSP and discards old LSP

R

N

E

O ld P a thN e w P a th

中正資工 /黃仁竑 24

Diffusion Computation

An extension of Path Vector mechanism An LSR, D, detects the next hop for an FEC has chan

ged, transmits a query message with a Path Vector containing its id to its upstream

A LSR, U, that receives a query will determine if D is the next hop for the given FEC if not, then U return OK message if so, then U checks if the Path Vector already contains it id

if yes, a loop is detected, U responds with a LOOP msg if not, U adds its id to the Path Vector and propagates t

he query message to its upstream neighbors

中正資工 /黃仁竑 25

What to Do if a Loop is Detected

If a loop is know to exist L2 label-swapped path is not setup Packet is forwarding using normal L3 forwarding

Problems : Nodes which are not capable of L3 forwarding

discard packet L2 forwarding faster than L3 forwarding

node will not be capable of forwarding the same volume of traffic at l3, some packets will be discarded

packet lost cause TCP to backoff, which will in turn reduce the load and allow the network to stabilize until the label binding is reestablished again.

中正資工 /黃仁竑 26

Label Merging

Label merging An LSR may want to bind multiple incoming labels to a

particular FEC once packets are transmitted, the information that

they arrived with different labels is not Non-merging LSRs

In ATM, label merging may cause interleaving of cells from various packets

MPLS support procedures which allow ATM switches to function as merging LSRs

中正資工 /黃仁竑 27

Merge over ATM

VP Merge (SVP multipoint encoding) Packet from different sources are distinguished by using dif

ferent VCs within the VP Advantage : no new hardware Disadvantage : requires coordination of the VCI space

VC Merge Switches are required to buffer cells from one packet until t

he entire packet is received Advantage : straightforward application of VC switching Disadvantage :

New hardware (based on per-VC queuing) Delays at the merge points

中正資工 /黃仁竑 28

Conclusion

MPLS A more general forwarding mechanism Cooperates with routing/control protocol Provides Integrated service, Differentiated service Allows flow aggregation (FEC) for QoS routing Support Multicast?