34
MPLS Networks An Introduction to MPLS Networks and Applications By Shawn Zandi – CCIE (Routing & Switching / Security / Service Provider)

Mpls Networks Introduction

Embed Size (px)

Citation preview

Page 1: Mpls Networks Introduction

MPLS Networks

An Introduction to MPLS Networks and Applications

By Shawn Zandi – CCIE (Routing & Switching / Security / Service Provider)

Page 2: Mpls Networks Introduction

MPLS History

Cisco joined the MPLS story in 1998 (IOS 11.1) with tag

switching...

IETF released RFC 2547 "BGP/MPLS VPNs" in 1999

2 http://blog.shafagh.com by Shawn Zandi

Page 3: Mpls Networks Introduction

Terminology

Old Terminology New Terminology

Tag Switching MPLS

Tag Label

TDP LDP (Label Distribution Protocol)

TFIB LFIB (Label Forwarding Information Base)

TSR LSR (Label Switch Router)

TSC LSC (Label Switch Controller)

TSP LSP (Label Switched Path)

3

Page 4: Mpls Networks Introduction

MPLS Applications

MPLS VPN

Most Popular Application of MPLS

Traffic Engineering

First called RRR or R3 (Routing & Resource Reservation)

AToM (Any Transport over MPLS)

Point-to-point circuits over MPLS – Frame Relay, ATM, PPP,

HDLC, Ethernet and IEEE 802.1Q

VPLS (Virtual Private LAN Service)

Ethernet Supported in a multipoint fashion.

4 http://blog.shafagh.com by Shawn Zandi

Page 5: Mpls Networks Introduction

Advantages of MPLS

MPLS VPN VRF routing tables and ease of growth.

Unified infrastructure Carrier for any technology - ATM, FR, PPP, Ethernet, IPv4 and IPv6.

Better IP over ATM than pervious solutions AAL5 - RFC1483, LANE, Multiprotocol over ATM - MPOA

BGP-free core providers need IP routing but BGP is only required on edges.

Optimal Traffic Flow Connections logically are fully mesh and no extra circuit mapping is

required.

Traffic Engineering Different path from least cost path, Source-based routing & Fast Re-

Routing (FRR)

5

Page 6: Mpls Networks Introduction

MPLS Label

32 bits header (4 Bytes) = each stack

Unlimited Stacks supported, The last stack BOS flag=1

Label: 20 bits

EXP: 3 bits

BOS: 1 bit (bottom of stack)

TTL: 8 bits

Label EXP TTL

BO

S

6 http://blog.shafagh.com by Shawn Zandi

Page 7: Mpls Networks Introduction

Label Stack

Top label and bottom label on a stack:

Label EXP TTL 0

Label EXP TTL 0

Label EXP TTL 1

7

Page 8: Mpls Networks Introduction

Label Stack (cont.)

Some MPLS applications like MPLS VPNs require more

than one label in the label stack to forward the packets.

MPLS VPNs and AToM put two labels in the label stack.

MPLS is not a Layer 2 Protocol, not even Layer 3

MPLS is viewed as a Layer 2.5 protocol.

Label 0 Label 1 IPv4 PPP

8 http://blog.shafagh.com by Shawn Zandi

Page 9: Mpls Networks Introduction

Protocol Identifier

Data Link Layer Protocol Identifier

ATM uses a different way for encapsulating the Label.

Layer 2 Protocol Identifier Field Value (hex)

PPP Protocol Field 0281

Ethernet SNAP Ether-type 8847

HDLC Protocol 8847

Frame Relay NLPID 80

9

Page 10: Mpls Networks Introduction

Label Switch Router

LSR is a router that supports MPLS.

Ingress LSR

Inserts a label (push) and sends packet to MPLS network.

Egress LSR

Removes the label (pop) and sends packet on a data link.

Intermediate LSR

Modifies the label (swap) and switches the packets.

Edge LSR = Ingress and Egress LSRs

10 http://blog.shafagh.com by Shawn Zandi

Page 11: Mpls Networks Introduction

MPLS Network

Label Switch Router (cont.)

Ingress LSR Intermediate LSR Egress LSR

Imposing LSR Disposing LSR

11

Page 12: Mpls Networks Introduction

MPLS VPN

Label Switch Router (cont.)

Provider Edge PE CE Customer Edge P

12 http://blog.shafagh.com by Shawn Zandi

Page 13: Mpls Networks Introduction

MPLS Network

Label Switched Path

Ingress

LSR

LSR LSR LSR Ingress

LSR

LSP

LSP : Sequence of LSRs – a path through the MPLS network.

(Unidirectional)

13

Page 14: Mpls Networks Introduction

MPLS Network

Nested LSP

Ingress

LSR

LSR LSR LSR Ingress

LSR

LSP

LSP inside LSP – The second Label spans the entire MPLS

network.

LSP

14 http://blog.shafagh.com by Shawn Zandi

Page 15: Mpls Networks Introduction

Forwarding Equivalence Class

FEC is group or flow of packets classified for a forwarding

decision and have similar EXP.

Ingress LSR decides which packet belongs to which FEC.

All packets with same FEC get the same label imposed by the

ingress LSR

Same FEC = Same Label.

Same Label <> Same FEC. (might have different FEC)

15

Page 16: Mpls Networks Introduction

FEC Classification

Ingress LSR Classifies traffic (FEC) based on:

Certain multicast group

Based on DSCP or Precedence

Based on VC (sub-interface)

Based on Destination IP

Based on BGP Prefixes pointing to the same Next-hop.

In this case all traffic for an Egress LSR (iBGP Peer) can be forwarded

through a specific LSP.

16 http://blog.shafagh.com by Shawn Zandi

Page 17: Mpls Networks Introduction

Label Distribution

Adjacent LSRs must agree to use specific Label for a

specific IP Prefix.

Labels are local and have no global meaning.

Labels are between adjacent LSRs.

A label distribution protocol is required.

Using IP Routing Protocol (EIGRP, ISIS, OSPF)

Using Label Distribution Protocol (TDP, LDP, RSVP)

17

Page 18: Mpls Networks Introduction

Label Distribution with Routing Protocol

Advantage:

Does not need a new label distribution protocol.

Routing and Label distribution are always in sync.

EIGRP implementation is straight forward.

Disadvantage:

Link state routing protocols do not function this way.

18 http://blog.shafagh.com by Shawn Zandi

Page 19: Mpls Networks Introduction

Label Distribution with LDP

Label Information Base (LIB) holds remote and local label

bindings.

One local binding per prefix.

Label Space:

Per platform

Per interface (LC-ATM)

19

Page 20: Mpls Networks Introduction

LIB LFIB

LFIB is Label Forwarding Instance Base, a table used to

forward incoming and outgoing labels for LSPs.

1. All remote bindings LIB

2. Only one possible outgoing label in LIB LFIB

LDP

Static

MPBGP

RSVP

20 http://blog.shafagh.com by Shawn Zandi

Page 21: Mpls Networks Introduction

MPLS Payload

The MPLS has no Network Level Protocol Identifier.

NLPID exists in all Layer 2 protocols (different names)

Intermediate LSRs do not need to know what payload is.

Egress LSR should know what the payload is, to forward.

Egress LSR is the one who created label binding for FEC.

21

Page 22: Mpls Networks Introduction

LDP Modes

Label Distribution Mode

DOD Downstream-on-Demand (pull mode – LC-ATM)

UD Unsolicited Downstream (push mode – Default)

Label Retention Mode

LLR Liberal Label Retention (keep all bindings in LIB - Default)

CLR Conservative Label Retention (LC-ATM)

LSP Control Mode

Independent LSP (immediate local binding for FEC - Default)

Ordered LSP (IOS ATM switches)

22 http://blog.shafagh.com by Shawn Zandi

Page 23: Mpls Networks Introduction

LFIB Forwarding Commands

show ip cef x.x.x.x

show adjacency table

show mpls forwarding-table

show mpls forwarding-table x.x.x.x

show mpls forwarding-table x.x.x.x detail

show mpls forwarding-table vrf …

show mpls interfaces … detail

23

Page 24: Mpls Networks Introduction

Label Operation

Pop

Swap

Push

Untagged/No Label

Aggregate

Remove the label stack then perform IP Lookup.

24 http://blog.shafagh.com by Shawn Zandi

Page 25: Mpls Networks Introduction

IOS Label Range

Default Label Range 16 to 100,000 Router(config)# mpls label range 16 1048575

Unknown Label: drop

Reserved Label 0 to 15:

Implicit NULL Label (3)

Set by egress LSR for connected and summarized prefixes to

penultimate LSR to not send Label. “penultimate hop popping” PHP

Explicit NULL Label(0, for IPv6=2)

Like implicit NULL but send label=0 to retain EXP value.

Router Alert Label (1)

Perform software Lookup instead of hardware

OAM Alert Label (14) RFC 3429 – not supported on IOS

25

Page 26: Mpls Networks Introduction

TTL and MPLS

TTL (-1) is copied from IP header to MPLS and vice versa.

Don’t copy if TTL value is greater than packet TTL.

Label to

IP

Igress

LSR

LSR LSR

TTL=254 TTL=253

TTL=253

TTL=253 TTL=253

TTL=252

TTL=253 TTL=251

TTL=252

IP to

Label

TTL=253

Label to

Label

26 http://blog.shafagh.com by Shawn Zandi

Page 27: Mpls Networks Introduction

TTL – Label to Label

Intermediate LSR does not change TTL in IP header or underlying labels.

POP

LSR LSR LSR

TTL=253 TTL=253

TTL=249 TTL=248

TTL=253 TTL=253

TTL=251

TTL=253 TTL=253

TTL=251

TTL=251

TTL=250

SWAP

TTL=252

TTL=251

PUSH

27

Page 28: Mpls Networks Introduction

TTL Expire

ICMP “time exceeded” (type 11 code 0) is forwarded along the LSP

because interim LSR might have no route to the originator of packet.

Ingress Egress

TTL=2 TTL=1

TTL=1 ICMP

Time

Exceeded

TTL=255

TTL=255

TTL

Expired!

ICMP

Time

Exceeded

TTL=254

ICMP

Time

Exceeded

TTL=253

ICMP

Time

Exceeded

TTL=251

TTL=253

ICMP

Time

Exceeded

TTL=253

TTL=252

ICMP

Time

Exceeded

TTL=250

LSR LSR LSR

28 http://blog.shafagh.com by Shawn Zandi

Page 29: Mpls Networks Introduction

MPLS MTU

Maximum size of packet that can be sent to data link

without fragmentation.

MRU Maximum Receive Unit used in LFIB for neighbors.

A value per FEC (or prefix) not based on interface.

On LSR configure MTU to 1508 (1500 + 2 Labels)

(config-if)# mpls mtu 1508

If on switches MTU is not increased = baby giant drops.

(config)# system jumbomtu

(config)# system mtu 1508

29

Page 30: Mpls Networks Introduction

Fragmentation

Fragmentation <> Performance

LSR strips the label and fragments payload.

Path MTU Discovery

Modern hosts send IP with DF bit set (Don’t Fragment) to

receive ICMP type 3 code 4 “Fragmentation needed”

Process continues with lowering the size till no error is

received and correct MTU achieves.

LSR sends ICMP type 3 code 4 along with LSP (just like

TTL exceeded)

30 http://blog.shafagh.com by Shawn Zandi

Page 31: Mpls Networks Introduction

Label Distribution Protocol

Discovery of LSRs (hello message – 224.0.0.2/UDP/646)

Session Establishment – TCP

Label Mapping Advertisement

Notifications

LDP needs “ip cef”

Interface configration: “mpls ip”

31

Page 32: Mpls Networks Introduction

LDP - LSR Discovery

LDP hello messages are UDP 646 to 224.0.0.2

“all routers on this subnet”

show mpls ldp discovery [detail]

show mpls interfaces

(config-if)# mpls ldp discovery

32 http://blog.shafagh.com by Shawn Zandi

Page 33: Mpls Networks Introduction

More Information

33

Good MPLS Reference Book

Cisco Press - MPLS Fundamentals

Juniper MPLS-Enabled Applications

Page 34: Mpls Networks Introduction

34 http://blog.shafagh.com by Shawn Zandi