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

MPLS Basic Training

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Introduction

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Introduction What is MPLS?


Multi Protocol Label Switching
MPLS is an efficient encapsulation mechanism
Uses Labels appended to packets (IP packets, AAL5 frames) for
transport of data
MPLS packets can run on many layer 2 technologies
such as ATM, FR, PPP, POS, Ethernet
Other layer 2 technologies can be run over an MPLS network
- Pseudowires

Labels can be used as designators


For exampleIP prefixes, ATM VC, or a bandwidth guaranteed path

MPLS is a technology for delivery of IP Services

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Original Motivation for MPLS


Allow core routers/networking devices to switch packets
based on some simplified, fixed length header
Provide a highly scalable mechanism that was topology
driven rather than flow driven
Leverage hardware so that simple forwarding paradigm
can be used
It has evolved a long way from the original goal
Hardware became better and looking up the longest best
match was no longer an issue
By associating labels with prefixes, groups of sites or
bandwidth paths or light paths with new services such as MPLS
VPNs and Traffic engineering, GMPLS were now possible
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Concepts
Few components play a role in creating an MPLS
network
IGP: Core Routing Protocol
MPLS Label (or shim, think OSI layer 2.5)
Encapsulation of MPLS label (push/pop/swap)
Forwarding Equivalence Class (FEC)
Label Distribution Protocol (LDP)
MPLS Applications related protocols: MP-BGP, RSVP, etc.

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Terminology
Acronyms
PE - Provider edge router (or Label Edge Router (LER))
P - Provider core router (or Label Switch Router (LSR))
CE - Customer Edge router (also referred to as CPE)
ASBR - Autonomous System Boundary Router
RR - Route Reflector

TE -Traffic Engineering
TE Head end - Router that initiates a TE tunnel
TE Midpoint - Router where the TE Tunnel transits

VPN - Collection of sites that share common policies


AToM - Any Transport over MPLS
Cisco scheme for building layer 2 circuits over MPLS
Attachment Circuit - Layer 2 circuit between PE and CE
Emulated circuit - Pseudowire between PEs

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Concepts
In Core:
Forward using labels (as
opposed to IP addr)
Label indicates service class
and destination
Label Swapping or Switching

At Edge:
Classify packets
Label them
Label Imposition

At Edge:
Remove Labels and
forward packets
Label Disposition

PE or Label
Switch Router
(LER)
(ATM Switch or
IP Router)

Label Distribution Protocol

P or Label Switch Router


(LSR)
Router
ATM switch + Label
Switch Controller

Create new services via flexible classification


Provides the ability to setup bandwidth guaranteed paths (TE)

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

MPLS Operation
1a. Existing routing protocols (e.g. OSPF, IS-IS)
establish reachability to destination networks
1b. Label Distribution Protocol (LDP)
establishes label to destination
network mappings

2. Ingress LER receives packet,


performs Layer 3 value-added services,
and labels packets
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

4. LER at egress
removes label and
delivers packet

3. LSR switches
packets using label
swapping
8

MPLS Labels

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Data Encapsulation Review


3k of Data to be sent
MTU = 1500 Bytes (Data segment is MSS)
MSS = MTU Encapsulation Headers

TCP
Header

DATA

IP
Header

TCP
Header

DATA

Frame
Header

IP
Header

TCP
Header

DATA

FCS

Frame

Frame
Header

IP
Header

TCP
Header

DATA

FCS

Bits

TCP Header = 20 bytes


IP Header = 20 bytes
MSS = 1500 40 = 1460 bytes of
data sent
Frame Header = 14 bytes
FCS = 4 bytes
L2 Frame = 1518 bytes

011010101

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Segment

Packet

10

Label Header for Packet Media


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

Label = 20 bits
COS/EXP = Class of Service, 3 bits
S = Bottom of Stack, 1 bit
TTL = Time to Live, 8 bits

Presentation_ID

Can be used over Ethernet, 802.3, or PPP links


Fixed length label 4 bytes per label (32 bits)
Uses two new Ethertypes/PPP PIDs
Contains everything needed at forwarding time
One word per label

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

11

MPLS Labels increase MTU!!!


3k of Data to be sent
MTU = 1500 Bytes (Data segment is MSS)
MSS = MTU Encapsulation Headers
TCP Header = 20 bytes
IP Header = 20 bytes
MSS = 1500 40 = 1460 bytes of
data sent
Labels imposed
on the IP packet
(4 bytes each)

011010101

Presentation_ID

TCP
Header

DATA

IP
Header

TCP
Header

DATA

Segment

Packet

Frame
Header

MPLS
Label

IP
Header

TCP
Header

DATA

FCS

Frame

Frame
Header

MPLS
Label

IP
Header

TCP
Header

DATA

FCS

Bits

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

12

MPLS MTU
You need to account for the increased packet size
Change the physical MTU of the interface
Or
Use the mpls mtu <n> command

FE interfaces cannot increase MTU, have to use mpls


mtu command
GE can go up to 9000 bytes
Switches can change system mtu <n>
set CE facing interfaces back to 1500

Choose MTU large enough to account for all labels


min of 2 labels

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

13

Forward Equivalence Class (FEC)


Describes a set of packets with similar and / or identical
characteristics which may be forwarded the same way
I.E. bound to the same MPLS label

An FEC is a set of packets that a single router:


(1) Forwards to the same next hop;
(2) Out the same interface; and
(3) With the same treatment (such as queuing).

Determines how packets are mapped to LSPs


IP Prefix/host address
Layer 2 Circuits (ATM, FR, PPP, HDLC, Ethernet)
Groups of addresses/sites - VPN x
A VPLS instance - VFI
Tunnel Interface - Traffic Engineering
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

14

MPLS in hardware

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

15

MPLS Control and Forwarding Planes


Control plane used to distribute labels - LDP, RSVP or MP-BGP
Forwarding plane consists of label imposition, swapping and
disposition
Key: There is a separation of Control Plane and Forwarding Plane
Basic MPLS: destination-based unicast
Labels divorce forwarding from IP address *
Many additional options for assigning labels
Labels define destination and service

* BGP Free core

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

16

Control and Forward Plane Separation


RIB

Routing
Process

Route
Updates/
Adjacency

MPLS
Process

LIB

LFIB

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Updates/
Adjacency

FIB

MPLS Traffic

Presentation_ID

Label Bind

IP Traffic

17

Routing Basics

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

18

Router Example: Forwarding Packets


address
prefix
address
prefix

address
prefix

I/F

128.89

171.69

128.89

171.69

...

128.89

I/F

I/F

...

...
128.89
0
0

128.89.25.4

Data

128.89.25.4

Data

1
128.89.25.4

Data

128.89.25.4

Data
171.69

Packets Forwarded Based


on IP Address
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

19

MPLS Example: Routing Information


In
label

Address
Prefix

Out Out
Iface label

In
label

Address
Prefix

Out Out
Iface label

128.89

128.89

171.69

171.69

...

...

...

...

In
label

Address
Prefix

Out Out
Iface label

128.89

...

...

128.89

You can reach 128.89 thru me


You can reach 128.89 and
171.69 thru me

Routing Updates
(OSPF, EIGRP, )
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

You can reach 171.69 thru me

Cisco Confidential

171.69

20

MPLS Example: Assigning Labels


In
label

Address
Prefix

Out Out
Iface label

In
label

Address
Prefix

128.89

171.69

...

...

Out Out
Iface label

128.89

171.69

...

...

...

...

...

...

In
label

Address
Prefix

Out Out
Iface label

128.89

...

...

...

...

128.89

Use label 9 for 128.89


Use label 4 for 128.89 and
Use label 5 for 171.69

Label Distribution
Protocol (LDP)

Use label 7 for 171.69

171.69

(Downstream Unsolicited Label Allocation)


Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

21

MPLS Example: Forwarding Packets


In
label

Address
Prefix

Out Out
Iface label

In
label

Address
Prefix

128.89

171.69

...

...

Out Out
Iface label

128.89

171.69

...

...

...

...

...

...

In
label

Address
Prefix

Out Out
Iface label

128.89

...

...

...

...

128.89

0
128.89.25.4
1
128.89.25.4

Data

9
128.89.25.4

Data

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Data

Label Switch Forwards


Based on Label
Presentation_ID

128.89.25.4

Data

171.69

22

Label Distribution Protocol

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

23

Unicast Routing Protocols


OSPF, IS-IS, BGP are needed in the network
They still provide reachability between devices in the network

Label distribution protocols distribute labels for prefixes


advertised by unicast routing protocols using
Label Distribution Protocol (LDP,TDP)
RSVP-TE for Traffic Engineering
Extending existing protocols like BGP (MP-BGP address-families)
to distribute Labels (inter-AS) *

* Not covering inter-AS or CSC in this class


Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

24

TDP & LDP


Tag Distribution ProtocolCisco proprietary
Pre-cursor to LDP
Used for Cisco Tag Switching (port 711)

TDP and LDP supported on the same device


Per neighbor/ link basis
Per target basis
TDP is the default on most Cisco devices, go figureJ

LDP is a superset of TDP


Uses the same label/ tag
Difference? They have different message formats

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

25

Label Distribution Protocol


Defined in RFC 3035 and 3036
Used to distribute Labels in an MPLS network
Forwarding Equivalence Class (FEC)
How packets are mapped to LSPs (Label Switched Paths)
VPN_ID
VC_ID
Class of Service

Advertise Labels per FEC


Reach destination a.b.c.d with label x

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

26

Label Distribution Modes


Downstream unsolicited
Downstream node just advertises labels for prefixes/FEC
reachable via that device

Downstream on-demand
Upstream node requests a label for a learned prefix via the
downstream node

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

27

Label Distribution: Unsolicited


Downstream

Network X
E

Label for a prefix is allocated and advertised to all


neighbor LSRs, regardless of whether the neighbors
are upstream or downstream LSRs for the destination!
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

28

Label Distribution: Unsolicited


Downstream
LIB on B
Network
LSR label
X
local
25

X = 25!
A

X = 25!
B

Network X
E

Label for a prefix is allocated and advertised to all


neighbor LSRs, regardless of whether the neighbors
are upstream or downstream LSRs for the destination!
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

29

Label Distribution: Downstream on


Demand
Routing table of A
Network Next-hop
X
C

Routing table of C
Network Next-hop
X
D

Routing table of D
Network Next-hop
X
E

Routing table of E
Network Next-hop
X
conn

RQ X!
A!

C!

D!

E!

Network X!

An LSR will only assign a label to a prefix when asked


for a label by an upstream LSR!
Label distribution is a hop-by-hop parameter
different label distribution mechanisms can coexist in
an MPLS network!
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

30

LDP on Cisco platforms


LDP and TDP are both supported
The protocol to use is configurable
Per-interface basis for directly connected peers
Per-target basis for non-directly connected peers
Default is TDP

A platform may support LDP and TDP sessions


simultaneously but not using the same label space to
the same LSR
An LSP may be signaled by LDP on some segments
and by TDP on other segments
Why???
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

31

Other Label Distribution Protocols RSVP-TE


Used in MPLS Traffic Engineering
Additions to RSVP signaling protocol
Leverage the admission control mechanism of RSVP to
create an LSP with bandwidth requirements
Label requests are sent in PATH messages and binding
is done with RESV messages
EXPLICT-ROUTE object defines the path over which
setup messages should be routed
Using RSVP has several advantages
Fixed path through network
Bandwidth guarantee
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

32

Other Label Distribution Protocols - MP-BGP


Used in the context of MPLS VPNs
Inter-AS VPNs
Carrier Supporting Carrier

Need multi-protocol extensions to BGP


Routers need to be BGP peers
Label mapping info carried as part of NLRI (Network
Layer Reacheability Information)
Lots of neat tricks can be done

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

33

LDP Peer Discovery

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

34

LDP Peer Discovery Mechanism


LSRs discover LDP peers by exchanging LDP Hello
messages (dynamic neighbor discovery)
Basic Neighbor Discovery
Discover directly attached neighborspt-to-pt links
(including Ethernet)
LDP link Hellos are sent periodically using UDP port 646
(multicast to 224.0.0.2)
Establish a TCP session and Exchange prefix/FEC and
label information

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

35

LDP Peer Discovery Mechanism (cont)


LSRs discover LDP peers by exchanging LDP Hello
messages (dynamic neighbor discovery)
Extended neighbor discovery
Establish peer relationship with a non-directly connected
router
LDP Targeted Hellos are sent using UDP port 646 (unicast)
Establish a TCP session and Exchange prefix/FEC and
label information

* Used in Traffic Engineering


Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

36

LDP Discovery - Non-adjacent Neighbors

Normally Routed Path!

R7!

R6!

R5!

R2!

R3!

R4!

R8!

R9!

R1!

Traffic Engineering Route!

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

Normally
Routed Path!
Traffic
Engineering
Route"
37

LDP Discovery - Non-adjacent Neighbors

R7!

R6!

R5!

R2!

R3!

R4!

R8!

R9!

R1!

Presentation_ID

TE!

TE!

TE!

LDP!

LDP!

LDP!

LDP!

Packet!

Packet!

Packet!

Packet!

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

38

LDP Session Establishment


TCP connection establishment
Once neighbors are discovered, TCP session established
Open a TCP connection to be used to distribute label bindings
Use Router-id or the IP source address of its Hello
messages to avoid two concurrent TCP connections

Session Initialization
LDP peer exchange and negotiate Session parameters
Protocol version, label distribution method, timer values,
label ranges, etc.
Active LSR will track this parameter and reply with
initialization message; and keepalives are exchanged

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

39

LDP Session
R2#sh mpls ldp neighbor!
Peer LDP Ident: 192.168.0.3:0; Local LDP Ident 192.168.0.2:0!
TCP connection: 192.168.0.3.11000 - 192.168.0.2.646!
State: Oper; Msgs sent/rcvd: 1658/1659; Downstream!
Up time: 23:58:08!
LDP discovery sources:!
Serial2/0, Src IP addr: 10.0.1.10!
Addresses bound to peer LDP Ident:!
10.0.1.10

10.0.1.13

192.168.0.3!

!
!
R2s loopback or Router-Id is 192.168.0.2!
R3s loopback or Router-Id is 192.168.0.3!

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

40

Loop Detection
LDP relies on loop-detection mechanisms built into IGPs that are used
to determine the path
If, however, a loop is generated (that is, mis-configuration with static
routes), the TTL field in the label header is used to prevent indefinite
looping of data packets
TTL functionality in the label header is equivalent to TTL in the IP
headers
TTL is usually copied from the IP headers to the label headers (TTL
propagation)

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

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

EXP S

TTL

41

Label Stacking
There may be more than one label in an MPLS packet
Need to account for 4 bytes in MTU per label

As we know labels correspond to forwarding equivalence classes (FECs)


Examplethere can be one label for routing the packet to an egress point and
another that separates a customer A packet from customer B
Inner labels can be used to designate services/FECs, etc.
ie: VPNs, fast reroute

Outer label used to route/switch the MPLS packets in the network


Called the Transport Label

Last label in the stack is marked with End of Stack (EOS) bit

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

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

EXP S

TTL

42

MPLS Configuration

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

43

Lab Topology

30

S2/0

CE
R5

Presentation_ID

S0/0

S3/0
172.16.0.0/30

E0/0

PE
PE

E1/0
E1/0

R4

2007 Cisco Systems, Inc. All rights reserved.

E0/0
10.0.34.0/30

Cisco Confidential

R1

30
0/
1.
8.

.4
/

S3/0

16

.1

IGP=OSPF

R2

CE

2.

68

E1/0

S2/0
S0/0
172.16.0.4/30

19

2.
1

R7

10.0.48.0/30

19

R8

PE

E0/0
E0/0
10.0.27.0/30

/ 30

E0/0

S0/0

E1/0
E1/0
10.0.78.0/30

10 .
0.2

R9

3.0

CE

S0/0

CE

R3

R6

44

MPLS Configuration Steps


1. Insure CEF is running on the Router
2. Insure MPLS is running on the router

MPLS is enabled by default

3. Determine which Label Distribution Method you


will use (TDP or LDP)

This can be done globally setting the default


or setting it on a per interface basis

4. Establish the Router-ID for the LDP


5. Configure all Provider Interfaces to run LDP
6. Verify the configuration
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

45

MPLS Configuration
1. Enable CEF

Router(config)# ip cef [distributed]

2. Enable MPLS (default is on)


Router(config)# mpls ip

3. Enable LDP Protocol globally (optional)


Router(config)# mpls label protocol ldp

4. Establish LDP router ID (optional/recommended)


Router(config)#mpls ldp router-id interface [force]

5. Enable LDP per interface


Router(config-if)# mpls ip

6. Enable LDP Protocol per interface (optional)


Router(config-if)# mpls label protocol ldp
NOTE: CAN ALSO BE DONE IN GLOBAL CONFIGURATION

7. Verify
Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

46

Verify your configuration


Show mpls interfaces
Show mpls ldp discovery
Show mpls ldp neighbors
Show mpls ldp bindings
Show mpls forwarding-table

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

47

Verification Commands
Which interfaces are running MPLS?
R2#sh mpls interfaces
Interface
Serial2/0
Serial5/0
R2#

IP
Yes (ldp)
Yes (ldp)

Tunnel
No
No

BGP Static Operational


No No
Yes
No No
Yes

Which neighbors have been discovered?


R2#sh mpls ldp discovery
Local LDP Identifier:
10.0.0.2:0
Discovery Sources:
Interfaces:
Serial2/0 (ldp): xmit/recv
LDP Id: 10.0.0.3:0
Serial5/0 (ldp): xmit/recv
LDP Id: 10.0.0.7:0
R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

48

Verification Commands (cont)


R2#sh mpls ldp neighbor
Peer LDP Ident: 10.0.0.3:0; Local LDP Ident 10.0.0.2:0
TCP connection: 10.0.0.3.11001 - 10.0.0.2.646
State: Oper; Msgs sent/rcvd: 15/13; Downstream
Up time: 00:00:19
LDP discovery sources:
Serial2/0, Src IP addr: 10.0.1.10
Addresses bound to peer LDP Ident:
10.0.1.10
10.0.1.13
10.0.0.3
Peer LDP Ident: 10.0.0.7:0; Local LDP Ident 10.0.0.2:0
TCP connection: 10.0.0.7.11001 - 10.0.0.2.646
State: Oper; Msgs sent/rcvd: 15/13; Downstream
Up time: 00:00:18
LDP discovery sources:
Serial5/0, Src IP addr: 10.0.1.18
Addresses bound to peer LDP Ident:
10.0.1.18
10.0.1.21
10.0.0.7
R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

49

Verification Commands (cont)


R2#sh mpls ldp bindings
lib entry: 10.0.0.2/32, rev 2
local binding:

label: imp-null

remote binding: lsr: 10.0.0.3:0, label: 16


remote binding: lsr: 10.0.0.7:0, label: 16
lib entry: 10.0.0.3/32, rev 4
local binding:

label: 16

remote binding: lsr: 10.0.0.3:0, label: imp-null


remote binding: lsr: 10.0.0.7:0, label: 17
lib entry: 10.0.0.4/32, rev 6
local binding:

label: 17

remote binding: lsr: 10.0.0.3:0, label: 17


remote binding: lsr: 10.0.0.7:0, label: 18
Cont

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

50

Verification Commands (cont)


R2#sh mpls forwarding-table
Local Outgoing
Prefix
Label Label or VC
or Tunnel Id
16
Pop Label
10.0.0.3/32
17
16
10.0.0.4/32
18
19
10.0.0.5/32
19
20
10.0.0.6/32
20
Pop Label
10.128.34.0/24
21
17
10.128.45.0/24
22
21
10.128.56.0/24
R2#

Bytes Label
Switched
0
0
0
0
0
0
0

Outgoing
interface
Fa2/0
Fa2/0
Fa2/0
Fa2/0
Fa2/0
Fa2/0
Fa2/0

Next Hop

R2#sh mpls forwarding-table


Local Outgoing
Prefix
Label Label or VC
or Tunnel Id
16
Pop Label
10.0.0.3/32
17
17
10.0.0.4/32
18
Pop Label
10.0.0.7/32
19
19
10.0.0.8/32
20
Pop Label
10.0.1.12/30
21
Pop Label
10.0.1.20/30

Bytes Label
Switched
0
0
0
0
0
0

Outgoing
interface
Se2/0
Se2/0
Se5/0
Se5/0
Se2/0
Se5/0

Next Hop

22

10.128.23.3
10.128.23.3
10.128.23.3
10.128.23.3
10.128.23.3
10.128.23.3
10.128.23.3

point2point
point2point
point2point
point2point
point2point
point2point

22

10.0.1.24/30

Se2/0

point2point

22

10.0.1.24/30

Se5/0

point2point

R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

51

Verification Commands (cont)


R2#sh mpls forwarding-table 10.0.0.8 detail
Local

Outgoing

Prefix

Bytes Label

Outgoing

Label

Label or VC

or Tunnel Id

Switched

interface

19

19

10.0.0.8/32

Se5/0

Next Hop
point2point

MAC/Encaps=4/8, MRU=1500, Label Stack{19}


0F008847 00013000
No output feature configured
R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

52

Verification Commands (cont)


Verifying Labels Are Set traceroute is MPLS aware
!
R2#traceroute 10.0.0.8
Type escape sequence to abort.
Tracing the route to 10.0.0.8
1 10.0.1.18 [MPLS: Label 19 Exp 0] 52 msec 40 msec 52 msec
2 10.0.1.22 44 msec *

32 msec

R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

53

Stupid Router Tricks (but useful)


mpls ip propagate-ttl
To control the generation of the time-to-live (TTL) field in the
Multiprotocol Label Switching (MPLS) header when labels are first added
to an IP packet, use the mpls ip propagate-ttl command in global
configuration mode. To use a fixed TTL value (255) for the first label of
the IP packet, use the no form of this command.
mpls ip propagate-ttl
no mpls ip propagate-ttl [forwarded | local]

forwarded

local

Presentation_ID

(Optional) Prevents the traceroute command from


showing the hops for forwarded packets. (customer
can not see)
(Optional) Prevents the traceroute command from
showing the hops only for local packets. (you can
not see)

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

54

Troubleshooting MPLS Configuration


Which interfaces are running MPLS?
R2#sh mpls interfaces
Interface
Serial2/0
Serial5/0
R2#

IP
Yes (ldp)
Yes (ldp)

Tunnel
No
No

BGP Static Operational


No No
Yes
No No
Yes

Which neighbors have been discovered?


R2#sh mpls ldp discovery
Local LDP Identifier:
10.0.0.2:0
Discovery Sources:
Interfaces:
Serial2/0 (ldp): xmit/recv
LDP Id: 10.0.0.3:0
Serial5/0 (ldp): xmit/recv
LDP Id: 10.0.0.7:0
R2#

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

55

Troubleshooting MPLS Configuration (cont)


Which labels are being used for a subnet?
R2#sh mpls ldp binding 10.0.0.8 255.255.255.255
10.0.0.8/32
in label:
19
out label:
19
lsr: 10.0.0.3:0
out label:
19
lsr: 10.0.0.7:0
R2#

inuse

Summary of labels learned and assigned


R2#sh mpls ip binding summary
Total number of prefixes: 12
Generic label bindings

R2#

Presentation_ID

prefixes
12

assigned
in labels
12

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

learned
out labels
20

56

Troubleshooting MPLS Configuration (cont)


R2#debug mpls ldp messages received
LDP received messages, excluding periodic Keep Alives debugging is on
R2#debug mpls ldp messages sent
LDP sent PDUs, excluding periodic Keep Alives debugging is on
R2#clear mpls ldp neighbor 10.0.0.3
00:49:46: %LDP-5-CLEAR_NBRS: Clear LDP neighbors (10.0.0.3) by console
00:49:46: %LDP-5-NBRCHG: LDP Neighbor 10.0.0.3:0 is DOWN
00:49:53: ldp: Rcvd init msg from 10.0.0.3 (pp 0x0)
00:49:53: ldp: Sent init msg to 10.0.0.3:0 (pp 0x0)
00:49:53: ldp: Sent keepalive msg to 10.0.0.3:0 (pp 0x0)
00:49:53: ldp: Rcvd keepalive msg from 10.0.0.3:0 (pp 0x0)
00:49:53: %LDP-5-NBRCHG: LDP Neighbor 10.0.0.3:0 is UP
00:49:53: ldp: Sent address msg to 10.0.0.3:0 (pp 0x63C3B360)
00:49:53: ldp: Sent label mapping msg to 10.0.0.3:0 (pp 0x63C3B360)
< cut for brevity>

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

57

Presentation_ID

2007 Cisco Systems, Inc. All rights reserved.

Cisco Confidential

58