Anda di halaman 1dari 34

Metanoia, Inc.

Critical Systems Thinking

Multi-Protocol Label Switching: Basics & Applications


Dr. Vishal Sharma Email: v.sharma@ieee.org Web: http://www.metanoia-inc.com
Copyright 2002-2005 All Rights Reserved

Metanoia, Inc.
Critical Systems Thinking

The Start: Routing Process at a Router


Destination address (DA)
Receive incoming pkt. Yes Deliver datagram to protocol module (TCP/UDP) specified in IP hdr.

based forwarding
Longest prefix matching

DA=my_add or DA= IP brdcst add. ? No RT entry = complete DA?

Routing Table
DA Host entry Host entry Host entry Host entry N/w entry N/w entry Default
Copyright 2002-2005 All Rights Reserved

Yes

Send pkt. to next-hop router or to directly connected interface.

Next hop router 198.168.7.3 X 198.168.7.4 X

Network Interface 2 3

No Yes

RT entry = Destn. n/w id?

198.168.7.1 198.168.7.5 1 198.168.7.2 198.168.7.5 1 198.100.x.x 198.100.9.1 4 128.72.x.x x.x.x.x 128.72.55.4 5 128.84.73.1 6
No Yes

Send pkt. to nexthop router or to directly connected interface.

Default entry exists? No

Send pkt. to next-hop router.

Datagram undeliverable. (Use ICMP to inform source.)


MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

How Routing Works Today


Packet generated
DA = 198.100.9.75

198.168.7.3 198.168.7.1 198.168.7.5

Longest prefix match gives next hop router as 198.100.9.1 and outgoing interface as 4.

DA Host entry Host entry Host entry Host entry N/w entry N/w entry

Next hop router 198.168.7.3 X 198.100.9.75 198.168.7.4 X 198.100.9.75

N/w Int. 2 3

198.168.7.1 198.168.7.5 1 198.100.9.75 198.168.7.2 198.168.7.5 1 198.100.9.75 198.100.x.x 198.100.9.1 4 198.100.9.75 128.72.x.x x.x.x.x 128.72.55.4 5 128.84.73.1 6

198.168.7.4

198.100.x.x 3 4 5 198.100.9.1

Default

1
198.168.7.2 198.168.7.6 6 128.84.x.x

Routing table (RT) at 198.168.7.6

198.100.9.7 5 128.72.x.x

128.84.73.1

128.72.55.4

How do routers build their routing tables? By exchanging information with each other using routing protocols
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

How it Would be with Labels


Packet generated
DA = 198.100.9.75

Attach label
198.168.7.3 198.168.7.1 198.168.7.5

Exact matching label swapping gives outgoing label as and outgoing interface as 4.
198.168.7.4

Incoming label

Outgoing label

Address prefix N/w Int. X 2 198.100.x.x 128.72.x.x 4 5

Label Forwarding Table at 198.168.7.6


2 198.100.x.x 3 4 5 6 198.100.9.1 198.100.9.7 5 128.72.x.x

1
198.168.7.2 198.168.7.6

128.84.x.x

128.84.73.1

128.72.55.4

How do routers learn the labels? By interpreting routing information and through signaling
Copyright 2002-2005 All Rights Reserved

(as we will learn later)


MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

Shortest-Path Routing: Little Flexibility


DA
198.101.84.21 198.168.7.1 198.168.7.5 198.168.7.4

Host entry Host entry Host entry N/w entry N/w entry

Next hop router 198.168.7.4 X 198.168.7.1 198.168.7.5 198.168.7.2 198.168.7.5 198.101.x.x 198.168.7.4 198.100.x.x 198.100.9.1 128.72.x.x x.x.x.x 128.72.55.4 128.84.73.1

N/w Int. 3 1 1 3 4 5 6

R3

R1
1 198.168.7.2 198.168.7.6 6 128.84.x.x 128.84.73.1

N/w entry Default


198.100.9.7 198.100.9.1 5 128.72.x.x 198.100.x.x

R2

Routing table (RT) at 198.168.7.6

R4
128.72.55.4

Shortest path converges traffic on a few network links Significant increase in congestion Unbalanced resource utilization
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Labels De-couple Routing and Forwarding: Much more Flexibility


Incoming label
198.101.84.21 198.168.7.1 198.168.7.5 198.168.7.4

Metanoia, Inc.
Critical Systems Thinking

Outgoing label

Address Prefix N/w Int. X 2 198.101.x.x 4 3

R3

198.101.x.x

R1
1 198.168.7.2 198.168.7.6 6 128.84.x.x 128.84.73.1

3 4

Label Forwarding Table at 198.168.7.6

R2

198.100.9.7 198.100.9.1 5 128.72.x.x 198.100.x.x

R4
128.72.55.4

Labels enable:
Differentiation based on criteria other than shortest path

Permit policy routing


Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

Basic Concept of MPLS


DA Next hop router 128.89.10.x 198.168.7.6 179.69.x.x 198.168.7.6 N/w Int. 1 1

DA

Next hop router 128.89.10.x 128.89.10.1 179.69.x.x 179.69.42.3

N/w Int. 1 2

Routing Table

128.89.10.x
In label
X X

Out label

Address Prefix N/w Int.

In label

Out label

Address Prefix N/w Int.

128.89.10.12
Label Table R3

3 4

128.89.10.x 179.69.x.x

1 1

3 4

5 7

128.89.10.x 179.69.x.x

1 2

1
R1

Advertises binding <5, 128.89.10.x>

R2

198.168.7.6 Advertises bindings <3, 128.89.10.x> <4, 179.69.x.x>

Advertises binding <7, 179.69.x.x> 179.69.x.x


R4

Routing fills routing table


Signaling fills label forwarding table
Copyright 2002-2005 All Rights Reserved

179.69.42.3
7

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

Basic Concept of MPLS


Pop label
Address Prefix N/w Int.

In label
X
X

Out label

Address Prefix N/w Int.

In label

Out label

Forward packet

3 4

128.89.10.x 179.69.x.x

1 1

3 4

5 7

128.89.10.x 179.69.x.x

1 2

128.89.10.x

128.89.10.12
R3

Swap Label
3 R1 3 Packet arrives DA=128.89.10.25 R3 Push Label

1
R2

198.168.7.6

179.69.x.x
R4

179.69.42.3
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Metanoia, Inc.
Critical Systems Thinking

A Word on Network Layer Routing


Control Component
Responsible for construction and maintenance of forwarding table. Consists of: Routing protocols for exchange of routing info.

Algorithms to convert this into forwarding table


Forwarding/data Component
Control Plane

Algos. used to make forwarding decision on packet The algorithms define: Information from packet used to find an entry in the forwarding table

Forwarding /Data Plane

Exact procedures

used to find that entry

For unicast routing Information = Network layer (IP) address Procedure = Longest prefix matching

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

So What about MPLS Control and Forwarding?


Superset of conventional router control
Control Component

Metanoia, Inc.
Critical Systems Thinking

Distribute routing info. via network layer routing (OSPF, BGP, etc.) Algos. to convert routing info. into forwarding table for fwding component
Create binding from FEC (derived from routing info.) --> label Assign and distribute labels to peer LSRs via signaling

Uses a label switching forwarding table (or LIB), looking as:


Incoming Label Map First Subentry Forwarding Component Outgoing label Outgoing inf. Next hop address Second Subentry (for multicast or load balancing) Outgoing label Outgoing inf. Next hop address

Incoming Label

Next hop label forwarding entry (NHFLE)

Forwarding algorithm = label swapping, independent of control component (implementable in optimized hardware or software)

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

10

What does a label represent? The issue of label granularity


Packets treated identically by participating routers form
Forwarding Equivalence Class (FEC Assigned the same label

Metanoia, Inc.
Critical Systems Thinking

Membership of a FEC must be determinable from


IP header Info. that ingress router has about the packet

Entities grouped into a FEC are flexible, and could involve


A connection between two IP ports on two hosts
All traffic between two IP hosts All traffic headed for a particular network with same TOS bits All destination networks with a certain prefix All traffic headed to a particular router (e.g. an egress) A manually configured connection and many others
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

11

Metanoia, Inc.
Critical Systems Thinking

Lets Recap: Elements of MPLS


Label Forwarding

Use data link addressing, e.g. ATM VPI/VCI, FR DLCI Put shim header between data link and IP header

Data Plane

Variable L2 header

4 bytes MPLS shim header

20 bytes L3 IP header Higher Layers

EXP/

Label 20 bits

CoS

TTL 8 bits

3 bits 1 bit

Label Creation and Binding


Control Plane

Label Assignment and Distribution

Ride piggyback on routing protocols, where possible (BGP) Use separate label distribution protocol RSVP, LDP/CR-LDP

Reliability: TCP or separate ACK/NACK

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

12

Metanoia, Inc.
Critical Systems Thinking

Benefits over Conventional Routing


MPLS forwarding possible by:
Switches incapable of analyzing network layer headers Unable to do so at adequate speeds

Ingress can use any info. about packet to assign to FEC/LSP


Conventional forwarding only considers info. in the packet

Forwarding decisions can depend on ingress router


Conventional routing, identity of ingress router does not travel with packet

Packet FEC assignment can use complex decision process


No impact on forwarding of labeled packets!

Explicit routing packet need not carry encoding of entire route


Unlike source routing in conventional IP forwarding

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

13

Metanoia, Inc.
Critical Systems Thinking

MPLS Header over POS or IEEE 802.3


4 octets Label (20 bits) EXP S (3 bits) (1 bit) TTL (8 bits)

Layer 2 Hdr (e.g., PPP or 802.3)



Copyright 2002-2005 All Rights Reserved

MPLS Shim Header

IP Header

IP Payload

For labeled packets, Layer 2 header indicates whether it is MPLS unicast packet or MPLS multicast packet The label stack: sequence of 4-octet label stack entries (no limit on stack depth) Network layer packet immediately follows the label stack entry that has the S bit set. Label values 0 -->16 are reserved
MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

14

Metanoia, Inc.
Critical Systems Thinking

MPLS Header over ATM


4 octets Label=0 (20 bits) EXP S TTL (3 bits) (1 bit) (8 bits)

MPLS Shim Header

IP Header

IP Payload

AAL5 Trailer (length, CRC32, ...) 48 octets

48 octets ATM ATM Header Payload

ATM ATM Header Payload

Top stack of shim carries placeholder label value of 0. VPI/VCI value in header represent actual label value (no SNAP/LLC encapsulation used) Upstream LSR connected to first ATM-LSR adjusts TTL value based on how many ATM-LSRs are consecutively connected downstream (learnt via LDP) For ATM LSRs, UNI gives 24-bit VPI/VCI label, NNI gives 28-bit VPI/VCI label If two ATM-LSRs connected via VPC through ATM cloud, 16-bit VCI label used
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

15

Label Assignment and Distribution (Control Component)


Data Labels Labels

Metanoia, Inc.
Critical Systems Thinking

Data

Direction from which labels flow

Downstream Solicited (On Demand) Unsolicited Solicited (On Demand) Unsolicited

Upstream Solicited Unsolicited Solicited Unsolicited

Ordered Independent
Whether LSR waits to hear from its upstream/downstream nbrs. before responding to a request for label(s)

Refers to whether LSR distributes labels on demand or voluntarily

Label Retention: Liberal or Conservative


Whether LSR keeps labels from a neighbor who is not currently the next hop for a FEC
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

16

Example Label Assignment and Distribution Modes


Edge LSR 1 Requests 2 6 5 4

Metanoia, Inc.
Critical Systems Thinking

Downstream-on-demand with Ordered Control

Assignments

Edge LSR

Edge LSR

Requests 2

Assignments

2 3 4 3

Downstream-on-demand with Independent Control

Edge LSR
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

17

Comparison of ATM Switch, IP Router, LSR, and Optical X-connect


ATM switch Control Plane Dynamic routing PNNI protocol for route exchange Signaling protocols Data Plane Forwarding Engine
UNI, PNNI

Metanoia, Inc.
Critical Systems Thinking

IP router LSR

OXC

BGP, OSPF, ISIS, RIP RSVP

ASICs

Software, ASICs

BGP, OSPF, IS-IS, RIP LDP/CRLDP, extended RSVP Software, ASICs

OSPF, IS-IS

LDP/CRLDP, extended RSVP ASICs

Switched entity ATM SVC,


PVC.

IP packets LSPs or flows

SONET channels, Wavelengths, fibers


18

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

More on the MPLS Control Plane: Hop-by-hop Routed LSPs


Shortest path, based on destination IP address of packet
Effectively creates labels for each route in forwarding table

Metanoia, Inc.
Critical Systems Thinking

LSPs whose routes are determined by IP routing protocols

Label distribution for hop-by-hop routed LSPs


LDP (Label Distribution Protocol)
Defined by IETF MPLS Working Group LDP messages:

Notification, Hello, Initialization, KeepAlive, Address, Address Withdraw, Label Mapping, Label Request, Label Withdraw, Label Release

Peer discovery msgs. over UDP, rest over TCP for reliability

Piggyback on existing IP routing protocols


Example: Add label information to BGP Not all IP interfaces may be enabled for dynamic routing protocols

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

19

Hop-by-hop Routed LSP Setup using LDP


Edge LSR Label Req. Label Req.

Metanoia, Inc.
Critical Systems Thinking

LSR1 learns new IP network prefix 1.1.1.0/24 via dynamic IP routing

Label Req. Label Mapping. Label Mapping. Edge LSR Label Mapping.

Each LSR forwards Label Req. along hop-by-hop routed path to 1.1.1.0/24

1.1.1.0/24.

Path established via a dynamic IP routing protocol

When next hop to 1.1.1.0/24 changes in LSR2 (e.g. due to topology or link metric change) LSR2 releases original LSP Starts setting up new LSP from that point on
Several other options available
MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

Copyright 2002-2005 All Rights Reserved

20

Metanoia, Inc.
Critical Systems Thinking

ER-LSPs: Explicitly Routed LSPs


Routes determined by operators or n/w management apps
Based on specific TE policy, QoS, or VPN membership
Significantly more efficient than conventional IP source routing

Label distribution for ER-LSPs


Extended RSVP (significantly different from original RSVP)
Associates labels with RSVP flows, supports aggregate flows Control messages run on raw IP transport, requiring refreshes

CR-LDP (Constraint-based Routed LDP)


Now mostly of historical value

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

21

Metanoia, Inc.
Critical Systems Thinking

Strict ER-LSP Setup using CR-LDP


Edge LSR Label Req. <1.1.1.2, 2.2.2.2, 3.3.3.2> Label Req. <2.2.2.2, 3.3.3.2>

Network operator or network management creates ER-LSP request with path and traffic parameters

Label Req. <3.3.3.2> Label Mapping 1.1.1.2 Label Mapping Edge LSR Label Mapping 2.2.2.2

Traffic parameter TLV contains: 3.3.3.2 Frequency, weight Peak data rate, Peak burst rate Committed data rate, committed burst rate, excess burst size

Frequency specifies granularity at which CDR is made available Weight determines excess bandwidth possible above CDR
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

22

Metanoia, Inc.
Critical Systems Thinking

Loose ER-LSP Setup using CR-LDP

Label Req. <as100, 3.3.3.2>


Edge LSR

AS100 Label Req. <as100, 3.3.3.2>

Network operator or network management creates ER-LSP request with path and traffic parameters

Label Mapping.

4.4.5.6 Label Mapping.

4.4.5.7

Label Req. <3.3.3.2>

Edge LSR Label Mapping. 3.3.3.2

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

23

Are there any implications for hardware/ASICS?


Label stacking depth (if any) supported depends on hardware processing capabilities and speeds

Metanoia, Inc.
Critical Systems Thinking

Hardware engine needs ability to examine both EXP bits and LABEL, and map it to any control hardware used for scheduling MPLS packets
Ability to push and/or pop labels determines whether switch can be

an edge LSR, or only a core LSR (doing only swapping)


Number of queues in the switch/router determines per-label queueing or per-class queueing ability Label merging capability determined by ability to re-assemble packets from interleaved cells
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

24

Metanoia, Inc.
Critical Systems Thinking

Advantages of MPLS
Original justification was fast, amortized, ATM hardware
Eliminated by hardware forwarding engines at multi-gigabit rates

Current justifications include:


Separates forwarding from control, enabling
Evolution of routing functionality independently of forwarding algorithm

(which can continue to be label swapping)


Use of MPLS to control non-packet technologies like SONET/SDH

channels or optical light-paths

Facilitates scalable hierarchical routing (via label stacking) Scalability by reducing number of IP peers/neighbors Provides explicit, manageable IP routes: enables policy routing and traffic engineering (can setup routes different than default shortest-path)
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

25

Metanoia, Inc.
Critical Systems Thinking

Reducing number of IP Peers


IP routing peers Router IP routing peers

ATM Network ATM Switch

LSR (runs IP routing)

VCs between routers connected over


ATM network

Interior switches participate in IP


as LSRs run IP routing protocols

O(n^2) VCs for full adjacency O(n^4) routing info. exchange


overwhelms routers and network
Copyright 2002-2005 All Rights Reserved

routing protocols minimizes IP nbrs.

Eliminates full VC mesh for adjacency,

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

26

Metanoia, Inc.
Critical Systems Thinking

Hierarchical Label Stacking/Switching


Inside transit AS each interior router must keep track

of all networks reachable through it


With hierarchical labels, an arrangement is possible

where only Border Routers need to know what networks might eventually be reached through them
All transit traffic can tunneled through interior routers

of the AS using LSPs with stacked labels

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

27

Metanoia, Inc.
Critical Systems Thinking

Utility of Hierarchical Label Switching


Border LSRs

Swap Swap and Push

Pop

Interior LSRs

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

28

Explicit Manageable Routes -Policy Routing, Traffic Engineering


This type of network engineering:
Keeps network loads balanced Enhances network stability and reliability Enables better QoS and performance assurances Allows carriers to meet SLAs

Metanoia, Inc.
Critical Systems Thinking

Carriers want certain traffic to go over certain routes

Constraint-based routing + MPLS


Allows carriers to bind specific traffic to an LSP Place (or route) LSP over a desired sequence of LSRs

Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

29

Metanoia, Inc.
Critical Systems Thinking

Constraint Based Routing


A class of routing systems that computes routes through a

network subject to a set of constraints and requirements

QoS-based Routing
Path of flows determined by
Knowledge of resource availability in network QoS requirements of flows

Policy-based Routing
Path/routing decision based

on administrative policy

Can be on-line or off-line


Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

30

Metanoia, Inc.
Critical Systems Thinking

CB Routing System
Inputs
Flow/path attributes:
Resources

required b/w, hop count, ...


Resource attributes:
Attributes

properties of nodes/links
Network topology & state

Topology

Constraint-Based Routing Process

Outputs
Computed feasible path Explicit route of the path
1 4 2
Copyright 2002-2005 All Rights Reserved

Feasible Path ERO {1,3,4,5}


3 5

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

31

TE Topology versus Regular Routed Topology


E

Metanoia, Inc.
Critical Systems Thinking

Network Diagram
A C D

Best effort shortest path from D to E


Link weights 2 A 3 1 1 B C 1 3 E 4 D

TE Path from D E avoiding green links with at least STS-3 b/w


E

OC-3 A C

DS3 D OC-12

OC-192

Regular Routed Topology


Copyright 2002-2005 All Rights Reserved

Traffic Engineering Topology


MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

OC-12

32

Automatic Reroute Using MPLS RSVP-TE


Rerouting is done when
A better path is available Upon failure along LSP
Src

Metanoia, Inc.
Critical Systems Thinking

Originates LSPs with IDs 1 and 2 Here they are treated as different LSPs within the same Session
Rcvr

Use SESSION Obj. & SE style


Tunnel uniquely identified by
Destination IP address

LSP ID = L1

Tunnel ID in Session Obj

Tunnel ID
Ingress IP address

Tunnel ingress made to appear as 2 different senders to the RSVP session (via LSP ID)
Copyright 2002-2005 All Rights Reserved

LSP ID = L2

On these links the LSPs share resources

LSPs 1 and 2 have a common SESSION Obj, but a new LSP ID in the SENDER_TEMPLATE and a different ERO (with possibly common hops)
33

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

So what did we look at? Lets summarize


Looked at conventional IP routing and its limitations

Metanoia, Inc.
Critical Systems Thinking

Saw how labels decouple data plane from control plane Examined basics of MPLS
Control and forwarding components
Label granularity (forwarding equivalence class, FEC) Benefits over conventional routing

Label assignment and distribution methods


Downstream-on-demand, with ordered or independent control
Hop-by-hop routed LSPs, strict- and loosely explicitly-routed LSPs

Advantages of MPLS efficient hierarchical routing, reduces

number of IP peers, facilitates explicit routing


Use of MPLS for traffic engineering, protection, automatic

rerouting
Copyright 2002-2005 All Rights Reserved

MPLS Seminar, MTNL CETTM, Mumbai, 26th April 2005

34

Anda mungkin juga menyukai