MPLS Overview

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 42

MPLS Architecture

Overview
Jay Kumarasamy
jayk@cisco.com

Adopted from Stefano Previdi’s presentation

© 2001, Cisco Systems.


1
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Day in the Life of a Packet

2001 Cisco Systems, Inc.


www.cisco.com 2
MPLS Concepts

• MPLS: Multi Protocol Label Switching


• MPLS is a layer 2+ switching
• Developed to integrate IP and ATM
• MPLS forwarding is done in the same way
as in ATM switches
• Packet forwarding is done based on Labels

2001 Cisco Systems, Inc.


www.cisco.com 3
MPLS Concepts
• Unlike IP, classification/label can be based
on:
Destination Unicast address
Traffic Engineering
VPN
QoS
• FEC: Forwarding Equivalence Class
• A FEC can represent a: Destination address
prefix, VPN, Traffic Engineering tunnel, Class
of Service.
2001 Cisco Systems, Inc.
www.cisco.com 4
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Summary

2001 Cisco Systems, Inc.


www.cisco.com 5
LSRs and Labels

• LSR: Label Switch Router


• Edge-LSR: LSRs that do label imposition
and disposition
• ATM-LSR: An ATM switch with Label
Switch Controller

2001 Cisco Systems, Inc.


www.cisco.com 6
LSRs and Labels

IGP domain with a label


distribution protocol
• An IP routing protocol is used within the routing domain
(e.g.:OSPF, i-ISIS)
• A label distribution protocol is used to distribute address/label
mappings between adjacent neighbors
• The ingress LSR receives IP packets, performs packet
classification, assign a label, and forward the labelled packet into
the MPLS network
• Core LSRs switch packets/cells based on the label value
• The egress LSR removes the label before forwarding the
IP packet outside the MPLS network
2001 Cisco Systems, Inc.
www.cisco.com 7
LSRs and Labels
0 1 2 3 Label = 20 bits
01234567890123456789012345678901
Exp = Experimental, 3 bits
Label | Exp|S| TTL
S = Bottom of stack, 1bit
TTL = Time to live, 8 bits

• Uses new Ethertypes/PPP PIDs/SNAP values/etc


• More than one Label is allowed -> Label Stack
• MPLS LSRs always forward packets based on the value
of the label at the top of the stack

2001 Cisco Systems, Inc.


www.cisco.com 8
LSRs and Labels
PPP Header(Packet over
PPP Header Shim Header Layer 3 Header
SONET/SDH)

Ethernet Ethernet Hdr Shim Header Layer 3 Header

Frame Relay FR Hdr Shim Header Layer 3 Header

ATM Cell Header GFC VPI VCI PTI CLP HEC DATA

Label

Subsequent cells GFC VPI VCI PTI CLP HEC DATA

Label
2001 Cisco Systems, Inc.
www.cisco.com 9
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Day in the Life of a Packet

2001 Cisco Systems, Inc.


www.cisco.com 10
Label Assignment and
Distribution

• Labels have link-local significance


Each LSR binds his own label mappings

• Each LSR assign labels to his FECs


• Labels are assigned and exchanged between
adjacent neighboring LSR
• Applications may require non-adjacent
neighbors

2001 Cisco Systems, Inc.


www.cisco.com 11
Label Assignment and
Distribution
Upstream and Downstream LSRs

171.68.40/24 171.68.10/24
Rtr-A Rtr-B Rtr-C

• Rtr-C is the downstream neighbor of Rtr-B for destination


171.68.10/24
• Rtr-B is the downstream neighbor of Rtr-A for destination
171.68.10/24
• LSRs know their downstream neighbors through the IP
routing protocol
Next-hop address is the downstream neighbor
2001 Cisco Systems, Inc.
www.cisco.com 12
Label Assignment and
Distribution
Unsolicited Downstream Distribution

Use label 30 for destination Use label 40 for destination


171.68.10/24 171.68.10/24

171.68.40/24 171.68.10/24
Rtr-A Rtr-B Rtr-C
In In Address Out Out In In Address Out Out
I/F Lab Prefix I/F Lab I/F Lab Prefix I/F Lab
0 - 171.68.10 1 30 0 30 171.68.10 1 40 In In Address Out Out
I/F Lab Prefix I/F Lab
... ... ...
Next-Hop... ... ... ... ...
Next-Hop... ... 0 40 171.68.10 1 -
... ... ...
Next-Hop... ...

IGP derived routes

• LSRs distribute labels to the upstream neighbors


2001 Cisco Systems, Inc.
www.cisco.com 13
Label Assignment and
Distribution
On-Demand Downstream Distribution

Use label 40 for destination Use label 30 for destination


171.68.10/24 171.68.10/24

171.68.10/24
171.68.40/24 Rtr-A Rtr-B Rtr-C

Request label for Request label for


destination 171.68.10/24 destination 171.68.10/24

• Upstream LSRs request labels to downstream neighbors


• Downstream LSRs distribute labels upon request
2001 Cisco Systems, Inc.
www.cisco.com 14
Label Assignment and
Distribution
Label Retention Modes
• Liberal retention mode
• LSR retains labels from all neighbors
Improve convergence time, when next-hop is again available
after IP convergence
Require more memory and label space

• Conservative retention mode


• LSR retains labels only from next-hops neighbors
LSR discards all labels for FECs without next-hop
Free memory and label space

2001 Cisco Systems, Inc.


www.cisco.com 15
Label Assignment and
Distribution
Label Distribution Modes
• Independent LSP control
LSR binds a Label to a FEC independently, whether or not the LSR
has received a Label the next-hop for the FEC
The LSR then advertises the Label to its neighbor

• Ordered LSP control


LSR only binds and advertise a label for a particular FEC if:
it is the egress LSR for that FEC or
it has already received a label binding from its next-hop

2001 Cisco Systems, Inc.


www.cisco.com 16
Label Assignment and
Distribution
Several protocols for label exchange

• LDP
Maps unicast IP destinations into labels
• RSVP, CR-LDP
Used in traffic engineering
• BGP
External labels (VPN)
• PIM
For multicast states label mapping
2001 Cisco Systems, Inc.
www.cisco.com 17
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Day in the Life of a Packet

2001 Cisco Systems, Inc.


www.cisco.com 18
Label Switch Path (LSP)

IGP domain with a label IGP domain with a label


distribution protocol distribution protocol

LSP follows IGP shortest path LSP diverges from IGP shortest path

• LSPs are derived from IGP routing information


• LSPs may diverge from IGP shortest path
LSP tunnels (explicit routing) with TE
• LSPs are unidirectional
Return traffic takes another LSP
2001 Cisco Systems, Inc.
www.cisco.com 19
Label Switch Path (LSP)
Penultimate Hop Popping
• The label at the top of the stack is removed
(popped) by the upstream neighbor of the
egress LSR
• The egress LSR requests the “popping”
through the label distribution protocol
•Egress LSR advertises implicit-null label

• The egress LSR will not have to do a lookup


and remove itself the label
•One lookup is saved in the egress LSR

2001 Cisco Systems, Inc.


www.cisco.com 20
Label Switch Path (LSP)
Penultimate Hop Popping
Address
Next-Hop Interface
In In Address Out Out In In Address Out Out Prefix and mask
I/F Lab Prefix I/F Lab I/F Lab Prefix I/F Lab 171.68.10/24 171.68.9.1 Serial1
0 - 171.68/16 1 4 0 4 171.68/16 2 pop
171.68.44/24 171.68.12.1 Serial2
... ... Next-Hop
... ... ... ... ... Next-Hop
... ... ...
171.68/16 ... Null

Summary route Summary route


for 171.68/16 for 171.68/16
1 0 1 0

171.68.44/24
Use label 4 for Use label “implicit-null”
FEC 171.68/16 for FEC 171.68/16
171.68.10/24

Summary route is propagate through Egress LSR summarises more


the IGP and label is assigned by each specific routes and advertises
LSR a label for the new FEC

Egress LSR needs to do an IP lookup for finding more


specific route
Egress LSR need NOT receive a labelled packet

2001 Cisco Systems, Inc.


www.cisco.com 21
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Summary
2001 Cisco Systems, Inc.
www.cisco.com 22
ATM LSRs
• ATM switches forward cells, not packets
• Label Dist is Downstream on-demand, Ordered
• IGP label is carried in the VPI/VCI field
• Merging LSR:
Ability to use the same label for different FECs if outgoing
interface is the same
Save label space on ATM-LSRs
Cell interleave problem

• Non Merging LSR:


ATM-LSR requests one label per FEC and per incoming
interface (upstream neighbors)
Downstream LSR may request itself new label to its
downstream neighbors
2001 Cisco Systems, Inc.
www.cisco.com 23
ATM LSRs
Non-Merging
Downstream on Demand
In In Address Out Out
I/F Lab Prefix I/F Lab
1 5 171.68 0 3
ATM-LSR requested additional label
for same FEC in order to distinguish
2 8 171.68 0 4 between incoming interfaces
(Downstream on Demand)
... ... ... ... ...
5
IP AT
M 5
Packet cell AT
M
cell
4 3 4 3 4 171.68
8 AT AT AT AT AT
IP 8 M M M M M
Packet 8 AT cell cell cell cell cell
AT M
AT M
M cell
cell
cell

2001 Cisco Systems, Inc.


www.cisco.com 24
ATM LSRs
VC-Merging Downstream
on Demand
In In Address Out Out
I/F Lab Prefix I/F Lab
1 5 171.68 0 3
ATM-LSR transmitted cells in sequence
in order for the downstream LSR to
2 8 171.68 0 3 re-assembling correctly the cells into
packets
... ... ... ... ...
5
IP AT
M 5
Packet cell AT
M
cell
3 3 3 3 3 171.68
8 AT AT AT AT AT
IP 8 M M M M M
Packet 8 AT cell cell cell cell cell
AT M
AT M
M cell
cell
cell

2001 Cisco Systems, Inc.


www.cisco.com 25
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Summary
2001 Cisco Systems, Inc.
www.cisco.com 26
Loops and TTL

• In IP networks TTL is used to prevent packets


to travel indefinitely in the network
• MPLS may use same mechanism as IP, but not
on all encapsulations
• TTL is present in the label header for PPP and LAN
headers (shim headers)
• ATM cell header does not have TTL

2001 Cisco Systems, Inc.


www.cisco.com 27
Loops and TTL

• LSRs using ATM do not have TTL capability


• Some suggested options:
- hop-count object in LDP
- Path Vector object in LDP

2001 Cisco Systems, Inc.


www.cisco.com 28
Loops and TTL
LSR-1
IP LSR-2 LSR-3
packet Label =
TTL = 25
10 IP packet
TTL = 6

Label =
39
IP packet
TTL = 6

LSR-6
LSR-6 --> 25
Label =
Hops=4 21 IP
IP packet packet
IGP domain with a label TTL = 6 TTL = 6 Egress
distribution protocol LSR-4 LSR-5

• TTL is decremented prior to enter the non-TTL capable


LSP
If TTL is 0 the packet is discarded at the ingress point
• TTL is examined at the LSP exit
2001 Cisco Systems, Inc.
www.cisco.com 29
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Day in the Life of a Packet
2001 Cisco Systems, Inc.
www.cisco.com 30
LDP Concepts

• Label Distribution Protocol


• Labels map to FECs for Unicast Destination
Prefix
• LDP works between adjacent/non-adjacent
peers
• LDP sessions are established between peers

2001 Cisco Systems, Inc.


www.cisco.com 31
LDP Messages

• Discovery messages
• Used to discover and maintain the presence of
new peers
• Hello packets (UDP) sent to all-routers multicast
address
• Once neighbor is discovered, the LDP session is
established over TCP

2001 Cisco Systems, Inc.


www.cisco.com 32
LDP Messages

• Session messages
• Establish, maintain and terminate LDP sessions
• Advertisement messages
• Create, modify, delete label mappings
• Notification messages
• Error signalling

2001 Cisco Systems, Inc.


www.cisco.com 33
Agenda

• MPLS Concepts
• LSRs and labels
• Label assignment and distribution
• Label Switch Paths
• ATM LSRs
• Loops and TTL
• LDP overview
• Day in the Life of a Packet

2001 Cisco Systems, Inc.


www.cisco.com 34
Day in the life of a Packet
Address
In In Address Out Out In In Address Out Out In In Address Out Out Next-Hop Interface
Prefix and mask
I/F Lab Prefix I/F Lab I/F Lab Prefix I/F Lab I/F Lab Prefix I/F Lab
171.68.10/24 171.68.9.1 Serial1
0 - 171.68/16 1 4 0 4 171.68/16 1 7 0 7 171.68/16 2 pop
171.68.44/24 171.68.12.1 Serial2
... ... Next-Hop
... ... ... ... ... Next-Hop
... ... ... ... ... Next-Hop
... ... ...
171.68/16 ... Null

1 P1 P 2 0
PE
PE 0 0
Use label “implicit-null”
0 Use label 4 for Use label 7 for for FEC 171.68/16
FEC 171.68/16 FEC 171.68/16

Summary route 171.68.44/24


Summary route for 171.68/16
CE for 171.68/16

171.68.10/24

Summary route is propagate through Egress LSR summarises more


the IGP and label is assigned by each specific routes and advertises
LSR a label for the new FEC

Egress LSR needs to do an IP lookup for finding more specific route

2001 Cisco Systems, Inc.


www.cisco.com 35
Day in the life of a Packet
Basic Layout
C ontrol P lane

R outing E xchange
IP R outing P rotocols

IP R outing T able

Label B inding E xchange


Label D istribution P rotocol

Label R em oved
L3 lookup

O utgoing IP P ackets
Incom ing IP P ackets
Forward Inform ation B lock (FIB )

Incom ing LabelledP ackets


Label Forward Inform ation B lock O utgoing Labelled P ackets
(LFIB )

Forwarding P lane
2001 Cisco Systems, Inc.
www.cisco.com 36
Day in the life of a Packet
Database Layout
OSPF IS IS BGP LD P

R outing Table TIB

FIB
fas t-adjac enc y
inc om ing-tag
fas ttag-rew rite
tag_rew rite [ ]
tag_info
tag_has h

D es t. IP addres s

tag_rew rite
ID B v ectors
output-if TFIB
enc aps tfib_entry ip_turbo_fs
tfib_entry
inc om ing-tag tag_rew rite tag_optim um _fs
loadinfo tfib_entry
outgoing-tag ip2_tag_optim um _fs
tag_info tfib_entry

Inc om ing tag

2001 Cisco Systems, Inc.


www.cisco.com 37
Day in the life of a Packet
- b gp -based policy
m ap ping (QPPB) and set - ch eck for NAT (in sid e ->
qos-grou p ID ou tside)
- au then tication proxy - p erform QoS classification
- ch eck for in pu t ACL s - ch eck for cryp to
- ch eck for cryp to - ou tput ACL check
- ch eck for setting in pu t - ch eck for setting ou tpu t
QoS m arking QoS m arking
- Inp ut police/rate-inp ut - QoS - W F Q
- ch eck for NAT (ou tsid e -> - ou tput police/rate-lim iting
in sid e
In-bound - ch eck p olicy rou tin g p o st IP
interface driver - ch eck for W E B cach e lo o k u p se n d IP
fra g m e n t
red irection fe a tu re s packet
checks IP ?
encaps,
check a d ja -
invokes F IB
e a rly -c e n c y
handler thru fe a tu re s lo o k u p lo o k u p
ID B vectors M PLS
IP
IP la b e l
im p o sitio n

M PLS M PLS - com pu te leng th of tag(s)


to b e copied & ch eck if
p ro c e ss
frag. is req uired.
la b e lle d
packet
- cop y tos field
- set ttl
- cop y the lab el(s)
- if (features) {
- p erform ou tpu t QoS
classification
- ch eck for setting ou tpu t
QoS m arking
- d o outp ut rate-lim itin g
- ch eck for m ulti-vc
}
2001 Cisco Systems, Inc. - fragm en t, if n ecessary
www.cisco.com - sen d lab elled packet
38
Day in the life of a Packet
In-bound interface
driv er checks check
encaps, inv okes early
handler thru ID B features
v ectors

IP
no
rew rite - Output QoS Classification
info, do - S etting output QoS m arking
Layer-3 - Do output rate-lim it/policing
M P LS lookup

process check tag tag check


labelled early sw itch forw ard post
packet features inline inline features

- Input QoS Classification - get label header


- S etting input QoS m arking - from tfib get the tag entry - update T T L value
- Do input rate-lim it/policing - get rew rite info from the tag - update E X P value
entry - S W AP/POP label, process
inner label..
- handle m ulti-vc CoS

- Platform specific W RE D
done in the final transm it transm it
path packet

2001 Cisco Systems, Inc.


www.cisco.com 39
Summary

• LSRs forward packet based on label


information
• IP header and forwarding decision have
been de-coupled for better flexibility
• Label information can derive from different
sources
IP routing protocols (destination based unicast routing)
Multicast
Traffic Engineering
QoS
VPN
2001 Cisco Systems, Inc.
www.cisco.com 40
Summary

• MPLS allows flexible packet classification


and network resources optimisation
• Labels are distributed by different
protocols
•LDP, RSVP, BGP, PIM
• Different distribution protocols may co-
exist in the same LSR
• Label have local (LSR) significance
No need for global (domain) wide label
allocation/numbering

2001 Cisco Systems, Inc.


www.cisco.com 41
Thank You!

2001 Cisco Systems, Inc.


www.cisco.com 42

You might also like