20111110 - CHT - TL - 教育訓練 Day5
20111110 - CHT - TL - 教育訓練 Day5
20111110 - CHT - TL - 教育訓練 Day5
MPLS Foundamentals
Johnson Liu
johnsonl@juniper.net reserved. 2011 Juniper Networks, Inc. All rights
| www.juniper.net
MPLS Fundamentals
R1 1
R2
R5
1 1 R7
2 R4
www.juniper.net | 3
R1 1
R2
R5
2 R4
1 R7
www.juniper.net | 4
Lacks control
All traffic flows over the IGP shortest path
www.juniper.net | 5
Downsides of ATM
Maintain separate infrastructure ATM cell overhead (1 cell = 5 bytes
Header + 48 bytes payload)
ATM IP
www.juniper.net | 6
FR IP
www.juniper.net | 7
Traditional IP Routing
www.juniper.net | 8
MPLS Example
MPLS core routers swap labels and forward packets based on simple label lookups MPLS edge routers also perform a routing table lookup, and add or remove labels
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 9
MPLS Benefits
MPLS support multiple applications
www.juniper.net | 10
Benefits of MPLS (1 of 2)
Some benefits of MPLS include:
Improved route lookup time by using labels to forward traffic Increased scalability Additional control over how traffic moves through the network using traffic engineering (TE)
LSP A R3 R6
LSP B
R1 1 1 R4 R2 1 3 R5 1
1 R7
www.juniper.net | 11
Benefits of MPLS (2 of 2)
Service Providers can offer different technologies like ATM, Frame Relay, Ethernet, and IPsec over the same infrastructure
Site 6 ATM-LSP Frame Relay LSP R2 Core Infrastructure R1 ATM R6 R3 R4 R5 ATM Site 2
Site 1
Site 3
Site 5
Site 4
www.juniper.net | 12
Labeled Packets
www.juniper.net | 13
Packet is restored at the end of the LSP with a pop operation Normally the label stack is popped at the penultimate ( ) router
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 14
L2 Header
MPLS Header
32 bits
Data
www.juniper.net | 15
The PID(0x8847=MPLS unicast packets) in a layer 2 header specifies that the payload starts with a label followed by an IP header The bottom-of-stack bit(S bit) indicates whether the label is the last label in the stack The receiving router uses the top label only
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 16
MPLS Labels
Key things to remember about labels:
Labels can be assigned manually or by a signaling protocol in each LSR during path setup Label values will change at each segment in the path The LSR(Label Switch Router) will swap incoming label with new unique outgoing label MPLS Labels only have local significance
www.juniper.net | 17
Reserved Labels
Label values 0 through 15 are currently reserved
0 = IPv4Explicit NULL 1 = Router Alert Label 2 = IPv6 Explicit NULL 3 = Implicit NULL (default) 4 through 15 = for future use
www.juniper.net | 18
mpls.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 1 2 1000050 Incoming Label *[MPLS/0] 01:13:17, Receive *[MPLS/0] 01:13:17, Receive *[MPLS/0] 01:13:17, Receive *[MPLS/6] 01:13:16, > to 172.20.100.14 metric 1 metric 1 metric 1 Outgoing Label
Label-Switching Routers
Label-switching router (LSR) performs:
- MPLS packet forwarding - LSP setup
www.juniper.net | 20
All M Series Routers, T Series Routers, and MX Series Ethernet Services Routers support LSR capabilities
Simply called routers in this material
LSP A
LSR
R3
R6
R1
R2
R5
R4
R7
www.juniper.net | 21
LSP A
R3
R6
LSP
R1 R2 R5
R4
R7
www.juniper.net | 22
Ingress
R1 R2 R5
R4
R7
label push
Layer 2 1000050 COS S TTL Data FCS
www.juniper.net | 23
R1
R2
R5
R4
R7
label swap
Layer 2 1000515 COS S TTL Data FCS
www.juniper.net | 24
Penultimate
R5
R6
R1
R2
R4
R7
label pop
Layer 2
2011 Juniper Networks, Inc. All rights reserved.
Data
FCS
www.juniper.net | 25
Egress
R1
R2
R5
R4
R7
Layer 2
2011 Juniper Networks, Inc. All rights reserved.
Data
FCS
www.juniper.net | 26
Label Stacking
Label stacking improves scalability
PE 1
P PE 2
www.juniper.net | 30
Discovery
Session
Label Assignment
FEC: 10.0.0.1/32 Label: 35 FEC: 10.0.0.1/32 Label: 17
LSR
fe-0/0/2
so-0/0/1
so-0/0/1
so-0/0/3
so-0/0/3
at-0/2/0
MPLS Table
In (fe-0/0/2, 35) Out (so-0/0/1, 17)
MPLS Table
Out
MPLS Table
Out (at-0/2/0, 29) (so-0/0/3, 52)
(so-0/0/1, 17)
(so-0/0/3, 52)
Limitations:
LSPs follow the conventional IGP path Does not support explicit routing
www.juniper.net | 32
Basic Discovery
224.0.0.2, UDP port 646 Extended Discovery
Router B
www.juniper.net | 33
Router B (Active)
10.0.1.2
Session Initialization
(Version, Label modes, Timer Values)
Session Initialization
(Version, Label modes, Timer Values)
Keepalives
www.juniper.net | 35
LDP
R7 RSVP R8
LDP
[edit] lab@r7# show protocols mpls label-switched-path test { to 10.0.6.1; ldp-tunneling; no-cspf; } interface all;
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 36
MPLS Terminology
Connection Table
IP 25
Port 1
Port 2
In (port, label)
Label Operation
IP 19
(1, 25)
(2, 23)
(3, 12)
Label Swapping
Connection table maintains mappings Exact match lookup Input (port, label) determines: Label operation Output (port, label)
www.juniper.net | 37
134.5.6.1
134.5.1.5
2
200.3.2.7
6
Egress Routing Table
Destination 134.5/16 200.3.2/24 Next Hop 134.5.6.1 200.3.2.1
2
3
5
200.3.2.7
MPLS Table
In (1, 99) Out (2, 56)
MPLS Table
In (3, 56) Out (5, 0)
200.3.2.1
200.3.2.7
www.juniper.net | 38
101
P3
P4
PE2
583
LDP
106
150
RSVP
*3
*3
LDP
www.juniper.net | 39
www.juniper.net | 40
PATH
PATH
PATH
PATH
PATH
R4
Label object
RESV
R3
Label object
RESV
R2
Label object
RESV
R1
Label object
RESV
R5
Label object
RESV
R6
1004
5341
4711
2477
www.juniper.net | 41
www.juniper.net | 42
3
San Francisco (Ingress) Miami
LSP Established!
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 43
A major goal of Internet Traffic Engineering is to facilitate efficient and reliable network operations while simultaneously optimizing network resource utilization and performance
RFC 2702, Requirements for Traffic Engineering over MPLS
www.juniper.net | 45
A
1
www.juniper.net | 46
A
1
www.juniper.net | 47
- Lacks control All traffic flows via the IGP shortest path
www.juniper.net | 48
www.juniper.net | 49
30M 30M
50M
192.168.1/24 134.112/16
30M 30M
www.juniper.net | 50
San Francisco
www.juniper.net | 51
Separate backup LSP (called Detour LSP) for each LSP that requires protection Bypass Tunnel created to protect a given facility (a link or a node). Multiple LSPs can share the same bypass tunnel.
Link protection Node protection
The schemes are described in RFC 4090 Fast Reroute Extensions to RSVP-TE for LSP Tunnels http://www.ietf.org/rfc/rfc4090.txt
www.juniper.net | 55
R14
R11
R1
R2
R7
LSP Y
LSP X
LSP Z
R3
R4
R5
R6
R13
www.juniper.net | 56
R7
LSP Y
LSP X
LSP Z
R3
R4
R5
R6
R13
R1 computes and signals a single bypass tunnel to the next-hop node, R2, that avoids the R1-R2 link. The bypass tunnel can be shared between all LSPs using R1->R2 link, if desired. Merge point is R2.
www.juniper.net | 57
LSP Y
LSP X
LSP Z
R3
R4
R5
R6
R13
R1 computes and signals bypass tunnel(s) to the next-next-hop node(s) which avoids R1-R2 link and R2 itself. Same bypass tunnel can be shared between all LSPs that pass from R1 to R2 and have the same next-next-hop. In the example, the 3 LSPs have the same nextnext-hop so only one bypass was needed to protect R2.
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 58
R14
R11
LSP Y
LSP X
LSP Z
R3
R4
R5
R6
R13
Separate detour LSP for each protected LSP. 1:1 protection always protects downstream link and downstream node.
www.juniper.net | 59
CR
CR
BR
CR
CR
BR
BR
CR
CR
BR
MPLS Core
When one backbone link disconnect, it will compute and signal a single bypass tunnel to the next-hop node. The bypass tunnel can be shared between all LSPs. One of the CR will need to carry all traffic of all LSP when failure occurs.
www.juniper.net | 60
CR
CR
BR
CR
CR
BR
BR
CR
CR
BR
MPLS Core
Separate detour LSP for each protected LSP. 1:1 protection can help network admin to load share between different path and node resource when detouring LSP generated.
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 61