spngn2101s03l05 mpls

28
© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-1 MPLS Basics Internal Service Provider Traffic Forwarding

Upload: jtafurp

Post on 23-Dec-2015

12 views

Category:

Documents


1 download

DESCRIPTION

Material MPLS

TRANSCRIPT

Page 1: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-1

MPLS Basics

Internal Service Provider Traffic Forwarding

Page 2: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-2

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

Page 3: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-3

Cisco IP NGN Infrastructure Layer• MPLS is placed in the core and edge networks.

IP Infrastructure Layer

AccessAggregation

IP EdgeCore

Residential

Mobile Users

Business

Access Aggregation IP Edge Core

Page 4: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-4

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.

MPLS/IP

IP L L IP

IP

A B C

IP

D

IP IP

Page 5: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-5

MPLS Applications

MPLS for service providers• In the past—faster forwarding

• Today—a 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

Page 6: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-6

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 22 23 24 31

Label EXP S TTL

L2 Header MPLS Label IP Packet

Page 7: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-7

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

MPLS and IP

10.0.0.1 25 34 10.0.0.1

IP

A B C

10.0.0.1

D

LSR Edge LSREdge LSR LSR

20.0.0.1 35 32 20.0.0.120.0.0.1

Page 8: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-8

MPLS Forwarding Structures• FIB is used to forward unlabeled IP packets or to label packets if a next-

hop label is available.

• LFIB is used to forward labeled packets. A received label is swapped by a next-hop label.

MPLS and IP

10.0.0.1 25 34 10.0.0.1

IP

A B C

10.0.0.1

D

LSR Edge LSREdge LSR LSR

20.0.0.1 35 32 20.0.0.120.0.0.1

FIB

10.0.0.0/24 B 25

20.0.0.0/24 Conn

LFIB

25 34 C

35 POP A

LFIB

34 POP D

32 35 B

FIB

20.0.0.0/24 C 32

10.0.0.0/24 Conn

Page 9: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-9

MPLS and IP

10.0.0.1 25

IP

A B C D

LSR Edge LSREdge LSR LSR

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 Example

FIB

10.0.0.0/24 B 25

20.0.0.0/24 Conn

LFIB

25 34 C

35 POP A

LFIB

34 POP D

32 35 B

FIB

20.0.0.0/24 C 32

10.0.0.0/24 Conn

Page 10: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-10

34

MPLS and IP

10.0.0.1 25

IP

A B C D

LSR Edge LSREdge LSR LSR

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

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

MPLS Example (Cont.)

FIB

10.0.0.0/24 B 25

20.0.0.0/24 Conn

LFIB

25 34 C

35 POP A

LFIB

34 POP D

32 35 B

FIB

20.0.0.0/24 C 32

10.0.0.0/24 Conn

Page 11: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-11

34

MPLS/IP

10.0.0.1 25

IP

A B C D

LSR Edge LSREdge LSR LSR

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

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

10.0.0.1

MPLS Example (Cont.)

FIB

10.0.0.0/24 B 25

20.0.0.0/24 Conn

LFIB

25 34 C

35 POP A

LFIB

34 POP D

32 35 B

FIB

20.0.0.0/24 C 32

10.0.0.0/24 Conn

Page 12: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-12

34

MPLS/IP

10.0.0.1 25

IP

A B C D

LSR Edge LSREdge LSR LSR

10.0.0.1

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

8. The IP packet is sent out of an interface

10.0.0.1

MPLS Example (Cont.)

FIB

10.0.0.0/24 B 25

20.0.0.0/24 Conn

LFIB

25 34 C

35 POP A

LFIB

34 POP D

32 35 B

FIB

20.0.0.0/24 C 32

10.0.0.0/24 Conn

LFIB

35 No label

Page 13: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-13

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.

Page 14: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-14

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.

UDP: Hello

TCP: Labels

MPLS and IP

Page 15: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-15

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.

MPLS and IPIP

A B C D

LSR Edge LSREdge LSR LSR

Network X

Label for X is 25Label for X is 21 Label for X is 34 Label for X is pop

Page 16: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-16

X = 25X = 25

MPLS/IPIP

A B C D

LSR Edge LSREdge LSR LSR

Network X

Label Advertisement• A router that receives a label from a next hop also stores the label

in the FIB.

FIB (B)

X C

LIB (A)

Network LSR Label

X Local 21

X B 25

LFIB (A)

In Out Next hop

21 25 B

FIB (A)

X B 25

LIB (B)

Network LSR Label

X Local 25

LFIB (B)

In Out Next hop

25 untag C

1. Router B allocates, stores, and advertises the label.

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

Page 17: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-17

MPLS/IPIP

A B C D

LSR Edge LSREdge LSR LSR

Network XX = 34 X = 34

Label Advertisement (Cont.)• A router stores a label from a neighbor even if the neighbor is not a next

hop for a destination.

FIB (C)

X D

LIB (C)

Network LSR Label

X Local 34

X B 25

LFIB (C)

In Out Next hop

34 untag D

FIB (B)

X C 34

LIB (B)

Network LSR Label

X Local 25

X C 34

LFIB (B)

In Out Next hop

25 34 C

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

4. Router B receives a label from router C and stores it.

Page 18: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-18

MPLS/IPIP

A B C D

LSR Edge LSREdge LSR LSR

Network XX = POP

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.

FIB (C)

X D

LIB (C)

Network LSR Label

X Local 34

X B 25

X D POP

LFIB (C)

In Out Next hop

34 POP D

FIB (D)

X Conn

LIB (D)

Network LSR Label

X Local POP

LFIB (D)

In Out Next hop

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

5. Router D advertises a pop label for network X.

Page 19: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-19

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.

Page 20: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-20

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.

Page 21: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-21

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

MPLS and IPIP

PE1 P1 P2 PE2

192.168.101.0/24GE0/0/0/0GE0/0/0/0

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

Page 22: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-22

Configuration

MPLS and IPIP

PE1 P1 P2 PE2

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

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

Enter the MPLS LDP configuration mode

List the interfaces that should be enabled for MPLS

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

interface GigabitEthernet0/0 mpls ip

Enable MPLS under the interface configuration mode

192.168.101.0/24

Page 23: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-23

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…>

Verification• Verifies LDP neighbors

• Displays content of the LIB table

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

Page 24: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-24

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}

RP/0/RSP0/CPU0:P1# show mpls ldp forwarding Prefix Label Label Outgoing Next Hop GR Stale In Out Interface ---------------- ------- ---------- ------------ ------------------- -- -----10.0.0.0/8 16005 Unlabelled None 10.10.10.1 N N10.1.10.0/24 16011 ImpNull Gi0/0/0/0 192.168.101.31 N N10.2.1.1/32 16008 ImpNull Gi0/0/0/1 192.168.112.40 N N10.2.10.1/32 16010 22 Gi0/0/0/1 192.168.112.40 N N10.10.10.100/32 16006 Unlabelled None 10.10.10.1 N N192.168.102.0/24 16003 ImpNull Gi0/0/0/1 192.168.112.40 N N192.168.101.0/24 16000 20 Gi0/0/0/1 192.168.112.40 N N

Verification (Cont.)• Displays content of the LFIB table

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

Page 25: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-25

MPLS Troubleshooting

Verify LDP discovery

Verify established

LDP session

Labels are not

redistributed

Labels are redistributed

Yes

Check if MPLS is enabled on

adjacent router

Verify reachability of loopback

interfaces between adjacent routers

No

Yes

No

show mpls ldp discovery

show mpls ldp neighbor

show mpls interface

show routeping

Page 26: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-26

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.

Page 27: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-27

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.

Page 28: SPNGN2101S03L05 MPLS

© 2012 Cisco and/or its affiliates. All rights reserved. SPNGN2 v1.01—3-28