MPLS Fundamentals (Slides)

Embed Size (px)

Citation preview

  • 8/13/2019 MPLS Fundamentals (Slides)

    1/59

    2009 Cisco Systems, Inc. All rights reserved. 1

    MPLS

  • 8/13/2019 MPLS Fundamentals (Slides)

    2/59

  • 8/13/2019 MPLS Fundamentals (Slides)

    3/59

    2009 Cisco Systems, Inc. All rights reserved. 3

    Agenda

    MPLS Concepts

    MPLS Label Distribution Protocol MPLS Forwarding

    MPLS Configuration

  • 8/13/2019 MPLS Fundamentals (Slides)

    4/59

    2009 Cisco Systems, Inc. All rights reserved. 4

    MPLS Concepts

  • 8/13/2019 MPLS Fundamentals (Slides)

    5/59

    2009 Cisco Systems, Inc. All rights reserved. 5

    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 other Layer 2 technologies such as ATM,

    FR, PPP, POS, Ethernet Other Layer 2 technologies can be run over an

    MPLS network

    MPLS is a technology for delivery of IP Services

  • 8/13/2019 MPLS Fundamentals (Slides)

    6/59

    2009 Cisco Systems, Inc. All rights reserved. 6

    MPLS Standard

    MPLS is the standardized version of Ciscos proprietary tagswitching

    MPLS and tag switching are identical except for the mechanismsused for label distribution

    Tag switching uses the proprietary Tag Distribution Protocol (TDP)

    MPLS uses the IETF standard Label Distribution Protocol (LDP)

    TDP and LDP are not compatible but can coexist

  • 8/13/2019 MPLS Fundamentals (Slides)

    7/59 2009 Cisco Systems, Inc. All rights reserved. 7

    Control Plane

    Every MPLS node must run an IGP

    Class flows into FEC(Forwarding Equivalent Class)Group of packets with the same forwarding treatment

    Each FEC corresponds to an IP destination prefix (default)

    Associate Labels to FEC (label bindings)Labels mapping is distributed via LDP(label distribution protocol)

    Data Planeforwarding of packets based on labels

    uses a label forwarding database LFIB

    CEF is the switching mecanism

    MPLS Switching structure

  • 8/13/2019 MPLS Fundamentals (Slides)

    8/59 2009 Cisco Systems, Inc. All rights reserved. 8

    Unit Components

    Edge Label Switching Routers

    label previously unlabeled packets- at the beginning of a Label Switched Path

    strip labels from labeled packets

    - at the end of a Label Switched Path

    Label Switching Routersforward labeled packets based on the information carried by labels - not IPaddresses

  • 8/13/2019 MPLS Fundamentals (Slides)

    9/59 2009 Cisco Systems, Inc. All rights reserved. 9

    Label Switching Devices

    Label Switching Routers

    Edge Label Switching

    Routers

  • 8/13/2019 MPLS Fundamentals (Slides)

    10/59 2009 Cisco Systems, Inc. All rights reserved. 10

    Forwarding Components

    Label Forwarding Information Base (LFIB)- each entry consists of incoming label, outgoing label, outgoinginterface, outgoing MAC address

    - LFIB requires CEF to be enabled globally within the router (ip cef

    global command)

    Forwarding algorithm:- extract label from a packet

    - find an entry in the LFIB with the incoming label equal to the label inthe packet

    - replace the label in the packet with the outgoing label (from thefound entry)

    - send the packet on the outgoing interface (from the found entry)

    Carrying label information:- as part of the MAC header

    - via a shim between the MAC and the Network Layer header

  • 8/13/2019 MPLS Fundamentals (Slides)

    11/59 2009 Cisco Systems, Inc. All rights reserved. 11

    MPLS: Forwarding

  • 8/13/2019 MPLS Fundamentals (Slides)

    12/59 2009 Cisco Systems, Inc. All rights reserved. 12

    MPLS: Forwarding

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    13/59 2009 Cisco Systems, Inc. All rights reserved. 13

    MPLS: Forwarding

    2a. Label Distribution Protocol (e.g.,

    LDP) establishes label to routes

    mappings

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    14/59 2009 Cisco Systems, Inc. All rights reserved. 14

    MPLS: Forwarding

    2a. Label Distribution Protocol (e.g.,

    LDP) establishes label to routes

    mappings

    2b. Label Distribution

    Protocol (e.g., LDP)

    creates LFIB entries on

    LSRs

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    15/59 2009 Cisco Systems, Inc. All rights reserved. 15

    MPLS: Forwarding

    2a. Label Distribution Protocol (e.g.,

    LDP) establishes label to routes

    mappings

    3.Ingress edge LSR receives

    packet, performs Layer 3 value-

    added services, and label

    packets

    2b. Label Distribution

    Protocol (e.g., LDP)

    creates LFIB entries on

    LSRs

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    16/59 2009 Cisco Systems, Inc. All rights reserved. 16

    MPLS: Forwarding

    2a. Label Distribution Protocol (e.g.,

    LDP) establishes label to routes

    mappings

    4.LSRs forward

    labelled packets

    using label swapping

    3.Ingress edge LSR receives

    packet, performs Layer 3 value-

    added services, and label

    packets

    2b. Label

    Distribut ion Protocol

    (e.g., LDP) creates LFIB

    entries on LSRs

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    17/59 2009 Cisco Systems, Inc. All rights reserved. 17

    MPLS: Forwarding

    5.Edge LSR at

    egress removes

    label and delivers

    packet

    2a. Label Distribution Protocol (e.g.,

    LDP) establishes label to routes

    mappings

    4.LSRs forward

    labelled packets

    using label swapping

    3.Ingress edge LSR receives

    packet, performs Layer 3 value-

    added services, and label

    packets

    2b. Label

    Distribut ion Protocol

    (e.g., LDP) creates LFIB

    entries on LSRs

    1. Existing rout ing protocols (e.g. OSPF, IGRP) establish

    routes.

  • 8/13/2019 MPLS Fundamentals (Slides)

    18/59 2009 Cisco Systems, Inc. All rights reserved. 18

    RIB/FIB/LIB/LFIB

    RIB is the Routing Information Base that is analogous to the iprouting table

    FIB aka CEF is Forwarding information base that is derived fromthe ip routing table

    LIB is Label Information Base that contains all the label bindingslearned via LDP

    LFIB is Label Forwarding Information Base that is derived from FIBentries and corresponding LIB entries

    Lets go through the pictorial view

  • 8/13/2019 MPLS Fundamentals (Slides)

    19/59 2009 Cisco Systems, Inc. All rights reserved. 19

    Control-plane to Data-plane

    Data plane in a node

    IP Routing Protocol

    IP Routing TableRouter

    IGPRouting information

    exchange withother routers

    IP FIB

    Incoming IP

    packetsOutgoing IP

    packets

  • 8/13/2019 MPLS Fundamentals (Slides)

    20/59 2009 Cisco Systems, Inc. All rights reserved. 20

    Control-plane to Data-planeMPLS / LSR

    Data plane in a node

    IP Routing Protocol

    IP Routing Table

    LSRLabel

    Switch

    Router

    Incoming labelled

    packets Outgoing labelledpacketsMPLS LFIB

    MPLS LIB

    IGPRouting information

    exchange withother routers

    (Link-staterecommended)

    Label Distribution

    ProtocolLabel binding

    exchange with otherrouters

  • 8/13/2019 MPLS Fundamentals (Slides)

    21/59 2009 Cisco Systems, Inc. All rights reserved. 21

    Control-plane to Data-planeMPLS / E-LSR

    Data plane in a node

    IP Routing Protocol

    IP Routing Table

    MPLS LIB

    MPLS LFIB

    E-LSR

    EdgeLabel

    Switch

    Router

    IGPRouting information

    exchange withother routers

    (Link-staterecommended)

    Label Distribution

    ProtocolLabel binding

    exchange with otherrouters

    Incoming labelledpackets

    Outgoing IP

    packets

    Outgoing labelledpackets

    Incoming IP

    packets IP FIB

  • 8/13/2019 MPLS Fundamentals (Slides)

    22/59 2009 Cisco Systems, Inc. All rights reserved. 22

    Summary of Packet-mode MPLS LabelAllocation and Distribution

    Label allocation and distribution in packet mode MPLS environment followsthese steps:

    IP routing protocols build the IP routing table.

    Each LSR assigns a label to every destination in the IP routing tableindependently.

    Labels are assigned once per LSR (per-platform).

    LSRs announce their assigned labels to all its neighbor LSRs.

    Every LSR builds its LIB, LFIB and FIB data structures based on receivedlabels.

    Every LSR stores all advertised labels in the LIB.

    Labels received from next-hop LSRs are used to populate label information inFIB and the outgoing label in LFIB.

  • 8/13/2019 MPLS Fundamentals (Slides)

    23/59 2009 Cisco Systems, Inc. All rights reserved. 23

    10.89

    172.69

    1

    01

    0

    You can reach 172.69

    through me

    You can reach 10.89 and

    172.69 through me

    Routing Updates

    (OSPF, EIGRP, )

    You can reach 10.89

    through me

    Address

    Prefix

    10.89

    172.69

    ...

    Out

    Iface

    0

    1

    ...

    Address

    Prefix

    10.89

    172.69

    ...

    Out

    Iface

    1

    1

    ...

    Address

    Prefix

    10.89

    ...

    Out

    Iface

    0

    ...

    MPLS switching :Routing Information

  • 8/13/2019 MPLS Fundamentals (Slides)

    24/59 2009 Cisco Systems, Inc. All rights reserved. 24

    1

    01

    0

    Use label 7 for 172.69

    Use label 4 for 10.89 and

    Use label 5 for 172.69

    Label DistributionProtocol

    Use label 9 for 10.89

    10.89

    172.69

    In

    Lbl

    Address

    Prefix

    10.89

    172.69

    ...

    Out

    Iface

    0

    1

    ...

    Out

    Lbl

    In

    Lbl

    Address

    Prefix

    10.89

    172.69

    ...

    Out

    Iface

    1

    1

    ...

    Out

    Lbl

    In

    Lbl

    Address

    Prefix

    10.89

    ...

    Out

    Iface

    0

    ...

    Out

    Lbl

    -

    -

    4

    5

    4

    5

    9

    7

    9 -

    MPLS switching:Assigning Labels

  • 8/13/2019 MPLS Fundamentals (Slides)

    25/59 2009 Cisco Systems, Inc. All rights reserved. 25

    10.89

    172.69

    1

    01

    Data10.89.25.4410.89.25.4 Data

    10.89.25.4 Data

    10.89.25.4 Data9

    0

    Label Switch Forwards

    Based on Label

    In

    Lbl

    Address

    Prefix

    10.89

    172.69

    ...

    Out

    Iface

    0

    1

    ...

    Out

    Lbl

    In

    Lbl

    Address

    Prefix

    172.69

    ...

    Out

    Iface

    1

    1

    ...

    Out

    Lbl

    In

    Lbl

    Address

    Prefix

    10.89

    ...

    Out

    Iface

    0

    ...

    -

    -

    4

    5 5 7

    -4 910.89

    Out

    Lbl

    9

    MPLS switching :Forwarding Packets

  • 8/13/2019 MPLS Fundamentals (Slides)

    26/59

    2009 Cisco Systems, Inc. All rights reserved. 26

    MPLS Forwarding Plane: Ethertype

    Ethertype 0x0800 refers to IP

    Ethertype 0x8847 refers to MPLS Based on the Ethertype, the packet is handed over to

    the appropriate processing engine in the router

  • 8/13/2019 MPLS Fundamentals (Slides)

    27/59

    2009 Cisco Systems, Inc. All rights reserved. 27

    What Is a Label

    A LABEL is 4 bytes identifier, which is carried by the packet andused to identify a prefix

    Label = Actual Label, = 20 bitsEXP/QoS = Experimental bits, = 3 bits

    S = End of Stack, = 1 bit

    TTL = Time to Live, = 8 bits

    0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

    Label EXP S TTL

  • 8/13/2019 MPLS Fundamentals (Slides)

    28/59

    2009 Cisco Systems, Inc. All rights reserved. 28

    Packet-over-SONET/SDH

    Ethernet: similar

    Frame Relay PVCs: similar

    Label over ATM PVCs

    PPP Header Label Layer 3 Header Data

    Ethernet Hdr Label Layer 3 Header Data

    Frame Rly Hdr Label Layer 3 Header Data

    ATM Header Label Layer 3 Header Data

    ATM Header Data(subsequent cells)

    Label Encapsulation

  • 8/13/2019 MPLS Fundamentals (Slides)

    29/59

    2009 Cisco Systems, Inc. All rights reserved. 29

    172.68.10/24

    Rtr-A

    Next-Hop

    In

    Lab

    5

    ...

    Address

    Prefix

    172.68.10

    ...

    Out

    I/F

    1

    ...

    Out

    Lab

    7

    ...

    In

    I/F

    0

    ...

    IP packetD=172.68.10.12

    Label = 5

    Label = 21

    IP packetD=172.68.10.12

    Label = 7

    Label = 21

    Rtr-A forwards the labelled packet based on the label at the top ofthe label stack

    The Label StackMPLS is recursive

  • 8/13/2019 MPLS Fundamentals (Slides)

    30/59

    2009 Cisco Systems, Inc. All rights reserved. 30

    London Brussels Paris

    192.26.15.1/32

    In Label FEC Out Label

    - 192.26.15.1/32 28

    In Label FEC Out Label

    28 192.26.15.1/32 POP

    In Label FEC Out Label

    - 192.26.15.1/32 -

    Use label 28 for destination

    192.26.15.1/32

    Use label implicit-null for

    destination 192.26.15.1/32

    Penultimate Hop Popping

    May be disabled using explicit-null option(Usefull to maintain end-to-end label for QoS classification)

  • 8/13/2019 MPLS Fundamentals (Slides)

    31/59

    2009 Cisco Systems, Inc. All rights reserved. 31

    Label DistributionProtocol

  • 8/13/2019 MPLS Fundamentals (Slides)

    32/59

    2009 Cisco Systems, Inc. All rights reserved. 32

    Cisco IOS implements two label binding protocols for destination-based unicastrouting

    TDP (Tag Distribution Protocol)proprietary protocol - TCP port 711

    LDP (Label Distribution Protocol)IETF standards based protocol - TCP port 646

    Both protocols are functionally equivalent and can be used concurrently

    Labels are exchanged between adjacent LSRs

    Applications may require non-adjacent neighbors

    - LDP/TDP Directed Peers-AToM

    Label Distribution Protocols

  • 8/13/2019 MPLS Fundamentals (Slides)

    33/59

    2009 Cisco Systems, Inc. All rights reserved. 33

    MPLS Control Plane: LDP vs. TDP

    LDP is quite similar to TDP

    LDP is standardized by IETF

    LDP has more features such as abort,MD5 authentication, notification,

    backoff logic, etc. TDP is the default on Cisco routers

    LDP is the default with this global config

    mpls label protocol ldp

  • 8/13/2019 MPLS Fundamentals (Slides)

    34/59

    2009 Cisco Systems, Inc. All rights reserved. 34

    MPLS Control Plane: LDP/TDP

    LDP/TDP operates in three steps

    Neighbor Discovery

    Session establishment

    Label Distribution/exchange

    Once labels are exchanged, LIB is built

    LIB and FIB together helps to build LFIB

  • 8/13/2019 MPLS Fundamentals (Slides)

    35/59

    2009 Cisco Systems, Inc. All rights reserved. 35

    MPLS Control Plane: TDP

    TDP Neighbors are discovered via TDP Hellos (likemost of the routing protocols)

    TDP Hellos are sent to 255.255.255.255

    TDP hellos are sent to UDP port = 711

    TDP hellos are sent only after mpls ip is configured onan interface

    PE1 PE2

    Tx Hello (PE1:0)

    Rx Hello (PE2:0)

  • 8/13/2019 MPLS Fundamentals (Slides)

    36/59

    2009 Cisco Systems, Inc. All rights reserved. 36

    MPLS Control Plane: LDP

    LDP Neighbors are discovered via LDP Hellos (likemost of the routing protocols)

    LDP Hellos are sent to 224.0.0.2

    LDP hellos are sent to UDP port = 646

    LDP hellos are sent only after both mpls ip and mplslabel protocol ldp are configured on an interface **

    LDP_ID should be hardcoded via mpls ldp router-ID

    ** If LDP is the global default, then interface-level LDP is not needed.

    PE1 PE2

    Tx Hello (PE1:0)

    Rx Hello (PE2:0)

  • 8/13/2019 MPLS Fundamentals (Slides)

    37/59

    2009 Cisco Systems, Inc. All rights reserved. 37

    MPLS Control Plane: LDP (1)

    Use the same Loopback0 as the router-ID for LDP,IGP, BGP, etc.

    Assign an IP address to the Loopback0 from theseparate IP address subnet (or space)

    Avoid the IGP summarization of prefixes thatcorrespond to the router-ids

  • 8/13/2019 MPLS Fundamentals (Slides)

    38/59

    2009 Cisco Systems, Inc. All rights reserved. 38

    MPLS Control Plane: LDP (1)

    sh mpls ldp discovery [detail]

    Must show xmit/recv on LDP enabled interface

    PE1#sh mpls ldp discovery

    Local LDP Identifier:

    10.13.1.61:0

    Discovery Sources:

    Interfaces:Ethernet0/0 (ldp): xmit/recv

    LDP Id: 10.13.1.101:0

    Ethernet1/0 (ldp): xmit/recv

    LDP Id: 10.13.1.101:0

    PE1#

    debug mpls ldp transport connections

    Should give information regarding whether the HELLOS are

    advertised/received

    Local LDP_ID

    Discovered Neighbors

    LDP_ID

    Xmited and Recvd Hellos

    on that interface

    Eth0/0 is

    configured

    with LDP

  • 8/13/2019 MPLS Fundamentals (Slides)

    39/59

    2009 Cisco Systems, Inc. All rights reserved. 39

    MPLS Control Plane: LDP (2)

    LDP session is a TCP session (port = 646)

    Multiple links between two routers still mean single LDP session

    PE1#sh mpls ldp neighbor

    Peer LDP Ident: 10.13.1.101:0; Local LDP Ident 10.13.1.61:0

    TCP connection: 10.13.1.101.11031 - 10.13.1.61.646

    State: Oper; Msgs sent/rcvd: 58/60; DownstreamUp time: 00:39:27

    LDP discovery sources:

    Ethernet0/0, Src IP addr: 10.13.1.5

    Ethernet1/0, Src IP addr: 10.13.1.9

    Addresses bound to peer LDP Ident:

    10.13.1.9 10.13.1.5 10.13.2.5 10.13.1.101

    PE1#

    LDP_ID

    Unsolicited Label

    Distribution*

    Interfaces on Which

    Peer Is Discovered

    PeersConnected Int

    PE1#sh tcp brief| i 646

    43ABB020 10.13.1.101.11031 10.13.1.61.646 ESTAB

    PE1#

    * Unsolicited downstream label Distribution mode is the default in Frame-mode MPLS. In cell-mode MPLS,distribution on demand (DoD) is the default distribution mode. They are not configurable.

  • 8/13/2019 MPLS Fundamentals (Slides)

    40/59

    2009 Cisco Systems, Inc. All rights reserved. 40

    MPLS Control Plane: LDP (3)

    LIB entry can be verified with the following

    PE1#sh mpls ip bindings 10.13.1.62 32

    10.13.1.62/32

    in label: 20

    out label: 2001 lsr: 10.13.1.101:0

    PE1#

    PE1 P110.13.1.61/32 10.13.1.101/32

    E0/0E0/1 10.13.1.62/32

    Ok. I hear you 10.13.1.101:0.

    I have the binding from you in

    my LIB now

    This is 10.13.1.101:0.

    Use label 2001 to reach 10.13.1.62/32

    PE1#sh mpls forwarding 10.13.1.62

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id switched interface

    20 2001 10.13.1.62/32 0 Et0/0 10.13.1.52001 10.13.1.62/32 0 Et1/0 10.13.1.9

    PE1#

    But whether I use

    your binding or notwill be dictated by

    RIB entry

    Oh ok. Per RIB,

    10.13.1.101 is the

    next-hop for

    10.13.1.62/32.

    I have to uselabel 2001 in

    LFIB.

    Local binding

    Remote binding

  • 8/13/2019 MPLS Fundamentals (Slides)

    41/59

  • 8/13/2019 MPLS Fundamentals (Slides)

    42/59

    2009 Cisco Systems, Inc. All rights reserved. 42

    MPLS Control Plane: LDP (5)

    sh mpls ip binding detail

    Lists all prefixes with labels and LDP neighbors

    sh mpls ip binding det

    Lists ACLs (if any), prefix bindings, and LDP neighbors NoticeAdvertised to: field

    sh mpls ip binding advertisement-acls

    Lists LDP filter, if there is any, on the first line. Prefixes followedby Advert acl(s): are advertised via LDP, others are not

  • 8/13/2019 MPLS Fundamentals (Slides)

    43/59

    2009 Cisco Systems, Inc. All rights reserved. 43

    MPLS Forwarding

    MPLS F di Pl O t i

  • 8/13/2019 MPLS Fundamentals (Slides)

    44/59

    2009 Cisco Systems, Inc. All rights reserved. 44

    RSP-PE-SOUTH-5#sh mpls forwarding 10.13.1.11

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id switched interface

    59 46 10.13.1.11/32 0 Se10/0/0 point2point

    RSP-PE-SOUTH-5#

    MPLS Forwarding Plane: OutgoingLabels

    Outgoing label also conveys what treatment the packet is going to

    get; it could also bePop Pops the topmost label

    Untagged Untag the incoming MPLS packet

    Aggregate Untag and then do a FIB lookup

    0 Nullify the top label (first 20bits)

    Label values 0-15 are reserved

    MPLS Forwarding Plane: Outgoing

  • 8/13/2019 MPLS Fundamentals (Slides)

    45/59

    2009 Cisco Systems, Inc. All rights reserved. 45

    MPLS Forwarding Plane: OutgoingLabels

    Untagged

    Convert the incoming MPLS packet to an IP packet and forward it

    PopPop the top label from the label stack present in an incoming MPLS packetand forward it as an MPLS packet.; if there was only one label in the stack,then forward it as an IP packet; SAME as imp-null label

    Aggregate

    Convert the incoming MPLS packet to an IP packet and then do a FIBlookup for it to find out the outgoing interface

    0 (zero)

    Same as exp-null label; simplify fills 0 in the first 20 bits of label; helps to

    preserve the EXP value of the top label

  • 8/13/2019 MPLS Fundamentals (Slides)

    46/59

    2009 Cisco Systems, Inc. All rights reserved. 46

    MPLS Forwarding Plane: Outgoing Labels

    PE1#sh mpls forwarding-table

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id switched interface

    16 2002 10.13.1.22/32 0 Et0/0 10.13.1.5

    2002 10.13.1.22/32 0 Et1/0 10.13.1.917 2001 10.13.1.62/32 0 Et0/0 10.13.1.5

    2001 10.13.1.62/32 0 Et1/0 10.13.1.9

    18 Pop tag 10.13.1.101/32 0 Et1/0 10.13.1.9

    Pop tag 10.13.1.101/32 0 Et0/0 10.13.1.5

    19 Pop tag 10.13.2.4/30 0 Et1/0 10.13.1.9

    Pop tag 10.13.2.4/30 0 Et0/0 10.13.1.520 Untagged 5.5.5.5/32[V] 0 Se2/0 point2point

    21 Pop tag 10.13.21.4/30 0 Et1/0 10.13.1.9

    Pop tag 10.13.21.4/30 0 Et0/0 10.13.1.5

    22 Pop tag 10.13.22.4/30 0 Et1/0 10.13.1.9

    Pop tag 10.13.22.4/30 0 Et0/0 10.13.1.5

    23 Aggregate 0.0.0.0/0[V] 0

    24 Aggregate 200.1.61.4/30[V] 0

    26 Untagged 30.30.30.1/32[V] 0 Se2/0 point2point

    PE1#

    V Means It Is a VPN Prefix

    Connected

    VPN Prefix

    No Outgoing Interface for theAggregate Entries; an

    Addit ional FIB Lookup Is Done

  • 8/13/2019 MPLS Fundamentals (Slides)

    47/59

    2009 Cisco Systems, Inc. All rights reserved. 47

    MPLS Forwarding Plane

    Three cases in the MPLS forwarding

    1. Label ImpositionIP to MPLS conversion

    2. Label swappingMPLS to MPLS

    3. Label dispositionMPLS to IP conversion

    So, depending upon the case, we need to check1. FIB For IP packets that get forwarded as MPLS

    2. LFIB For MPLS packets that get fwded as MPLS

    3. LFIB For MPLS packets that get fwded as IP

  • 8/13/2019 MPLS Fundamentals (Slides)

    48/59

    2009 Cisco Systems, Inc. All rights reserved. 48

    MPLS Forwarding Plane

    PE1 does a FIB lookup forthe incoming IP packet

    It imposes the label

    For troubleshooting, look atthe FIB (not LFIB)

    PE1PE2

    P1 1.1.1.0/30

    Case 1: IP Packets Get Forwarded as MPLS

    PE1#sh ip cef 1.1.1.0

    1.1.1.0/30, version 25, epoch 0, cached adjacency 10.13.1.5

    0 packets, 0 bytes

    tag information set

    local tag: 20

    fast tag rewrite with Et0/0, 10.13.1.5, tags imposed: {2001}

    via 10.13.1.5, Ethernet0/0, 0 dependencies

    next hop 10.13.1.5, Ethernet0/0

    valid cached adjacencytag rewrite with Et0/0, 10.13.1.5, tags imposed: {2001}

    PE1#

    IP Packet

    IP Packet2001

  • 8/13/2019 MPLS Fundamentals (Slides)

    49/59

    2009 Cisco Systems, Inc. All rights reserved. 49

    MPLS Forwarding Plane

    P1 does the LFIB lookup forincoming MPLS packets

    P1 could swap (or dispose)

    the label For troubleshooting, look at

    the LFIB (not FIB)

    PE1

    Case 2: MPLS Packets Get Forwarded as MPLS

    P1#sh mpls for 10.13.1.62Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id swi tched interface

    2002 Pop tag 10.13.1.62/32 0 Se2/0 point2point

    P1#

    P1#sh mpls for 1.1.1.0

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id swi tched interface

    2001 20 1.1.1.1.0/30 0 Se2/0 point2point

    P1#

    IP Packet2001

    PE2

    P1 1.1.1.0/30

    IP Packet20

  • 8/13/2019 MPLS Fundamentals (Slides)

    50/59

    2009 Cisco Systems, Inc. All rights reserved. 50

    MPLS Forwarding Plane

    Typically happen at theedge

    Could also happen at the

    PHP router

    For troubleshooting, look atthe LFIB (not FIB)

    PE1

    Case 3: MPLS Packets Get Forwarded as IP

    PE2#sh mpls for 1.1.1.0

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id switched interface

    20 Untagged 1.1.1.1.0/30 0 Se2/0 point2point

    PE2#

    PE2

    P1 1.1.1.0/30

    IP Packet20 IP Packet

  • 8/13/2019 MPLS Fundamentals (Slides)

    51/59

    2009 Cisco Systems, Inc. All rights reserved. 51

    MPLS Fwd Plane: Fragmentation

    After the Layer 2 header is added to the IP packet, theresulting packet size shouldnt exceed the max packet

    size (MTU size) applicable; otherwise, packet will befragmented

    MTU size needs to be tuned to avoid fragmentation in

    MPLS network MTU could be increased only for MPLS packets =>

    MPLS MTU

    Fragmentation

  • 8/13/2019 MPLS Fundamentals (Slides)

    52/59

    2009 Cisco Systems, Inc. All rights reserved. 52

    FragmentationMTU Setting in MPLS

    If the label imposition makes the packet bigger than the MPLSMTU size of an outgoing interface, then

    If the DF bit set, then discard the packet and send ICMP reply back(with code=4)

    If the DF bit is not set, then fragment the IP packet (say, into 2packets), and then impose the same label(s) on both the packets, andthen transmit MPLS packets

    Fragmentation should be done at the edge itself

  • 8/13/2019 MPLS Fundamentals (Slides)

    53/59

    2009 Cisco Systems, Inc. All rights reserved. 53

    MPLS Fwd Plane: Show Commands

    sh mpls forwarding

    Shows all LFIB entries (vpn, non-vpn, TE, etc.)

    sh mpls forwarding

    LFIB lookup based on a prefix

    sh mpls forwarding label LFIB lookup based on an incoming label

    sh mpls forwarding detail

    Shows detailed info such as L2 encap, etc.

  • 8/13/2019 MPLS Fundamentals (Slides)

    54/59

    2009 Cisco Systems, Inc. All rights reserved. 54

    RSP-PE-WEST-4#sh mpls for 10.13.1.11 detail

    Local Outgoing Prefix Bytes tag Outgoing Next Hop

    tag tag or VC or Tunnel Id switched interface

    45 51 10.13.1.11/32 0 Fa1/1/1 10.13.7.33

    MAC/Encaps=14/18, MRU=1500, Tag Stack{51}0003FD1C828100044E7548298847 00033000

    No output feature configured

    Per-packet load-sharing

    RSP-PE-WEST-4#

    MPLS Fwd Plane: Show Command

    Detail Is Optional

    MAC header =0003FD1C828100044E754829

    MPLS Ethtype= 0x8847

    Label = 0x00033000=3x16+3=51

    14/18 means that the L2 header is of 14 bytes, butL2+label header is 18 bytes (one label is 4 bytes)

    MRU Max Receivable Unit. The

    received packet wil l be transmitted

    unfragmented on Fa1/1/1, if its size

    is not more than 1500B.

    Only One Outgoing

    Label in the Label

    Stack

  • 8/13/2019 MPLS Fundamentals (Slides)

    55/59

    2009 Cisco Systems, Inc. All rights reserved. 55

    MPLS Fwd Plane: Debugs

    Debug mpls lfib cefUseful for seeing FIB and LFIB interaction when a label ismissing for a prefix

    debug mpls lfib structShows changes in the LFIB structures when label isallocated/deallocated

    Be Careful on the Production Routers

  • 8/13/2019 MPLS Fundamentals (Slides)

    56/59

    2009 Cisco Systems, Inc. All rights reserved. 56

    MPLS Configuration

  • 8/13/2019 MPLS Fundamentals (Slides)

    57/59

    2009 Cisco Systems, Inc. All rights reserved. 57

    Configuration Example

    Ip cef need to be enabled

    If cef is not enabled by default:

    r out er # conf tEnt er conf i gur at i on commands,one per l i ne. End wi t h CNTL/ Z.r out er ( conf i g) #i p cef

  • 8/13/2019 MPLS Fundamentals (Slides)

    58/59

    2009 Cisco Systems, Inc. All rights reserved. 58

    Configuration Example

    mpl s i p

    mpl s l abel pr ot ocol l dpmpl s l dp nei ghbor 10. 0. 0. 3 passwor d no mpl s l dp adver t i se- t agsmpl s l dp adver t i se- t ags f or 1

    mpl s l dp r out er - i d Loopback0

    i nt er f ace Gi gabi t Et her net 2/ 1i p addr ess 10. 0. 1. 38 255. 255. 255. 252mpl s mt u 1512

    mpl s i p

    access- l i st 1 per mi t 10. 0. 0. 0 0. 0. 0. 255

  • 8/13/2019 MPLS Fundamentals (Slides)

    59/59