Вы находитесь на странице: 1из 58

Day 5

MPLS Foundamentals

Johnson Liu
johnsonl@juniper.net reserved. 2011 Juniper Networks, Inc. All rights
| www.juniper.net

Nov. 10, 2011

MPLS Fundamentals

2011 Juniper Networks, Inc. All rights reserved. | www.juniper.net

IGP Metric-Based Forwarding


IGP Forwarding
Traffic is routed based on the IGPs best path selection Traffic that is destined for networks attached to R6 and R7 uses the same path
R3 R6

R1 1

R2

R5

1 1 R7

2 R4

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 3

Downsides of IGP Metric-Based Forwarding


Redirecting traffic from R1, destined for R7, to traverse R4 causes traffic destined to R6 to use R4 also
This redirecting of traffic causes some of your links to be underutilized, while others are overutilized
R3 R6

R1 1

R2

R5

2 R4

1 R7

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 4

Additional Drawbacks of IGP Metrics


Adjusting the IGP metric might destabilize the network
Moves the problem to another section of the network
Some of the links will be underutilized Some of the links will be congested and overutilized

Lacks control
All traffic flows over the IGP shortest path

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 5

Internet Growth Required Changes


ATM switched networks also known as an Overlay Network Benefits of using ATM
ATM switches offered performance and predictable behavior Virtual circuits (VCs) could be reengineered without physical network changes. Traffic statistics on a per-VC basis

Downsides of ATM
Maintain separate infrastructure ATM cell overhead (1 cell = 5 bytes
Header + 48 bytes payload)

Scalability issues Not well integrated


2011 Juniper Networks, Inc. All rights reserved.

ATM IP

www.juniper.net | 6

Additional Options for Connecting Sites


Frame Relay networks
Benefits of using Frame Relay
Uses virtual circuits (VCs) to move traffic to its destination Uses Data Link Connection Identifier (DLCI) number to separate VCs Built in Congestion Control (DE, FECN, BECN)

Downsides of Frame Relay


Maintain separate infrastructure

FR IP

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 7

Traditional IP Routing

Destination-based routing lookup is needed on every hop

2011 Juniper Networks, Inc. All rights reserved.

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

Fixed label lookup faster than IP routing

MPLS support forwarding non-IP protocols

MPLS VPN solve overlapping intranet IP problem

2011 Juniper Networks, Inc. All rights reserved.

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

2011 Juniper Networks, Inc. All rights reserved.

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 12

Labeled Packets

MPLS is often referred to as a "Layer 2.5" protocol.

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 13

MPLS Header information


The MPLS packet header
MPLS header is prepended to packet with a push operation at ingress node Label is added immediately after Layer 2 encapsulation header
L2 Header MPLS Header Data

32-Bit MPLS shim Header

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

MPLS Shim Header Structure


MPLS shim header consist of four fields
Labelused to associate packet with an LSP (Label Switched Path) Experimental(EXP) bitscarry packet queuing priority (Class of Service, CoS) Bottom of Stacking bit Time to live (TTL)limits packet lifetime within LSP
In most cases, the IP TTL is copied into the MPLS TTL
Label (20 bits) CoS S TTL

L2 Header

MPLS Header
32 bits

Data

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 15

MPLS Label Stack

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

2011 Juniper Networks, Inc. All rights reserved.

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 18

Label Information Base (LIB)


Label Information Base
The LIB is stored in the mpls.0 table
The mpls.0 table is automatically created, with label values for 0, 1, and 2, when you configure the MPLS protocol This table is used by transit routers to make forwarding decisions The mpls.0 table maps the incoming labels with the outgoing label and next hop to forward the packets

user@R3> show route table mpls.0

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

metric 1 via ge-1/0/6.0, Swap 1000515


www.juniper.net | 19

2011 Juniper Networks, Inc. All rights reserved.

Label-Switching Routers
Label-switching router (LSR) performs:
- MPLS packet forwarding - LSP setup

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 20

Label-Switching Routers (LSR)


The LSR performs:
MPLS packet forwarding LSP setup

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 21

Label-Switched Path (LSP)


LSP
Unidirectional path through network Generally within a single MPLS domain

LSP A

R3

R6

LSP
R1 R2 R5

R4

R7

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 22

MPLS Router Functions: Ingress


Ingress router
Packets enter LSP at ingress Also called a head-end router Upstream from other routers Performs label push operation
LSP A R3 R6

Ingress
R1 R2 R5

R4

R7

label push
Layer 2 1000050 COS S TTL Data FCS
www.juniper.net | 23

2011 Juniper Networks, Inc. All rights reserved.

MPLS Router Functions: Transit


Transit router
There can be zero or more transit routers Perform label swap operations Forward traffic to next hop in LSP
Transit
LSP A R3 R6

R1

R2

R5

R4

R7

label swap
Layer 2 1000515 COS S TTL Data FCS
www.juniper.net | 24

2011 Juniper Networks, Inc. All rights reserved.

MPLS Router Functions: Penultimate


Penultimate router
Second-to-last router Normally pops the label stack Unlabeled packets sent to egress
LSP A R3

Penultimate
R5

R6

R1

R2

R4

R7

label pop
Layer 2
2011 Juniper Networks, Inc. All rights reserved.

Data

FCS
www.juniper.net | 25

MPLS Router Functions: Egress


Egress router
Packets exit LSP at egress Also called tail-end router Downstream from other routers Forwards packets based on IP address
LSP A R3 R6

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

- Similar to ATMs VP and VC hierarchy


2) Packet enters RSVP engineered core with RSVP label push

3) Packet leaves outer tunnel with RSVP label pop

1) Packet enters LDP tunnel with LDP label push

4) Packet restored with LDP label pop


5) Packet leaves MPLS domain

PE 1

P PE 2

Outer Tunnel (RSVP-signaled LSP) Inner Tunnel (LDP-signaled LSP)


2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 27

MPLS SIGNALING (LDP vs RSVP)

2011 Juniper Networks, Inc. All rights reserved. | www.juniper.net

Label Distribution Protocol (LDP)

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 30

LDP Signaling Overview


Upstream LDP peer Hello messages TCP Session Establishment Initialization Messages Label Request Messages Label Mapping Messages Advertisement

Downstream LDP peer

Discovery

Session

LDP messages types


Discovery: Locate potential LDP peers Session: Manage peer-to-peer TCP sessions Advertisement: Create, change, or delete label mappings Notification: Provide advisory information
www.juniper.net | 31

2011 Juniper Networks, Inc. All rights reserved.

Label Assignment
FEC: 10.0.0.1/32 Label: 35 FEC: 10.0.0.1/32 Label: 17

LSR

FEC: 10.0.0.1/32 Label: 52

FEC: 10.0.0.1/32 Label: 29

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)

Advertise Incoming Label


In

MPLS Table
Out

Receive Outgoing Label


In

MPLS Table
Out (at-0/2/0, 29) (so-0/0/3, 52)

(so-0/0/1, 17)

(so-0/0/3, 52)

LDP label mapping: Downstream peer assigns labels Benefits:

Traffic engineering information is not piggybacked on routing protocols

Limitations:
LSPs follow the conventional IGP path Does not support explicit routing

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 32

Hello-Based Neighbor Discovery


Router A

Basic Discovery
224.0.0.2, UDP port 646 Extended Discovery

Router B

Specific Address, UDP port 646

Neighbor discovery is asymmetric process


Respond only if LDP session is desired

Active node has the higher IP address


Transport address takes precedence over source address

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 33

LDP Session Establishment


Router A (Passive)
10.0.1.1

TCP 3-way Handshake

Router B (Active)
10.0.1.2

Session Initialization
(Version, Label modes, Timer Values)

Session Initialization
(Version, Label modes, Timer Values)

Keepalives

Active Node initiates TCP session


LDP Session initiated after TCP session established
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 34

LDP Session Maintenance


LDP session requires at least 1 hello adjacency

Hello interval: 5-second default


Hold timer: 15-second default
If hold timer expires, LSR deletes hello adjacency Can be asymmetric

Transport address selection:


Interface address Router ID

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 35

LDP Tunneling Through RSVP-TE LSP


Router A Router B

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)

Out (port, label)

Label Operation

(1, 22) (1, 24)


Port 3 Port 4

(2, 17) (3, 17) (4, 19)

Swap Swap Swap Swap

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)

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 37

MPLS Forwarding Example


MPLS Table
In (2, 84) Out (6, 0)

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

Ingress Routing Table


Destination 134.5/16 200.3.2/24 Next Hop (2, 84) (3, 99)

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 38

LDP over RSVP LSP


LDP neighbor relationships between:
A and B via the physical interface B and E via bi-directional RSVP LSPs E and F via the physical interface

RTR-B performs a swap and push operation


Swap label 583 for label 101 (advertised by E) Push label 106 (advertised by C)

LDP over RSVP(T-LDP)


PE1 P1 P2

101

P3

P4

PE2

583
LDP

106

150
RSVP

*3

*3
LDP

106 583 IP 101 IP

150 101 IP 101 IP IP

2011 Juniper Networks, Inc. All rights reserved.

*Note: Label 3 = implicit null

www.juniper.net | 39

Resource Reservation Protocol (RSVP)

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 40

Basic RSVP Path/Resv signaling


Unidirectional flows Ingress router initiates connection Soft state Path and resources are maintained dynamically Can change during the life of the RSVP session Path message (containing label-request object) sent downstream Resv message (containing label object) sent upstream

Label request object

Label request object

Label request object

Label request object

Label request object

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 41

RSVP Signaling Example: Path


RSVP sets up path from San Francisco to New York

Seattle New York (Egress)

San Francisco (Ingress) Miami

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 42

RSVP Signaling Example: Reservation


The RESV message visits each router on the path in reverse order labels assigned hop to hop in the upstream direction

Seattle New York (Egress)

3
San Francisco (Ingress) Miami

LSP Established!
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net | 43

Traffic Engineering (TE)

2011 Juniper Networks, Inc. All rights reserved. | www.juniper.net

What is traffic engineering?

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 45

IGP Metric-Based Forwarding


Traffic sent to A or B follows path with lowest metrics

A
1

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 46

Drawbacks of IGP Metric Forwarding


Redirecting traffic flow to A via C causes traffic for B to move also!
- Some links become underutilized or overutilized

A
1

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 47

Additional Drawbacks of IGP Metrics


Adjusting an IGP metric might destabilize the network
- Moves problem around
Some links underutilized Some links overutilized

- Lacks control All traffic flows via the IGP shortest path

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 48

Constraint-Based Path Computation


Constraint-based routing is demand-driven. Resource-reservation-aware routing paradigm:
- Based on criteria including, but not limited to, network topology - Calculated at the edge of a network:
Modified Dijkstras algorithm at tunnel headend (CSPF [Constraintbased SPF]). Output is a sequence of IP interface addresses (next-hop routers) between tunnel endpoints.

Constraint-based routing takes into account:


Using the least-cost path computed by OSPF or IS-IS Policy constraints associated with the tunnel and physical links Physical resource availability Network topology state

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 49

IGP-Based Traffic Engineering


Standard IGP routing IP prefixes are bound to a physical next hop
- Typically based on IGP view of shortest path

30M 30M

IGP Shortest Path

50M 30M 30M 30M


San Francisco New York

50M

192.168.1/24 134.112/16

30M 30M

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 50

MPLS-Based Traffic Engineering


Engineer unidirectional paths through your network without using the IGPs shortest path calculation
50M (10M available) 30M (5M available)

IGP Shortest Path New York

San Francisco

30M (25M available) 30M (20M available)

30M (20M available)


RSVP Traffic Engineered Path (Need 20M)

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 51

Fast Reroute schemes supported in JUNOS


1. One-to-one backup 2. Facility backup
Two variants:

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

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 55

Comparison of FRR schemes


R8 R9 R10

R14

R11

R1

R2

R7

LSP Y

LSP X

LSP Z

R3

R4

R5

R6

R13

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 56

Facility protection, Link protection variant


R8 R9 R10

Shared bypass tunnel


R14 R11 R1
R2

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.

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 57

Facility protection, Node protection variant


R8 R9 R10

Shared bypass tunnel


R14 R11 R1
R2 R7

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

FRR 1:1 protection


R8 R9 R10

Detour LSP for LSP Z Detour LSP for LSP Y


R1
R2

Detour LSP for LSP X


R7

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.

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 59

Case study 1 Facility protection: Link Protection


BR: Border Router CR: Core Router

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.

2011 Juniper Networks, Inc. All rights reserved.

www.juniper.net | 60

Case study 2 1:1 FRR


BR: Border Router CR: Core Router

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

Вам также может понравиться