Anda di halaman 1dari 28

MPLS Basics

Internal Service Provider Traffic Forwarding

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-1

Objectives
Show the Cisco IP NGN edge and core network layers within the IP NGN
architecture
Describe the basic concepts of MPLS
Describe MPLS labels and how the label is inserted between the Layer 2 and
Layer 3 header
Describe MPLS label switch routers and edge LSRs
Describe the MPLS forwarding structures, the FIB and LFIB
Show an example of how a packet traverses an MPLS-enabled network
Describe the Label Distribution Protocol (LDP)
Describe the LDP adjacency establishment process
Describe LDP label allocation
Describe LDP label advertisement
Describe the LDP steady-state condition
Describe basic MPLS LDP configuration and verification
Describe MPLS LDP troubleshooting steps
2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-2

Cisco IP NGN Infrastructure Layer


MPLS is placed in the core and edge networks.
Access

Aggregation

IP Edge

Core

Residential

Mobile Users

Business

IP Infrastructure Layer

Access

2012 Cisco and/or its affiliates. All rights reserved.

Aggregation

IP Edge

Core

SPNGN2 v1.013-3

MPLS Introduction
MPLS is a technology that enhances IP routing and Cisco Express
Forwarding switching in service provider core networks.
A switching mechanism exists where packets are switched, based on
labels:
- Labels usually correspond to destination IP networks

An additional header, called the MPLS label, is inserted and used for
MPLS switching.
IP

MPLS/IP
IP

2012 Cisco and/or its affiliates. All rights reserved.

A
L

IP

IP

D
IP

IP

SPNGN2 v1.013-4

MPLS Applications
MPLS for service providers
In the pastfaster forwarding
Todaya platform for traffic engineering and VPN service
Works on a core and edge layer

MPLS traffic engineering


Allows ISPs to optimize network utilization
Can be used to increase fault tolerance

MPLS VPNs
Allows separation of customers into VPNs
Similar to virtual circuits (for example, from the Frame Relay world)
Allows Layer 2 or Layer 3 VPNs

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-5

MPLS Labels
MPLS uses a 32-bit label header that is inserted between Layer 2 and
Layer 3 and comprises the following fields:
- 20-bit label
- 3-bit experimental field
- 1-bit, bottom-of-stack indicator
- 8-bit, Time-to-Live field

MPLS can be used regardless of the Layer 2 protocol.


0

19 20

Label

L2 Header

2012 Cisco and/or its affiliates. All rights reserved.

EXP

MPLS Label

22 23 24

31

TTL

IP Packet

SPNGN2 v1.013-6

Label Switch Routers


LSRs forward packets based on labels and swap labels:
- The last LSR in the path also removes the label and forwards the IP packet

Edge LSR:
- Labels IP packets (or imposes label) and forwards them into the MPLS domain
- Forwards IP packets out of the MPLS domain

A sequence of labels to reach a destination is called a LSP

IP
20.0.0.1

MPLS and IP
A

20.0.0.1

10.0.0.1

25
Edge LSR

2012 Cisco and/or its affiliates. All rights reserved.

C
35

32

34
LSR

LSR

10.0.0.1
Edge LSR

20.0.0.1
10.0.0.1

SPNGN2 v1.013-7

MPLS Forwarding Structures


FIB is used to forward unlabeled IP packets or to label packets if a nexthop label is available.
LFIB is used to forward labeled packets. A received label is swapped by
a next-hop label.

IP

MPLS and IP
A

20.0.0.1

20.0.0.1

10.0.0.1

25
Edge LSR
FIB

C
35

D
32

34

20.0.0.1

10.0.0.1
Edge LSR

LSR

LSR

LFIB

LFIB

FIB

10.0.0.1

10.0.0.0/24 B 25

25 34 C

34 POP D

20.0.0.0/24 C 32

20.0.0.0/24 Conn

35 POP A

32 35 B

10.0.0.0/24 Conn

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-8

MPLS Example

IP

1. A router receives
an IP packet. A FIB
lookup is performed.

2. A label is added,
and the packet is sent
through an interface.

MPLS and IP
B

A
10.0.0.1

25
Edge LSR
FIB

LSR

LSR

Edge LSR

LFIB

LFIB

FIB

10.0.0.0/24 B 25

25 34 C

34 POP D

20.0.0.0/24 C 32

20.0.0.0/24 Conn

35 POP A

32 35 B

10.0.0.0/24 Conn

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-9

MPLS Example (Cont.)


3. A labeled packet is
received, and a LFIB
lookup is performed.

IP

4. A label is swapped,
and the packet is sent
through an interface.

MPLS and IP

10.0.0.1

25
Edge LSR
FIB

34
LSR

LSR

Edge LSR

LFIB

LFIB

FIB

10.0.0.0/24 B 25

25 34 C

34 POP D

20.0.0.0/24 C 32

20.0.0.0/24 Conn

35 POP A

32 35 B

10.0.0.0/24 Conn

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-10

MPLS Example (Cont.)


5. A labeled packet is
received, and a LFIB
lookup is performed.

IP

6. A label is removed,
and an IP packet is
sent out of an interface.

MPLS/IP

10.0.0.1

25
Edge LSR
FIB

34

D
10.0.0.1

LSR

LSR

Edge LSR

LFIB

LFIB

FIB

10.0.0.0/24 B 25

25 34 C

34 POP D

20.0.0.0/24 C 32

20.0.0.0/24 Conn

35 POP A

32 35 B

10.0.0.0/24 Conn

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-11

MPLS Example (Cont.)


7. An IP packet is
received, and a FIB
lookup is performed.

IP

8. The IP packet
is sent out of an
interface

LFIB

MPLS/IP

35 No label

10.0.0.1

25
Edge LSR
FIB

34

D
10.0.0.1

10.0.0.1

LSR

LSR

Edge LSR

LFIB

LFIB

FIB

10.0.0.0/24 B 25

25 34 C

34 POP D

20.0.0.0/24 C 32

20.0.0.0/24 Conn

35 POP A

32 35 B

10.0.0.0/24 Conn

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-12

Label Distribution Protocol


Forwarding structures that are used by MPLS have to be populated.
FIB is populated by:
- Routing table, which is populated by a routing protocol
- MPLS label is added to the FIB by LDP

LFIB is populated by:


- LDP

LDP is responsible for advertisement and redistribution of MPLS labels


between MPLS routers.

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-13

LDP Session
Adjacent routers establish a LDP session:
- MPLS-enabled routers first discover neighbors using hello packets that are
sent to 224.0.0.2 (FF02:::2) using UDP on port 646.
- A MPLS-enabled neighbor will respond to hello packets by establishing a TCP
session on port 656 to a peer router ID.

After the LDP session is established, labels can be exchanged.

MPLS and IP

UDP: Hello

TCP: Labels

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-14

Label Allocation
Each router generates a label for each network in a routing table:
- Labels have local significance.
- Label allocation is asynchronous.

For path discovery and loop avoidance, LDP relies on routing protocols.
Networks originating on the outside of the MPLS domain are not
assigned any label on the edge LSR. Instead, the pop label is
advertised.
IP

Label for X is 21

Label for X is 25

Label for X is 34

Label for X is pop

MPLS and IP
A

D
Network X

Edge LSR

2012 Cisco and/or its affiliates. All rights reserved.

LSR

LSR

Edge LSR

SPNGN2 v1.013-15

Label Advertisement
A router that receives a label from a next hop also stores the label
in the FIB.
1. Router B allocates, stores,
and advertises the label.
FIB (B)

LFIB (B)

XC

IP

MPLS/IP

In

Out

Next hop

Network

LSR

Label

25

untag

Local

25

X B 25

LSR

LFIB (A)

Network X
LSR

LIB (A)

In

Out

Next hop

Network

LSR

Label

21

25

Local

21

25

2012 Cisco and/or its affiliates. All rights reserved.

X = 25

X = 25

Edge LSR
FIB (A)

LIB (B)

Edge LSR
2. Router A allocates,
stores, and advertises the
label. It also receives a label
from router B and stores it.

SPNGN2 v1.013-16

Label Advertisement (Cont.)


A router stores a label from a neighbor even if the neighbor is not a next
hop for a destination.
4. Router B receives a label
from router C and stores it.
FIB (B)
X C 34

IP

MPLS/IP
A

Edge LSR

LFIB (B)

LIB (B)

In

Out

Next hop

Network

LSR

Label

25

34

Local

25

34

LSR

2012 Cisco and/or its affiliates. All rights reserved.

XD

X = 34

X = 34
LSR

FIB (C)

3. Router C allocates,
stores, and advertises the
label. It also receives and
stores a label from B.

Network X
Edge LSR

LFIB (C)

LIB (C)

In

Out

Next hop

Network

LSR

Label

34

untag

Local

34

25

SPNGN2 v1.013-17

Label Advertisement (Cont.)


Networks originating on the outside of the MPLS domain are not assigned any
label on the edge LSR. Instead, the pop label is advertised.
5. Router D advertises a
pop label for network X.
FIB (D)
X Conn

IP

LFIB (D)
In

Out

LIB (D)

Next hop

Network

LSR

Label

Local

POP

MPLS/IP
A

Edge LSR

X = POP

LSR

LSR

FIB (C)

6. Router C allocates, stores,


and advertises the label. It
also receives a label from
router B and stores it.

2012 Cisco and/or its affiliates. All rights reserved.

XD

D
Network X

Edge LSR

LFIB (C)

LIB (C)

In

Out

Next hop

Network

LSR

Label

34

POP

Local

34

25

POP
SPNGN2 v1.013-18

Steady-State
Occurs after all of the labels are exchanged and the LIB, LFIB, and FIB
structures are completely populated.
It takes longer for LDP to exchange labels than it takes a routing
protocol to converge.
There is no network downtime before LDP fully exchanges labels.
Meanwhile, packets can be routed using the FIB, if labels are not yet
available.
After the steady-state is reached, all packets are label-switched, except
on the ingress and outgress routers.

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-19

MPLS Configuration
Cisco IOS XR:
- MPLS forwarding is enabled by enabling LDP on an interface under the MPLS
LDP configuration mode.

Cisco IOS and IOS XE:


- MPLS forwarding is enabled by enabling MPLS on an interface under the
interface configuration mode.

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-20

Configuration Scenario

Enable MPLS on:


-

P1 on GigabitEthernet0/0/0/0 and GigabitEthernet0/0/0/1

P2 on GigabitEthernet0/0/0 and GigabitEthernet0/0/1

PE1 on GigabitEthernet0/0/0/0

PE2 on GigabitEthernet0/0
IP

MPLS and IP
GE0/0/0/0
GE0/0/0/0

2012 Cisco and/or its affiliates. All rights reserved.

P2

P1

PE1

GE0/0/0/1
GE0/0/0

PE2
GE0/0/1
GE0/0

192.168.101.0/24

SPNGN2 v1.013-21

Configuration
IP

MPLS and IP
P2

P1

PE1
GE0/0/0/0
GE0/0/0/0

GE0/0/0/1
GE0/0/0

Enter the MPLS LDP


configuration mode

mpls ldp
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/1

PE2
GE0/0/1
GE0/0

192.168.101.0/24

interface GigabitEthernet0/0
mpls ip
Enable MPLS under the
interface configuration mode

List the interfaces


that should be
enabled for MPLS

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-22

Verification
Verifies LDP neighbors
RP/0/RSP0/CPU0:P1# show mpls ldp neighbor
Peer LDP Identifier: 10.2.1.1:0
TCP connection: 10.2.1.1:23307 - 10.1.1.1:646
Graceful Restart: No
Session Holdtime: 180 sec
State: Oper; Msgs sent/rcvd: 27/26; Downstream-Unsolicited
Up time: 00:05:18
LDP Discovery Sources:
GigabitEthernet0/0/0/1
Addresses bound to this peer:
10.2.1.1
192.168.104.40
192.168.134.40

Displays content of the LIB table


RP/0/RSP0/CPU0:P1# show mpls ldp bindings
<output omitted>
192.168.101.0/24, rev 24
Local binding: label: 16000
Remote bindings: (2 peers)
Peer
Label
-----------------------10.1.10.1:0
21
10.2.1.1:0
20
<output omitted>
2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-23

Verification (Cont.)
Displays content of the LFIB table
RP/0/RSP0/CPU0:P1# show mpls ldp forwarding
Prefix
Label
Label
Outgoing
In
Out
Interface
---------------- ------- ---------- -----------10.0.0.0/8
16005
Unlabelled None
10.1.10.0/24
16011
ImpNull
Gi0/0/0/0
10.2.1.1/32
16008
ImpNull
Gi0/0/0/1
10.2.10.1/32
16010
22
Gi0/0/0/1
10.10.10.100/32 16006
Unlabelled None
192.168.102.0/24 16003
ImpNull
Gi0/0/0/1
192.168.101.0/24 16000
20
Gi0/0/0/1

Next Hop

GR Stale

------------------10.10.10.1
192.168.101.31
192.168.112.40
192.168.112.40
10.10.10.1
192.168.112.40
192.168.112.40

-N
N
N
N
N
N
N

----N
N
N
N
N
N
N

Displays content of the FIB (or Cisco Express Forwarding) table


RP/0/RSP0/CPU0:P1# show cef 192.168.101.0/24
<output omitted>
remote adjacency to GigabitEthernet0/0/0/1
Prefix Len 24, traffic index 0, precedence routine (0)
via 192.168.134.40, GigabitEthernet0/0/0/1, 4 dependencies, weight 0, class 0 [flags 0x0]
path-idx 0
next hop 192.168.134.40
remote adjacency
local label 16000
labels imposed {20}

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-24

MPLS Troubleshooting
show mpls ldp
discovery

Labels are
not
redistributed

Verify LDP
discovery

No
Check if MPLS is
enabled on
adjacent router

show mpls
ldp neighbor

Yes

Verify
established
LDP
session

Yes

Labels are
redistributed

No
Verify reachability
of loopback
interfaces between
adjacent routers

show mpls interface


show route
ping

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-25

Summary
MPLS is used in the core and edge network of the Cisco IP NGN.
MPLS enhances IP routing by implementing a switching mechanism
where packets are switched, based on labels.
For switching, MPLS uses a 32-bit label header that is inserted between
Layer 2 and Layer 3.
In an MPLS domain, there are two types of routers; label switch routers
(LSRs) and edge LSRs.
The data plane on an MPLS-enabled router consists of two forwarding
structures; FIB and LFIB.
Ingress edge LSR takes IP packet, performs FIB lookup and adds a
label to the IP packet.

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-26

Summary (Cont.)
LDP is a protocol that is used between MPLS-enabled routers to
exchange labels.
Before labels can be exchanged using LDP, routers must first establish
adjacencies.
Each MPLS router generates a locally significant label for each network
in the routing table.
After a label has been assigned locally, each router has to advertise a
label to neighbors.
The steady-state occurs when the routing protocol and LDP have
populated all of the tables.
Basic MPLS configuration is done using a single command per
interface.
You can use several show commands to troubleshoot MPLS.

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-27

2012 Cisco and/or its affiliates. All rights reserved.

SPNGN2 v1.013-28

Anda mungkin juga menyukai