Oda000015 Mpls Basic Knowledge Issue2.0

download Oda000015 Mpls Basic Knowledge Issue2.0

of 43

Transcript of Oda000015 Mpls Basic Knowledge Issue2.0

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    1/43

    ISSUE

    Fixed Network Curriculum

    Development Section

    ODA000015 MPLS BasicKnowledge

    2.0

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    2/43

    2Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Course Contents

    Chapter 1 MPLS Overview

    Chapter 2 Label and Label Stack

    Chapter 3 Label Forwarding and Allocation

    Chapter 4 LDP and Configuration

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    3/43

    3Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    MPLS

    MPLSMulti-Protocol Label Switching

    Multi-Protocol

    Support multiple Layer-3 protocols, such as IP, IPv6, IPX, SNA

    Label Switching Label packets, and replace IP forwarding with label switching

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    4/43

    4Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Origin: To Integrate IP with ATM

    Connectionlesscontrol plane

    Connectionlessforwarding plane

    IP

    Connection-orientedcontrol plane

    Connection-orientedforwarding plane

    ATM

    Connectionlesscontrol plane

    Connection-orientedforwarding plane

    MPLS

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    5/43

    5Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Connectionless: packet route

    Path 1 = S1, S2, S6, S8 Path 2 = S1, S4, S7, S8

    The data reach their destinationout of order along different paths

    connection-oriented: cell switching

    VC = S1, S4, S7, S8

    The data reach their destination inorder along the same connection

    Fixed time delay, easy to control

    Connection types: PVC SVC

    S2 S6

    S4 S7

    S3 S5

    S1 S8

    1

    1

    1

    2 2

    2

    S2 S6

    S4 S7

    VC

    S1 S8S3 S5

    Connection-oriented Features

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    6/43

    6Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Traditional IP Forwarding

    Parse IP headermapped to next hop

    Parse IP headermapped to next hop

    Parse IP headermapped to next hop

    IP header is parse at each hop, resulting in low efficiency.

    It is hard to deploy QoS and the efficiency is rather low.

    All routers are expected to know all routes in the entire

    network.

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    7/43

    7Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Virtual Channel Connection

    (VCC)

    Virtual Path Connection(VPC)

    VPswitching

    VCswitching

    VCswitching

    NNI NNI

    VPI = 2VCI = 44

    VPI = 1VCI = 1

    VPI = 26VCI = 44

    VPI = 20VCI = 30

    UNIUNI

    ATM Switching Process

    Connection-oriented, N2 problem

    Routing depending on link layer, based on VPI/VCI or label

    Ensure QoS and real-time service

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    8/43

    8Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    + XR = X

    Router ATM switch MPLSRouter

    MPLSmulti-protocol label switching

    Layer 3 routing scalable and flexible

    Layer 2 switching High reliability and traffic engineering

    management

    Technology Combining the Advantages of ATM and

    IP

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    9/43

    9Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Core LSR

    Basic Working Process of MPLS

    IP IP L1 IP L2 IP L3 IP

    Traditional IPforwarding

    TraditionalIP forwarding Label forwarding

    Edge LSR Edge LSR

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    10/43

    10Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Basic MPLS Concepts

    LSR: Label Switch Router

    LER: Label Edge Router

    LSP: Label Switch Path

    LER

    LER

    LER

    LER

    LSR LSR

    LSR

    MPLS domain

    IP

    MPLS

    LSP

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    11/43

    11Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    MPLS Advantages

    Replace IP header with short and fixed-length labels as

    forwarding basis to improve forwarding speed

    Better integrate IP with ATM better

    Provide value-added service without prejudice to efficiency:

    VPN

    Traffic engineering

    QOS

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    12/43

    12Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Course Contents

    Chapter 1 MPLS Overview

    Chapter 2 Label and Label Stack

    Chapter 3 Label Forwarding and Allocation

    Chapter 4 LDP and Configuration

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    13/43

    13Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    MPLS Encapsulation Format and Label

    MPLS headerLayer 2header IP header Data

    Label SEXP TTL

    200 23 24 31

    32 bits

    Two types of MPLS encapsulation for ATM and FR:

    shim encapsulation: similar to other link layers Cell mode: VC (VPI/VCI for ATM, DLCI for FR) is directly

    used as the label

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    14/43

    14Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Position in Packet

    Ethernet header/PPP header Label Layer-3 data

    Ethernet/SONET/SDH packet

    ATM header Label Layer-3 dataFrame modeATM packet

    Cell modeATM packet VPI/VCI Layer-3 data

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    15/43

    15Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    MPLS TTL Processing

    Regard the entire MPLS domain as one hop

    IP TTL --MPLS TTL255 MPLS TTL -- IP TTL --

    Ingress LER LSR Egress LER

    Include MPLS TTL in IP TTL

    IP TTL --MPLS TTLIP TTL MPLS TTL --

    MPLS TTL --IP TTLMPLS TTL

    Ingress LER LSR Egress LER

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    16/43

    16

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Stack

    Theoretically, label stack enables limitless nesting toprovide infinite service support. This is simply thegreatest advantage of MPLS technology.

    MPLSheader

    Layer2header IP header Data

    MPLSheader

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    17/43

    17

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Course Contents

    Chapter 1 MPLS Overview

    Chapter 2 Label and Label Stack

    Chapter 3 Label Forwarding and Allocation

    Chapter 4 LDP and Configuration

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    18/43

    18

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Basic Concepts of Label Forwarding

    FEC (Forwarding Equivalence Class): Import the packets

    with identical characteristics into the same LSP

    NHLFE (Next Hop Label Forwarding Entry): Describe label

    operations

    next hop

    label operation types: push/pop/swap/null

    Link layer encapsulation types

    FTN (FEC to NHLFE): Map FEC to NHLFE

    ILM (Incoming Label Map): Map MPLS label to NHLFE

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    19/43

    19

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Forwarding

    Parse IP headerFEC bound with LSPFTN->NHLFE

    ILM->NHLFE

    ILM->NHLFEParse IP headerdistribute FECmapped to next hopILM->NHLFE

    Ingress LER LSR LSR Egress LER

    Label operation: push

    Label operation: swapLabel operation: swap

    label operation: pop

    The traditional routing protocol and Label Distribution Protocol (LDP) serve to create routing table and label

    mapping table (FEC-Label mapping) in each LSR for FECs with service requirement, i.e. create LSPsuccessfully.

    Ingress LER receives a packet, determines the FEC that the packet belongs to, and label the packet

    In MPLS domain, packets are forwarded in accordance with labels and label forwarding table via the

    forwarding unit

    Egress LER removes the label and continues forwarding the packet

    A B C D

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    20/43

    20

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    NHLFE

    A:

    Add label L1E1B10.0.1.0/24

    OthersLabel operationTransmitting interfacenext hop

    NHLFEFEC

    Remove the previous label and add L2E1CL1

    Otherslabel operationTransmitting

    interfaceNext hop

    NHLFEIngresslabel

    B,C:

    Remove labelDL2

    OthersLabel operationTransmittinginterface

    Next hop

    NHLFEIngresslabel

    D:

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    21/43

    21

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Pop at Last Hop But One (PHP)

    Parse IP headerDistribute FECMapped to next hop

    Label operation: popParse IP headerFEC bound with LSPFTN->NHLFE ILM->NHLFE ILM->NHLFE

    Ingress LER LSR LSR Egress LER

    Label operation: pushLabel operation: swap

    The label at the outmost layer does not make any sense to the last hop. Thus, it

    is advisable to pop the label at the last hop but one to ease the burden of the

    last hop.

    If there is only one layer of label, the last hop will perform IP forwarding directly;

    otherwise, it will perform the internal label forwarding.

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    22/43

    22

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Creating LSP

    LSP drive modes:

    Driven by stream: incoming packets drive LSP creation

    Driven by topology: topology information (route) drives LSP

    creation

    Driven by application: application (like QoS) drives LSP creation

    Signaling protocol is used to distribute labels between LSRs

    and establish LSP:

    LDP: Label Distribution Protocol

    CR-LDP: Constrained Route LDP

    RSVP-TE

    MP-BGP

    PIM

    S l I C i

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    23/43

    23

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Several Issues ConcerningLabel Distribution

    Label allocation mode

    DoD : downstream-on-demand

    DU: downstream unsolicited

    Label control mode

    Ordered

    Independent

    Label hold mode

    Conservative retention mode : upon receiving a label, if there is

    no route destined for the corresponding FEC, hold the label for

    later use

    Liberal mode: upon receiving a label, if there is no route

    destined for corresponding FEC, discard the label

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    24/43

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    25/43

    25

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Allocation Mode: DU

    UpstreamDownstream

    Routetriggering

    Once the LDP session is set up successfully, the downstream

    LSR will initiatively advertise the label mapping message to its

    upstream LSR.The upstream router will save the label in the label mapping table.

    171.68.10/24

    20Label 20 can be usedto reach 171.68.10/24

    171.68.10/24171.68.40/24

    171.68.10/24

    18

    Label 18 can be usedto reach 171.68.10/24

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    26/43

    26

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Control Mode: Ordered

    Upstream Downstream

    Not until it receives a label mapping message from its

    downstream LSP will it send the message upstream

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    27/43

    27

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Control Mode: Independent

    UpstreamDownstream

    Whether it receives a label mapping message from its downstreamLSR, it will send upstream a label mapping message immediately.

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    28/43

    28

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Retention: Conservative Retention Mode

    LSR1 LSR2 LSR3 LSR4

    LSR5

    172.16.2/24

    mapping

    label 20mapping

    label 30

    mapping

    label 17

    mapping

    label 16

    Drop

    An LSR stores only the labels received from next-hop

    LSRs; all other labels are ignored.

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    29/43

    29

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Retention: Liberal Retention Mode

    LSR1 LSR2 LSR3 LSR4

    LSR5

    172.16.2/24

    mapping

    label 20mapping

    label 30

    mapping

    label 17

    mapping

    label 16

    store

    Every LSR stores the received label in its LIB, even when the

    label is not received from a next-hop LSR.

    Common Collocation 1

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    30/43

    30

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Common Collocation 1:DoD + Ordered + Liberal

    Upstream Downstream

    It is relatively easy to control the use of labels and the

    creation of LSPs

    ATM/FR frame mode can only use DoD

    Common Collocation 2:

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    31/43

    31

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Common Collocation 2:DU + Ordered + Conservative

    Upstream Downstream

    A waste of label resources

    Useless LSPs would be created

    Label merge is required at branches

    LSPs can be set up quickly and reliably

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    32/43

    32

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Label Forwarding Table

    IN interface IN label Prefix/MASK OUT interface (next hop) OUT label

    Serial0 50 10.1.1.0/24 Eth03.3.3.3 80

    Serial1 51 10.1.1.0/24 Eth03.3.3.3 80

    Serial1 62 70.1.2.0/24 Eth03.3.3.3 52

    Serial1 52 20.1.2.0/24 Eth14.4.4.4 52

    Serial2 77 30.1.2.0/24 Serial35.5.5.5) 3pop

    The in and out is correspond to the label swap not

    the label distribution.

    The in label is that I distribute to the others, I will not put it

    to the packet

    The out label is the others distribute to me, I will put it to

    the packet

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    33/43

    33

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    LSP Loop Detection

    Path looping shall be avoided even in setting up

    LSP within the MPLS domain.

    LSP path looping can be avoided in two ways:

    Maximum hop number;

    Path vector

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    34/43

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    35/43

    35

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Basic Concepts of LDP

    LDP is a MPLS control and signaling protocol

    Main functions:

    Release Label-FEC mapping

    Create and maintain label switching path

    LDP serves to distribute and maintain label mapping

    messages between peers in the form of message.

    LDP uses the TCP transmission service.

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    36/43

    36

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    LDP Message Types

    Discovery message: Used to discover LDP adjacencies

    in the network

    Session message: Used to set up, maintain and

    terminate a session between LDP peers

    Distribution message: Used to create, change and

    delete label mappings related to FEC

    Notification message: Used to provide recommendation

    or error notification information

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    37/43

    37

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    LDP Message Switching

    UDP-Hello

    UDP-Hello

    TCP connection establishment

    Label requestFEC

    Label mapping

    Label

    Session initialization

    Discovery stage

    Session creationand maintenance

    LSP creation andmaintenance

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    38/43

    38

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Basic MPLS Configurations (1)

    Designate ID for LSRIt is necessary to configure the LSR with an ID before configuring

    other MPLS commands. The ID is generally in the format of IP

    address, and shall be unique within the domain.

    mpls lsr-id X.X.X.XNote: make configurations in the system view.

    Activate/deactivate the LDP or enter the LDP view

    To configure LDP, first activate the LDP and enter the LDP view

    mpls ldp

    Note: make configurations in the system view

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    39/43

    39

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Basic MPLS Configurations (2)

    Enable interface LDP

    mpls ldp enable

    Note: make configurations in the interface view

    LDP loop detection control

    Enable loop detection

    Loop-detect

    Set the maximum hot number for loop detection

    hops-count hop-number Set the maximum value for the path vector

    ath-vectors pv-number

    Note: make configurations in the LDP view

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    40/43

    40

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    MPLS Debugging

    MPLS display commands

    Display information about LDP and LSR

    display mpls ldp

    Display information about LDP-enabled interface

    display mpls ldp interface

    Display information about all LSPs established in the public

    network

    display mpls lsp

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    41/43

    41

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Configuration Example

    Suppose a network consists of four NE routers, where Router B is connected to

    Router C via SDH, while Router B is connected to Router A and Router D via

    Ethernet.

    The four routers all support MPLS. LSP can be set up between any two routers. The

    operational routing protocol is OSPF

    Router B

    Router A

    Router C

    Router D

    ethernet8/0/0

    168.1.1.1

    ethernet1/0/0

    168.1.1.2

    ethernet1/0/1

    172.17.1.1

    ethernet2/0/1

    172.17.1.2

    pos2/0/1

    100.10.1.2

    pos7/0/0

    100.10.1.1

    Configuration procedure

    Configure ip address for

    the interface

    Configure the ospf

    protocol

    Configure the MPLS LDP

    Router C is configured with:[Quidway] interface pos 7/0/0[Quidway-Pos7/0/0] ip address 100.10.1.1

    255.255.255.0[Quidway] router id 172.16.1.2[Quidway] ospf[Quidway-ospf] area 0[Quidway-ospf-area-0.0.0.0] network 100.10.1.00.0.0.255[Quidway] mpls lsr-id 172.16.1.2[Quidway] mpls ldp

    [Quidway-Pos7/0/0] mpls ldp enable

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    42/43

    42

    Confidential Information of Huawei.No Spreading without Permission. Security Level: Internal

    Summary

    Grasp the basic concepts and working process of MPLS

    Grasp label allocation and distribution

    Grasp MPLS LDP configuration

  • 7/31/2019 Oda000015 Mpls Basic Knowledge Issue2.0

    43/43

    43