Introduction To MPLS: Based On MPLS Tutorial From Tim Griffin MPLS/VPN Tutorial From Chris Chase
Introduction To MPLS: Based On MPLS Tutorial From Tim Griffin MPLS/VPN Tutorial From Chris Chase
To understand the broad technical issues without getting lost in the vast number of details
the gains the costs the tradeoffs
3
Outline
Why MPLS?
Problems with current IP routing and forwarding Complexity of overlay model Label swapping Label distribution Constraint based routing Traffic Engineering Virtual Private Networks
What is MPLS?
B
R R2 R R1 R4
A B C D E default
Dest. A B C D E default
R3 R R5
C
Dest. A B C D E default
IP Forwarding Process
1. Remove a packet from an input queue 2. Check for sanity, decrement TTL field 4. Place packet on correct output queue
Forwarding Process
If queues get full, just drop packets! 3. Match packets destination to a table entry If queues get full, just drop packets!
IP Forwarding Table
Router
6
B
R
The Fish
C
The next-hop forwarding paradigm does not allow router R to choose a route to A based on who originated the traffic, B or C.
7
RIP Process
RIP Routing tables
BGP Process
BGP Routing tables
BGP
OSPF Process
OSPF Routing tables
RIP Domain
OS kernel
OSPF Domain
IP Forwarding Table
Shortest Path Routing: Link weights tend to attract or repel all traffic
A B A B
C
1 2 1 1
2 1
1 1
Overlay Networks
B A
Layer 2
(virtual circuits)
C B
C
Layer 3
10
11
what is it?
13
Sanity Check?
The problems with IP forwarding and routing do not require technologies like MPLS
Technologies like MPLS may be very valuable if they can enable new services and generate new revenue
Many can be addressed with simple solutions. Like the design of simple networks! The problems are not show stoppers The MPLS cure will have side effects For many applications, TCP/IP handles congestion very well
14
16
MPLS Label n
Layer 3 Packet
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Label | Exp |S| TTL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Often called a shim (or sham) header
Label Value, 20 bits Experimental, 3 bits Bottom of Stack, 1 bit Time to Live, 8 bits
17
417
data
288
data
Popping Labels
data
288
data
577
data
288
577
data
19
Pushing Labels
288
data
data
288
577
data
577
data
20
10
data
417 data
666 data
233 data
data
IP
IP out
IP Forwarding Table
IP in
IP
77
data
23
MPLS in
data
MPLS out
22
11
IP2
417 IP2
666 IP2
233 IP2
IP2
IP1
417 IP1
666 IP1
233 IP1
IP1
Packets IP1 and IP2 are forwarded in the same way --- they are in the same FEC. Network layer headers are not inspected inside an MPLS LSP. This means that inside of the tunnel the LSRs do not need full IP forwarding table.
23
LSP Merge
IP2
417 IP2
823 IP2
912 IP2
IP2
IP1
111 IP1
666 IP1
233 IP1
IP1
IP2
417 IP2
823 IP2
912 IP2
IP2
IP1
417 IP1
666 IP1
233 IP1
IP1
24
LSP merge
12
IP
417 IP
666 IP
233 IP
IP
IP Lookup
POP
SWAP
PUSH
IP
IP
666 IP
233 IP
IP
25
POP
PUSH
66
IP2
44 66
IP2
88 66
IP2
17 66
IP2
66
IP2
23
IP1
44 23
IP1
88 23
IP1
17 23
IP1
23
IP1
POP
PUSH
IP1 26
13
PPP
Ethernet
ATM VPI/VCI . . .
Frame DLCI . . .
generic encapsulation
. . .
generic encapsulation
28
14
30
15
label distribution
Label distribution protocols are needed to (1) create label FEC bindings (2) distribute bindings to neighbors, (3) maintain consistent label swapping tables
31
Some IP routing protocols are not suitable Need explicit binding of label to FEC Link state protocols (OSPF, ISIS) are implicit, and so are not good piggyback candidates Distance vector (RIP) and path vector (BGP) are 32 good candidates. Example: BGP+
16
forwarding paths
Additional complexity of new protocol and Bad interactions with existing protocols Points
Transient inconsistencies between IP forwarding tables and MPLS label swapping tables
IP Routing Protocols + IP Routing Tables Label distribution protocols + Label Binding Tables
Routing messages
IP
IP out
IP Forwarding Table
IP in
IP
77
data
23
MPLS in
34
data
MPLS out
17
IP AS 444
417 IP
666 IP
233 IP
IP
AS 888
Routers A and B do not need full routing tables. They only need IGP routes (and label bindings).
36
18
99
IP
417 99
IP
666 99
IP
233 99
IP
IP
AS 444
AS 888
37
19
39
20
network next-hop
10.11.12.0/24
network next-hop
10.11.12.0/24
network next-hop
10.11.12.0/24
LSP
10.11.12.0/24
LDP
417
10.11.12.0/24
LDP
666
10.11.12.0/24
LDP
233
10.11.12.0/24
pop
A
swap
B
swap
push
IP
417 IP
666 IP
233 IP
IP
41
42
21
Intra-Domain
A Framework for Internet Traffic Engineering Draft-ietf-tewg-framework-02.txt A major goal of Internet Traffic Engineering is to facilitate efficient and reliable network operations while simultaneously optimizing network resource utilization and performance.
Intra-Domain
Traffic classification
Map traffic to appropriate LSPs
44
22
45
LSP
reply
417
LSPID 17
reply
666
LSPID 17
reply
233
LSPID 17
pop
swap
swap
push
IP
417 IP
666 IP
233 IP
IP
46
23
RSVP-TE
CR-LDP
+
RSVP
+
LDP
Constraint-Based LSP Setup using LDP draft-ietf-mpls-cr-lpd-05.txt
48
24
LSP2
A C
LSP1
A B
LSP
2 1 2 1
Vanilla IP forwarding
50
25
51
Link Protection
Create backup LSP around link to Next Hop With or without reservation
Can also backup normal LDP LSP Backup tunnel. Pushes label 51 onto tunnel
2
pop
A
18
C
51
45
Protected LSP
52
26
Node Protection
Create backup tunnel LSP for two hops away (next-next hop) Backs up RSVP-TE tunnel
Learns labels from RESV recorded route of protected tunnel Backup tunnel. Pushes label 45 onto tunnel
2
pop
A
18
C
51
45
Protected LSP
53
Path Protection
Create an end-to-end diverse backup tunnel Slower than local protection have to wait for headend to detect failure D 2
pop
Backup LSP
A
18
C
51
45
Protected LSP
54
27
MPLS TE is probably most valuable when IP services require more than best effort
VPNs with SLAs? Supporting differentiated services?
55
56
28
C
C
B A
Customers Layer 2 VPN
57
C
C
MPLS LSP
B
MPLS LSP
A
Customers Layer 2 VPN
MPLS LSP
58
29
59
BGP/MPLS VPNs
RFC 2547 Is Peer Model of VPN (not Overlay) Also draft-rosen-rfc2547bis-02.txt Cisco configuration info :
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/ 120newft/120t/120t5/vpn.htm
60
30
VPN 1
VPN 2
61
CE = customer edge
31
Site 2 p1
Site 1 p1
VPRN 2
Provider
VPRN 1
Site 3 p2
Dest. p1 p2
Nxt Hop ?? ??
Site 4 p2
63
VPN Overlap Means Vanilla Vanilla forwarding tables are out Forwarding Tables Cant Work
Site 2 p2
VPRN 1
Site 1 p1
VPRN 2
Provider Violates isolation Guarantee of A VPN: site 1 can Exchange traffic with Site 3!
64
Site 3 p3
Dest. p1 p2 p3
Nxt Hop s1 s2 s3
32
Site 2 p2
VPRN 1
Site 1 p1
VPRN 2
Provider Site 2 FT
Site 3 p3
Dest. p1 p3
Nxt Hop s1 s3
65
Site 2 p2
VPRN 1
Site 1 p1
VPRN 2
VPRN 3
Site 3 p3
Site 4 p3
66
33
LSR2 LSR1
PER1
PER2
CR1
Network Z CR2
Site 1 CR1 at Site 1 has a packet addressed to a host in network Z at Site 2. How does it get there?
Site 2
67
CR1 CR2
Li - labels requested via LDP from next hop neighbor for each routing table entry LSP for the OSPF route to reach PER2
68
34
Route Targets (RT) - attached to VPN routes. only vrfs with common RTs share routes Route Distinguishers (RD) - appended to routes to ensure uniqueness even if VPNs have overlapping address spaces Creates a new address family called vpnv4 = RD+ipv4 NOTE: RTs and RDs are applied to routes, NOT packets
A stack of two labels is used to forward the packet on the interior LSP and then external interface
69
VPN extensions
Route Target (RT)
BGP 64 bit extended community value First 16bit identify as RT type. Other 48 bit is variable
Conventional format ASN:X, i.e., 16b:32b
35
LSR2 LSR1
PER1
K1 LN
CR1
PER2
LN K
Network Z
Li - labels LSP
CR2
71
LSR2 LSR1
PER1
PER2
IBGP msg
CR1 RD1+Z, L4, RT1, PER2
LN K
Network Z
Li - labels LSP
CR2
72
36
LNK1 data: vrf1 vrf1: RT1, RD2 table: Rt Z L4, PER2 PER2 L1, LSR1
CR1
LSR2 LSR1
PER1
PER2
LN K
Network Z
Li - labels LSP
CR2
73
CR1 learns RT Z
Q: How does CR1 learn Rt Z? A: Either via BGP or statically configured
MPLS VPN Cloud LSR3
LNK1 data: vrf1 vrf1: RT1, RD2 table: Rt Z L4, PER2 PER2 L1, LSR1
CR1
LSR2 LSR1
PER1
PER2 Network Z
K1 LN
table: Rt Z PER1,LNK1
Li - labels LSP
CR2
74
37
LNK1 data: vrf1 vrf1: RT1, RD1 table: Rt Z L4, PER2 PER2 L1, LSR1
CR1
LSR2 LSR1
PER1
PER2 Route Z
Z| packet table: Rt Z PER1,LNK1 LNK2 data: vrf1 vrf1: RT1, RD1 table: Rt Z L4,CR2,LNK2
CR2
Li - labels LSP
75
LNK1 data: vrf1 vrf1: RT1, RD1 table: Rt Z L4, PER2 PER2 L1, LSR1
CR1
L1 L2 LSR1
LSR2
PER1
L1|L4|Z| packet
PER2 Route Z
Li - labels LSP
CR2
76
38
LSR2 LSR1
PER1
L4|Z| packet
PER2 Route Z
CR1
Li - labels LSP
CR2
77
LSR2 LSR1
PER1
Z|packet
PER2 Route Z
CR1
Li - labels LSP
CR2
78
39
79
80
40
82
41
83
Summary
MPLS is an interesting and potentially valuable technology because it
provides an efficient and scalable tunneling mechanism provides an efficient and scalable mechanism for extending IP routing with explicit routes
84
42
http://cell.onecall.net/cell-relay/archives/mpls/mpls.index.html
http://www.mplsrc.com
http://www.nanog.org/mtg-9910/mpls.html
MPLS: Technology and Applications. By Bruce Davie and Yakov Rekhter. Morgan Kaufmann. 2000. MPLS: Is it all it's cracked up to be? Talk by Pravin K. Johri
http://buckaroo.mt.att.com/~pravin/docs/mpls.pdf
85
86
43
http://nbvpn.francetelecom.com
MPLS and VPN Architectures. By Ivan Pepelnjak and Jim Guichard. Cisco Press. 2001
87
44