43
1 David Byers [email protected] IDA/ADIT/IISLAB ©2003–2004 David Byers MPLS

TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

1

David [email protected]/ADIT/IISLAB

©20

03–2

004

Dav

id B

yers

MPLS

Page 2: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

2

©20

03–2

004

Dav

id B

yers

Why MPLS

More efficient backbone routingSupport for end-to-end QoSImproved link utilizationRapid recovery from failuresImproved route control

MPLS is about control and scalability.

One of the reasons for introducing MPLS is that IP routing on backbone networks was getting difficult. The full internetrouting table is pretty big, and forwarding packets at line speed with such a large routing table requires a lot from the routers. At the time MPLS was first thought up, there was a real danger that routers would be unable to keep up. Label switching is considerable less expensive than IP routing. The core switching functions are easy to implement in hardware, unlike full IP routing.

This bit about the core reflects one of the most important design principle in any label switched network. The idea is to pushas much expensive processing to the edges of the network, and make the core fast and simple. This does have someimplications, the most important of which is that it’s more or less necessary for the entire MPLS network to be under single administrative control.

MPLS does other things too. MPLS can support end-to-end quality of service. This requires additional support in the controlplane, but the MPLS data plane can deal with QoS flows.

MPLS can also give improved link utilization. In normal IP routing, all packets tend to go down the same path. Some routers do support multipath IP routing, but label switching is better at it. Additionally, some of the problems associated with multipath routing and per-packet load balancing are not present to the same extent in MPLS.

MPLS supports rapid recovery from failures. This is also present in some routing protocols, such as EIGRP, but MPLS in certain modes is faster still. It can maintain a set of backup paths that can be activated very rapidly.

Finally, label switching can improve route control. With IP routing we’re pretty much stuck with hop-by-hop routing. In MPLS, it’s easier to combine hop-by-hop routing, source routing, loose source routing, and other strategies. It’s also possible to apply different strategies to different traffic.

There’s one more reason for MPLS. Existing ATM infrastructure can be retrofitted to MPLS, and MPLS can use the ATM switching plane. This reduces the investment associated with moving to switched IP networks.

Label switching is nothing new. The first label-switched protocol I know of was X.25, which was designed for public switcheddata networks. It is still in use in many places in europe. Later, Frame Relay was introduced, which is also in widespread usein legacy networks. ATM followed. There have also been several attempts to apply label switching to IP neworks. Ipsilondeveloped IP switching, and Cisco tag switching.

MPLS is heavily influenced by tag switching, but is intended as an interoperable standard.

Page 3: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

3

©20

03–2

004

Dav

id B

yers

MPLS Operation

IP Hdr

IP Hdr

LabelIP Hdr

IP Hdr

IP Hdr

IP HdrIP Hdr

IP HdrIP Hdr

Label

Label

LabelLabel

Label

So, let’s look at what MPLS does. It’s a lot like ATM, X.25 or Frame Relay. One difference is that underlying the MPLS network there’s normally a functioning IP network that uses regular hop-by-hoprouting.

At the ingress of an MPLS network there is a device called a label edge router, LER, which adds a label to each packet. The label represents, among other things, the destination of the packet. The label is used throughout the MPLS network to forward the packet. At the other edge of the network, another LER strips the label from the packet, and delivers it using normal IP routing to the destination.

The devices inside the MPLS network are called label switch routers, LSR, and the path taken by a packet is called a Label Switched Path, LSP.

So basically MPLS LERs att labels to packets which are then switched by LSRs along LSPs.

An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network, MPLS labels would be mapped to VPI/VCI numbers, and if the underlying fabric were a Frame Relay network, the MPLS label would be mapped to the DLCI field. The label could even be mapped to a physical wavelength or frequency on a FDM link.

Page 4: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

4

©20

03–2

004

Dav

id B

yers

MPLS Operation

IP Hdr44

IP HdrIP Hdr

IP Hdr13

122

IP HdrIP Hdr

IP Hdr47

18

IP HdrIP Hdr44

Labels, unlike IP addresses, have only local significance on a link. Label 44 on onelink is not necessarily the same set of packets as label 44 on another link. This means that the label on a packet changes as the packet traverses the network, just like VPI/VCI in ATM networks.

We’ll see that occasionally is is necessary to have the same label from end to end. For example, if we’re using GMPLS to provision an optical network, the label is really a frequency, and it is desirable to maintain the same frequency through the entire network.

Page 5: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

5

©20

03–2

004

Dav

id B

yers

Label Stacks

Transit network

44IP Hdr

44IP Hdr

44IP Hdr

15 6744

IP Hdr

MPLS supports stacks of labels. For example, a network provider might want to provide transit service for MPLS traffic. As MPLS packets enter the transit network, a label representing the LSP through the transit network is pushed onto the top of the label stack. The label is popped when the packet leaves the transit network.

Page 6: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

6

©20

03–2

004

Dav

id B

yers

MPLS Operation

Label Edge Router – LERIngress or egress if on LSP

Label Switch Router – LSRLabel Switched Path – LSP

LSP

Egress LER

LERLER

Ingress LER

LER

Page 7: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

7

©20

03–2

004

Dav

id B

yers

Label Assignment

Forwarding Equivalence Class (FEC)Packets to be treated identically w.r.t. forwarding

FEC Label mappingEach FEC corresponds to a labelEach label corresponds to a LSP

Classification performed by the LER

So how are labels assigned to packets? Simple. Labels are selected by the LERs. I guess the question is, how do they know what label to select.

Every packet belongs to a forwarding equivalence class, FEC. The rule is that all packets within a single FEC are to be treated the same way with respect to forwarding. They go to the same destination (within the MPLS network). They will be processed the same way with respect to thingslike QoS. Each FEC is assigned a label by the MPLS network through some kind of label distribution mechanism.

So the LER first determines which FEC an incoming packet belongs to, then looks the FEC up in a table to find the label that corresponds to that FEC. That’s the label to put on the packet.

The use of FECs is an important departure from normal IP routing. In IP routing, routing decisions are based only on the destination IP address. Although it is possible to route based on other attributes, there are no mechanisms for distributing such routing information, and it would increase processingload on all routers.

In MPLS, any set of attributes can determine the FEC. Since classification only happens at the edgeof the network, this still scales. The FEC could be based on the source address, destination address, port numbers, diffserv codepoint, IPv6 flow label or pretty much anything else.

Page 8: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

8

©20

03–2

004

Dav

id B

yers

MPLS LFIB

NHLFE – Next Hop Label Forwarding EntrySpecifies next, label manipulation

ILM – Incoming Label MapMap incoming label to NHLFE entry

FTN – FEC-to-NHLFE MapMap FEC to NHLFE entry

The MPLS forwarding information base can be modeled using three components. The NHLFE is the most important. Each entry in the NHLFE specifies a next hop and a set of label operations. A simple label operation could be to replace the topmost label in the label stack with a new label. It could also be to pop the stack, push a new element onto the stack or a number of other things. The NHLFE mayalso include information about label encoding, L2 encapsulation and so forth.

The ILM maps incoming labels to NHLFE entries. The ILM is used to forward labeled packets. The incoming label is found in the ILM, and the indicated NHLFE entry used to forward the packet.

The FTN is used to map FECs to NHLFE entries. The FTN is typically used in the ingress LER to assign packets to an LSP, but the FTN could be used by internalLSRs to label packets that have, for whatever reason, been forwarded using normal IP routing. I don’t know if this is common practise or not; there would seem to be some problems with this.

Page 9: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

9

©20

03–2

004

Dav

id B

yers

MPLS Architecture

IP Control Plane

RIB

MPLS Control Plane

LFIBLIB

MPLS Data Plane

ILM

FTN

NH

LFE

Data

e.g. LDP

e.g OSPF

A typical LSR for MPLS and IP looks sort of like this. The IP control plane implements the normal routing protocols and generates normal routing tables. The routing tables are fed into the MPLS control plane, which assigns labels to FECs. The MPLS control plane manages the LIB, Label Information Base, and the LFIB, Label Forwarding Information Base.

The LIB plays the same role as the RIB in IPv4 routing. It contains information that isn’t needed to forward packets, but that is necessary when building the LFIB or when recovering from failures. The LFIB is used by the MPLS data plane to forward packets.

Page 10: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

10

©20

03–2

004

Dav

id B

yers

Label Distribution

Packet flow

UpstreamLSR

DownstreamLSR

Downstream router picks label

4.1.1.247

8.0.7.147

Although labels only have local significance, they matter to two LSRs: the switcheson either end of a link. There is a bit of important MPLS terminology here. In a linkon an LSP, the upstream router is the one closest to the beginning of the LSP, and the downstream LSR is the one closest to the destination.

In order to forward a packet, the upstream and downstream routers need to agreeon the meaning of all labels. This process is called label distribution. Since the process of label distribution is entirely separated from the process of switchingpackets, MPLS can support a number of different label distribution mechanisms, even within the same network.

The general principle is that the downstream router picks the label for a FEC on a link. This is important when MPLS is operating on a multi-access link. If the upstream routers were allowed to pick the label, they might pick the same one for different FECs, and then the downstream router would think they belonged to the same FEC.

With the constraint that the downstream router picks the label, there are a fewdifferent ways to manage do it.

Page 11: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

11

©20

03–2

004

Dav

id B

yers

Label Distribution

Downstream unsolicitedDownstream LSR announcesLSP whenever

Downstream on demandUpstream LSR requests label

Label, FEC

2. Label

1. Request label

One mode of label distribution is when the downstream router simply announces a label. The announcement is typically triggered by some event, such as learningabout a new prefix from a routing protocol.

The other mode is downstream on demand. In this mode, the upstream router requests a label from the downstream label. Downstream on demand is similar to how ATM would set up an SVC.

Downstream unsolicited is the mode commonly used in MPLS networks that do not employ explicit (source) end-to-end routing. Most networks based on LDP will usethis mode. Downstream on demand will be used in networks that do employ end-to-end explicit routing. For example, networks that employ RSVP-TE will usedownstream on demand label distribution.

Page 12: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

12

©20

03–2

004

Dav

id B

yers

Packet format

Hop countExp SFLabel

L2 Header MPLS L3 Header Other layers headers and data

L2 Header MPLS L3 Header Other layers headers and dataMPLS MPLS

Stacked MPLS labels

Simple MPLS shim header

Depending on how MPLS is carried, it will use different packet formats. If there is room in the lower-level protocol, MPLS will carry its information there. For otherprotocols, MPLS defines a 32-bit shim header which is placed between the L2 and L3 header.

The shim header contains a 20 bit label followed by three experimental bits, a flag and a hop count. Since MPLS routers don’t process IP headers, the TTL of IP datagrams that enter the network is copied to the hop count field of the MPLS header. At the egress LSR, the hop count is copied from the MPLS header to the IPv4 header. The hop count works the same way as the TTL of IPv4 or the hop limit of IPv6.

The flag is set on the bottom MPLS header of a label stack, so LSRs can recognize the bottom header.

MPLS defines a few reserved labels. A zero label tells the LSR to pop the stack and forward the packet as a regular IPv4 datagram. Two is the same for IPv6. One is a router alert label, which tells the receiving LSR that the packet may need extra processing. The router alert message is retained on the packet as it is forwarded based on the next label in the stack.

Adding MPLS headers may result in packets that won’t fit on the links in the network. Should this occur, the network may pop all labels and forward the packet using normal IP processing. Naturally this is undesirable. It may be better to signal an error in order to force the sender to decrease its packet size.

Page 13: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

13

©20

03–2

004

Dav

id B

yers

Label Distribution Example

10.0.1.0/24

R1

R4 R3

R2

Let’s look at an example of how label distribution could work. In this case we have a four-router network using OSPF as the IP routing protocol. All routers learn of 10.0.1.0/24 through OSPF. The arrows in the picture show how packets will be routed using OSPF.

When R1 learns of 10.0.1.0/24 it selects a label for it, 44, which is announced to R2 and R4. The FEC is simply the same as the IP prefix. When R2 learns of 10.0.1.0/24 through OSPF it also announces a label, 21, to R1 and R3. Note that It announces the label to all neighbors, not just the ones that have R2 as the next hop towards the target. R2 also adds an entry to its LFIB saying that incoming packets with label 22 are to be sent out on interface 1 with label 44. This represents the nexthop, learned from OSPF. The process is similar for R3 and R4.

Note that the LSRs are permitted to remember all labels they hear. What this meansis that if, for example, R3 loses contact with R2, it can instantly switch over to R3 instead. We’re ignoring the possibility of creating routing loops here – that wouldalso have to be handled.

Page 14: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

14

©20

03–2

004

Dav

id B

yers

Route Selection

Hop-by-hop routingUsed in IP networksTypical of MPLS usingindependent DUN

End-to-end QoS hard to guarantee

Explicit (source) routingUsed in ATM with PNNISupported by MPLS duringLSP setup

Better network utilizationHow to select path?

MPLS supports the two main methods for route selection: hop-by-hop routing and explicit (source) routing.

In MPLS, source routing is supported only at LSP setup, sort of like in ATM usingPNNI. Route selection is not carried with each packet – it is implied by the LSP.

Explicit routing is powerful. If the entity doing route selection has or can acquireenough information about the network, it is possible to support end-to-end quality of service. For example, MPLS using OSPF with traffic engineering extensions and RSVP could support so-called integrated services. This is nearly impossible in hop-by-hop routing.

Page 15: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

15

©20

03–2

004

Dav

id B

yers

Label Distribution Protocol

Downstream on demandDownstream unsolicitedOrdered controlIndependent control

Based on UDP and TCP

ProcessDiscover neighborsEstablish sessionsExchange labels

IssuesLabel retentionLoop detectionTraffic engineering

Page 16: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

16

©20

03–2

004

Dav

id B

yers

Mandatory paramters

LDP Messages

Multiple messages per PDU Parameters use TLV encoding

Message ID

Message lengthU Message type

Optional parameters

LDP runs over TCP and uses protocol data units that can contain multiple LDP messages. Each LDP message is typed and contains mandatory and optionalparameters. Parameters are encoded using type-length-value encoding, whichmeans that new parameters can be added in the future (this has happened) and that LSRs can deal with messages containing parameters they don’t recognize.

Page 17: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

17

©20

03–2

004

Dav

id B

yers

LDP Neighbor Discovery

Multicast Hello MessageMulticast UDP packet

Targeted Hello MessageUnicast UDP packet

”Hello”

”Hello”

LDP routers use hello messages, much like OSPF (and many other protocols) to discover neighbors. Hello messages are normally multicase UDP packets (whichimplies that the network needs to function as a normal IP network, before MPLS willwork). Since MPLS uses normal UDP (and later TCP) for its operations, neighborsdon’t need to be physically adjacent. It is perfectly legal to have neighborsseparated by a wide section of network (e.g. a transit network). If two LSRs are not adjacent in the network, the hello message may need to be unicast. LDP does not specify how non-adjacent routers find out each other’s addresses.

Hello messages are used to detect neighbor unreachability. If no hello message is received from a neighbor within the hold time for that neighbor – specified in the previous hello message – then the neighbor is assumed to be unreachable.

Page 18: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

18

©20

03–2

004

Dav

id B

yers

LDP Session Establishment

Initialize

Reject

Initialize

Accept

Peer’s router ID

Keep alive timerProtocol version

Message identifier

Message type Message length

Parameter length

0

U F Session params

Maximum PDU lengthAD Reserved PV limit

Peer’s label space

Once hello messages have been exchanged, the LSR with the highest IP addressinitiates a TCP session. The initiating LSR is active; the other is passive. The TCP session is used to transmit all LDP messages.

When a session is initalized, the LSRs negotiate certain parameters for the session. These include whether the session will use downstream on demand or downstreamunsolicited advertisements and how loop detection is performed (more later). If the passive LSR rejects the proposed parameters, then the active LSR must select new parameters and try again. To avoid an infinite loop of initializations and rejections, the active router uses exponential backoff in its initialization attempts.

Page 19: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

19

©20

03–2

004

Dav

id B

yers

LDP Label Exchange

IndependentControl

OrderedControl

Downstreamunsolicited

• LSR advertises label on request

• No coordination with upstream LSRs

• LSR advertises label onlyif next hop in LSP exists

• Label request forwardedthrough entire LSP

• LSR advertises label onlyif next hop in LSP exists

• Egress router initiatesLSP creation

Con

trol

Mod

e

Downstreamon demand

Advertisement Discipline

• LSR advertises labelsentirely at will

• No coordination with upstream LSRs

We talked about downstream on demand and downstream unsolicited labeldistribution before. These are so-called ”advertisement disciplines” in LDP, and which one is in use is agreed on during session initialization. In addition, LDP supports to control modes: independent and ordered control.

In ordered control, there is coordination between LSRs. In DOU mode, LSRs still announce labels without a request, but will only do so if the next hop in the LSP is already set up. This means that the LSP can only be initiated from the egress router since it is the last hop on all LSPs. In DOD mode, it means that the label requesthas to be forwarded all the way to the egress router, then the LSP is set up from there.

In independent control, each LSP acts independently. Combined with DOU mode and IP routing, an LSR will typically announce a label every time it learns a new destination prefix.

Page 20: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

20

©20

03–2

004

Dav

id B

yers

Downstream on Demand

Independent control Ordered control

1 Request3 Request

2 Label

4 Label

1 Request2 Request

4 Label

3 Label

Click to display arrows.

Let’s look at the difference between independent and ordered control in downstreamon demand mode.

Page 21: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

21

©20

03–2

004

Dav

id B

yers

Label Retention

ConservativeOnly keep next hop labelDOD requests labels onlyfrom next hop

Implied by DOD

LiberalKeep all advertised labelsFaster rerouting

Implied by DUN

LDP routers can choose between two strategies for remembering labels: conservative and liberal.

In conservative label retention, the LSR only retains labels that correspond to the next hop in IP routing. When IP routing changes, LSRs will discard LSPs that no longer correspond to IP routing. Conservative label retention also implies that labelswill only be requested from the next hop along the IP routing path.

An alternative is liberal label retention, in which LSRs may retain labels announcedby all neighbors. In this mode, labels may also be requested from any neighbor. A nice feature of liberal label retention is that an LSR can easily maintain alternative routes, so when a failure occurs, the LSR can switch to a different LSP for the same FEC almost instantly.

Conservative label retention is more or less implied by downstream on demandadvertising, since otherwise the LSR would have to request labels from all peers –not very efficient. Similarly, downstream unsolicited advertisement more or less implies liberal retention since otherwise there would be a lot of traffic for labels that LSRs just discard.

Page 22: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

22

©20

03–2

004

Dav

id B

yers

MPLS Loops

Loop MitigationLoops may be set up, butthe effects are minimized

Loop DetectionLoops may be set up, butare detected and broken

Loop PreventionLoops are never set up

MPLS/LDPMitigation: TTL fieldDetection: LDP path vectorsDetection: LDP hop countPrevention: Explicit routing

NoteLoops tend to form whenrouting changes

There are three categories of measures taken in routing protocols to deal with loops: mitigation, detection and prevention.

Loop mitigation is about minimizing the effects of loops. The TTL field in IP and in MPLS are examples of loop mitigation. The loop is never broken, but packets are eventually dropped. Another example of loop mitigation are routing protocols that may form temporary loops, but that convergetowards loop-freeness. RIP would be an example of a routing protocol that employs loop mitigation.

In loop detection, loops may be set up, but they are detected and broken. LDP supports loop detection through two different mechanisms: path vectors and hop counts. In the case of LDP, if a loop is detected, a label association will be broken to break the loop, and packets may have to be forwarded using IP routing.

Loop prevention means that loops will never be formed at all. EIGRP is an example of a protocol that uses loop prevention. In MPLS, loop prevention is really only supported when explicit routing is in use. Since the entity setting up the route knows the entire route, it can ensure that it does not loop.

A point worth noting in general is that loops tend to form when routing changes. Therefore, LDP cansend out a packet for loop detection when routing changes. If the packet is returned to the originatingLSR, the some label association needs to be torn down to break the loop.

Page 23: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

23

©20

03–2

004

Dav

id B

yers

LDP Path Vectors

PV: APV: A B

PV: A

B C

PV: A B C D

A B

C E

D

PV: A B C

As LDP packets are sent through the network to set up an LSP (either labelmapping messages from the egress LSR or label request messages from the ingress LSR), the path taken is recorded in the path vector TLV of the message.

CLICK THROUGH ANIMATION

It is possible to configure a maximum length for the path vector. If it reaches the maximum length, it is treated as if a loop were detected.

Page 24: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

24

©20

03–2

004

Dav

id B

yers

LDP Hop Count

HC: 1HC: 2

HC

: 3

HC: 4

A B

C E

D

HC: 3HC: 5

HC

: 6

HC: 7

HC: 8

When using hop counts, LDP messages include a count of how many hops havebeen taken so far. Each time a new LDP message is sent as part of the same process (e.g. label request), the hop count is increased. If the hop count reaches a maximum configured value, a loop is assumed.

CLICK THROUGH ANIMATION

Page 25: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

25

©20

03–2

004

Dav

id B

yers

Constraint-Based Routing

Constraint Based RoutingThe path selected between two nodes must satisfya set of constraintsGeneralization of QoS

Example: minimum bandwidth, maximum delay

Page 26: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

26

©20

03–2

004

Dav

id B

yers

Message ID

CR-LDP

Extensions to LDPExplicit routing (strict/loose)Support abstract nodesSupports route pinningTraffic descriptionResource preemption

0x041 (Label Request) Length0

FEC TLV

LSPID TLV

ER TLV

Traffic parameters TLV

Pinning TLV

Resource Class TLV

Preemption TLV

CR-LDP is a set of extensions to LDP for supporting constraint-based routing in MPLS networks. CR-LDP allows the ingress LSE to choose the entire path of the LSP, not just the next hop. What CR-LDP doesn’t do is say how the ingress LSE knows which path to choose. That needs to be solvedusing other mechanisms.

The main features added by CR-LDP are explicit routing with support for groups of nodes in the pathand support for both loose and strict explicit routing; support for route pinning, which is relevant whenloose ER och node groups are used; traffic description, which is the whole point of CR-LDP and resource preemption, which allows a new CR-LSP to preemt an existing CR-LSP (priority-based).

Note that CR-LDP always implies ordered control. If CR-LDP TLVs are present in an LDP message, the receiving router assumes ordered control for the LSP, regardless of what it is configured to usenormally. This allows CR-LSPs to be set up over MPLS networks that use independent control by default.

The label request message is one of the important messages in CR-LDP. A label request contains a FEC TLV which describes the forwarding equivalence class and an LSPID TLV, which gives the CR-LSP a unique identifier. The LSPID can be used during failure recovery, network management and as a hop in explicit routing. A number of optional TLVs follow. The ER TLV specifies explicit routing. The Traffic TLV contains a traffic description. The pinning TLV controls route pinning. The resourceclass TLV can be used to specify what links in the MPLS network are acceptable, and the preemptionTLV manages preemption of existing LSPs.

Page 27: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

27

©20

03–2

004

Dav

id B

yers

Explicit Routing

ER TLV and ER-Hop TLVStrict or loose routing

Next hop typesIPv4 prefixIPv6 prefixAS numberLSPID

0 Length

ER-Hop 1

0x0800 (ER)0

ER-Hop 2

ER-Hop 3

ER-Hop n

L LengthHop type

Prefix/LSPID/AS Number

Explicit routing is supported by allowing the ingress LER to specify an explicit route TLV.

CR-LDP uses the concept of abstract nodes to to explicit routing. Rather thanspecify a precise node in the MPLS network as a hop, it is possible to specify a group of nodes through IPv4 prefix, IPv6 prefix, AS number or LSPID. This makes it possible to specify an ER without complete knowledge of the network topology.

Hops are classified as loose or strict. The path between a strict node and its prior node must contain only nodes from the strict node and the prior node. The pathbetween a loose node and its prior node may contain nodes that do not belong to the prior node or the loose node.

Page 28: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

28

©20

03–2

004

Dav

id B

yers

AS 3

ER Example

AS 2

AS 10

Example 1: the ER TLV specifies AS2 (strict), AS3 (strict)Example 2: the ER TLV specifies AS2 (strict), AS3 (loose)

Note that each AS is an abstract node. We haven’t specified individual routers.

Page 29: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

29

©20

03–2

004

Dav

id B

yers

Flags Frequency Reserved Weight

Traffic Parameters

Peak RatePeak Data RatePeak Burst Size

Committed RateCommitted Data RateCommitted Burst Size

Excess Burst Size

0 Length

Peak Data Rate

0x0810 (TP)0

Peak Burst Size

Committed Data Rate

Committed Burst Size

Excess burst size

Traffic parameters in CR-LDP contain a number of fields. The flags field identifieswhich of the parameters are negotiable. If the ingress LER is willing to accept a smaller than requested value for any of the parameters, it is considered negotiable, and marked as such. The frequency parameter indicates over what period of time averages are calculated. The weight parameter indicates how much of any availableexcess resources are allocated to this LSP.

The traffic itself is characterized by three parameters: the peak rate and committedrate. Traffic should never be sent into the LSP at a rate higher than the peak rate, and the committed rate is the rate which is guaranteed to the LSP. The excess burstsize is used together with the committed rate to measure how much an LSP exceeds its committed rate, and may be used for traffic shaping.

The peak rate is determined by the PDR and PBS. The committed rate by the CDR and CBS. Both are token bucket models, much like the corresponding parameters in ATM. We’ll hear more on the subject in the next lecture.

Page 30: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

30

©20

03–2

004

Dav

id B

yers

Other CR-LDP Features

Route PinningPins loose LSP segments

Resource ClassesAllows network resourcesto be classifiedRestricts LSP to specificclass of resources

Route pinning, when in effect, prevents loose parts of an CR-LSP from beingrerouted. Without route pinning, changes to IP routing could cause loose secrtionsof the LSP to be rerouted. This may be undesirable as it introduces variance intothe preformance of the LSP. When route pinning is in effect, though, the LSP is more sensitive to failures.

CR-LDP allows network administrators to classify network resources (i.e. LSRs and links). Classes are sometimes called colors. During LSP setup, it is possible to restrict the LSP to specific resource classes.

Page 31: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

31

©20

03–2

004

Dav

id B

yers

RSVP-TE

Resource Reservation Protocol – Traffic Engineering

Provide end-to-end QoS in MPLS networksExtension of regular RSVP protocol for MPLS

RSVP-TE is an extension of the RSVP protocol for resource reservation in IP networks that contains extensions for traffic engineering in MPLS networks. It is an alternative to CR-LDP, and supports many of the same features.

Page 32: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

32

©20

03–2

004

Dav

id B

yers

MPLS: RSVP-TESender

Target

PATHRESERVE

Operation: RSVP sends PATH message from sender to recipient. This lets the network record the routers passed along the way.Recipient sends reservation back along the path, reserving resources for the flow. RSVP specifies a number of rules regarding this. For example, in multicastscenarios it is possible to merge reservations from several destinations, and it is possible to under-provision flows.

Page 33: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

33

©20

03–2

004

Dav

id B

yers

RSVP-TE

Soft stateReservations not indefinitePath message refreshes path

Detect changes in pathRecover from failures

Reservation messages refresh reservationReservations not re-reserved are canceled

Page 34: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

34

©20

03–2

004

Dav

id B

yers

MPLS: RSVP vs CR-LDP

ScalabilityRecovery timeDisadvantages

Recovery timeMore scalableAdvantages

RSVP on IPLDP over TCPTransported on

HighLowChat overhead

FasterA little slowerRecovery Time

IntServATMQoS Type

Soft stateHard stateState

Cisco, Juniper, FoundryNortelVendors

RSVP-TECR-LDPComparison

Page 35: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

35

©20

03–2

004

Dav

id B

yers

OSPF-TE

Extension to OSPF LSARecall: LSAs floodedthrough OSPF areaTE LSA has (nested) TLV payload

RFC does not say how to use information in LSA!

Example link TLVsTraffic Engineering MetricMaximum bandwidthMax reservable bandwidthUnreserved bandwidthAdministrative group

OSPF-TE is a set of extensions to OSPF to support traffic engineering. They mimicthe traffic engineering extensions to IS-IS. The one change that has been made is the introduction of a new type of LSA (link state announcement). Recall that LSAsare flooded through the OSPF area, so all routers in the area receive LSAs for all links. The LSA has been given a type-length-value payload. There are two top-levelTLVs: router TLVs for describing routers and link TLVs for describing links.

Link TLVs carry information used in TE. Some of the TLVs defined are: trafficengineering metric, an administrative metric assigned to the link; maximum bandwidth, the maximum bandwidth of the link; maximum reservable bandwidth, the maximum bandwidth that may be reserved (can be more than maximum bandwidthin case oversubscription is permitted); unreserved bandwidth, the amount of reservable bandwidth still available; and administrative group, a group identifier(which would probably map to resource class in CR-LDP).

Page 36: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

36

©20

03–2

004

Dav

id B

yers

BGP Label Distribution

BGP PeersLabel mapping in BGP update messageNo need for LDP

Route ReflectorsGroup of BGP peers candistribute labels using BGPNo need for LDPBetter scalability

UPDATE 10.10.10.0/24AS-PATH X:Y:ZMPLS LABEL: 44

There are extensions defined for BGP, the border gateway protocol, for MPLS labeldistribution. If a MPLS network uses BGP to exchange routing information, MPLS labels can be attached to IP prefixes. In the case of two BGP peers, the information is exchanged using normal BGP update messages.

Since basic BGP requires a full mesh of logical connections, large BGP networksmay use route reflectors. In this case, the route reflector is a mediator with all BGP peers, so each BGP peer needs a single session, with the route reflector. In this configuration, BGP can be used for label distribution within an entire MPLS network.

Page 37: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

37

©20

03–2

004

Dav

id B

yers

MPLS GMPLS

MPLS AssumptionLSR can detect packet or cell boundariesLSR can process headers

GMPLSNo MPLS assumptionThree planes:

Forwarding (data) planeSignaling planeRouting plane

MPLS has one basic assumption that limits its applicability: it assumes that LSRsare able to deliniate packets or cells and process headers.

GMPLS is a generalization of MPLS that does away with this assumption, whichmakes it possible to use GMPLS for network provisioning. MPLS can be used to provision data streams through a network, but the network has to process eachpacket. GMPLS operates at a higher level: it can provision the network itself, creating a data path without concern for how it is used.

In GMPLS switching can be based on attributes such as wavelengths, ports and timeslots.

Page 38: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

38

©20

03–2

004

Dav

id B

yers

GMPLS Interface Classes

Packet-Switch CapableLayer-2 Switch CapableTDM CapableLambda Switch CapableFiber Switch Capable

GMPLS classifies interfaces into a number of classes. Packet-Switch Capable interfaces are like most conventional MPLS interfaces. They can detect packet boundaries and forward packets basedon header information.

L2 switch capable interfaces can detect L2 frame boundaries and forward frames based on L2 header information. Examples include ATM interfaces and Ethernet bridges.

Time Division Multiplex Capable interfaces switch data based on the repeating timeslot the data belongs to. Examples include PDH interfaces (e.g. switching DS0s contained within a DS1) and SONET/SDH interfaces. Certain radio interfaces (e.g. GSM) are also TDM interfaces.

Lambda switch capable interfaces should probably be called FDM capable interfaces. They canswitch data based on which frequency it was received at.

Finally, fiber switch capbable interfaces can switch data based on the physical port it was receivedon. This should probably be properly called space division multiplexing switch capable.

Circuits can be established only through interfaces of the same type. Circuits are called LSPs. So a conventional MPLS LSP would be a GMPLS LSP involving PSC interfaces.

Page 39: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

39

©20

03–2

004

Dav

id B

yers

GMPLS Hierarchies

PSC

Lin

ks

TDM

Lin

ks

LSC

Lin

ks

FSC

Lin

ks

λ1

λ2

Fiber

GMPLS supports LSP hierarchies (label stacks in MPLS), but in GMPLS each levelcan be a different type of interface. This means that is is possible to provision PSC (regular MPLS) links within TDM links, also provisioned with GMPLS, inside LSC links (wavelengths) inside FSC links (individual, physical, fibers).

Page 40: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

40

©20

03–2

004

Dav

id B

yers

LSP PCS

LSP PCS

LSP TDM

LSP TDM

LSP λ

GMPLS Hierarchy

Page 41: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

41

©20

03–2

004

Dav

id B

yers

GMPLS vs MPLS

Extended label encodingWavelength, port, timeslot

Start/end at similar interfacesPSC PSC etc

Suggest/limit label assignmentsE.g. provisioning λ with no wavelength conversion

Bidirectional LSPs

This is an overview of differences between MPLS and GMPLS.

GMPLS can encode labels as timeslots, frequencys, physical ports. This generalizes the concept of a label and is sort of the whole reason for GMPLS.

In MPLS a LSP has to start and end at a router. In GMPLS the restriction is that the LSP has to start and end at the same type of interface (PSC, TDM, LSC etc).

The payload types are extended to allow payloads such as SONET/SDH, Ethernet etc.

GMPLS allows an upstream node to suggest and even limit the selection of labels by a downstreamnode during LSP setup. This can speed up setup, and if labels represent wavelengths, may be necessary if wavelength conversion is not available.

GMPLS suppors establishment of bidirectional LSPs.

GMPLS includes a number of features not found in MPLS, including rapid fault management, bundling of LSPs, all of which contribute to increased scalability. The GMPLS RFC is quite readable.

Page 42: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

42

©20

03–2

004

Dav

id B

yers

Summary

MPLSCurrent value in TEUses IP networkEnd-to-end QoS with CR-LDP or RSVP-TE

GMPLSGeneralizes MPLS labels to WDM, TDM, SDM etcBetter scalability

To summarize. MPLS is a flexible label switchin protocol. It separates the controland data (forwarding) planes cleanly. Although it was designed for increasedforwarding performance, its value today is in traffic engineering. The performance considerations that motivated MPLS are no longer valid. MPLS typically needs an IP network since its control protocols are IP based. Most deployments will interface with a normal routing protocol, OSPF or IS-IS, to set up label assignments for all known prefixes. In order to get end-to-end QoS, MPLS can employ either CR-LDP or RSVP-TE. In these cases, MPLS supports source routing and resourcereservation. Since the control plane is separate from the data plane, other protocolsmight replace LDP or RSVP in the future.

MPLS, like other label switched protocols, pushes as much of the heavy processingto the edge of the network as possible. This makes for a very fast, very simple, core.

GMPLS is a generalization of MPLS in which labels can be encoded as wavelengths, timeslots or other things. This allows GMPLS to provision things like channels in TDM networks, or wavelengths in optical networks. I suspect that GMPLS, or an evolution of GMPLS may end up being the answer to the problem of rapid provisioning in WDM networks. GMPLS also provides greater scalability and reliability, necessary since GMPLS networks are expected to carry a large numberof LSPs.

Page 43: TDTS02 - 7 - MPLS 2TDTS02/TDTS02 - MPLS.pdf · An MPLS label is a number, but that number could be mapped to other things. For example, if the underlying fabric is an ATM network,

43

©20

03–2

004

Dav

id B

yers

MPLS and ICMP

10.0.1.9

10.0.1.1

130.236.189.12

44

Data 12

Data 33

ICMP

ICMP

MPLS creates some interesting problems with respect to ICMP messages. ICMP messages are normally generated when an error occurs, and returned to the sourceof the triggering IP datagram. However, in MPLS networks this is not alwayspossible. If the LSP is a VPN implementation, then the source address may be an unrouteable address. The ingress and egress routers will be able to route to the source and destination addresses, but the intervening MPLS routers may be unableto do so.

In this case, the MPLS network will forward the ICMP message to the egress router, which will return it to the sender.

MPLS also defines some ”extensions” to ICMP. Instead of including a copy of the triggering IP datagram in the ICMP error message, the first 128 bytes are copied, followed by an MPLS object, which includes, among other things, the last label usedfor the datagram. If you use a modern version of traceroute to trace a path that includes an MPLS network, you may see MPLS labels returned this way.