MPLS Stands for Multi Protocol Label Switching

Embed Size (px)

Citation preview

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    1/22

    Lecture#1

    MPLS stands for Multi Protocol Label Switching.

    Up till now we have IP as a best protocol. All the technologies are coming on IP.e.g. cameras,

    SS7 signaling, telephony, video etc.

    But IP has its own drawbacks.

    So we need a technology which can overcome these drawbacks and it can run the networks in

    more OPTIMUM and FLEXIBLE way.

    If someone ask u that what is the advantage of MPLS over IP then its answer is

    OPTIMIZATION and FLEXIBILITY.

    So MPLS is a technology which remove the flaws of IP and improve the functionalities ofIP.

    How IP operate? What is the flow of IP? How traffic flows in actual?

    1st of all we know about the networks with the help of any routing protocol, static route or

    directly connected.

    2nd information of these networks is taken into the routing table.

    3rd the usual traffic coming to the router is routed by using the information in the routing table.

    So it is a two step process

    1st gather the information about networks in the Routing table

    2nd forward the IP packets towards the destination using that information.

    1st process is done by Routing Protocols and the 2nd process is done by routed

    protocols.

    So routing protocols like RIP, EIGRP, OSPF, and BGP gather the routing information and IP

    use this information to send the packets towards destination. Routers are the devices which do

    IP FORWARING.

    In MPLS environment the forwarding decision is not based on the IP. That means there is no IP

    FORWARING. In this environment router read the label attached with the packet and doforwarding on the base of this Label. So here the decision is not based on destination IP

    address but it is on the base of label value and this Label is just like a VLAN tag which is

    providing an identity to the frame. So the basic difference is that here forwarding is based on

    Label not on IP. That is why it is called LABEL SWITCHING.

    MPLS is not limited to IP traffic. It can forward the traffic of any protocol like IPX, APPLE TALK

    etc. So that is why it is called multiprotocol.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    2/22

    Concept of CONTROL PLANE and DATA PLANE:-

    Remember these are only the imaginary planes.

    CONTROL PLANFunction:-Take care of routing information exchange and label exchange between adjacent

    Devices.

    1.

    Routing information is exchanged with routing protocols.

    Label information is exchanged with Label Distribution protocol (LDP).

    Another protocol responsible for exchanging the Label Distribution is Tag Distribution

    Protocol (TDP).

    TDP is cisco properietry and is not very popular.LDP is more popular than LDP.

    Although BGP is used for exchanging routing information but in certain situation it can be

    used for exchanging label information. For example in case of MPLS VPNs BGP canwork both as a routing and label protocol.

    RSVP which is primarily Qos related protocol but it can also be used for label exchange

    in MPLS TE.

    2. Control plane is more intelligent but less powerful than the data plane. Because it is

    involved in decision making.

    3. Here we have two tables

    Routing table where the routing protocols gathers the routing information. It is

    also called as routing information base (RIB).

    Label table where the label protocols gathers the label information. It is called as

    label information base (LIB).

    DATA PLANE

    Function:-Take care of forwarding based on either destination addresses or labels; also known

    as forwarding plane.

    1. Its function is just to forward the IP packets

    2. It is less intelligent but more powerful than control plane.

    3. Two tables are built here against the tables built in routing table.

    Forwarding information base(FIB)

    Label forwarding information base(LFIB)

    These four tables in the control plane and data plane are actually controlling the whole

    functionality of MPLS.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    3/22

    Brief Introduction of MPLS process:-

    Router A Router B

    10.0.0.0 10.0.0.0

    10.0.0.0

    Label=17 Label=40

    label=51

    10.0.0.0 10.0.0.0

    10.0.0.0

    Label=17 Label=40Label=51

    1. Routing protocols in the control plane exchange the routing information.

    2. After this exchange LDP starts its function. From the left of router A, any router using

    LDP advertizes the label number 17 for 10.0.0.0.Now the router A will advertize the label

    40 for network 10.0.0.0. Note that label advertisement of both the routers is different

    although the network is same. So the label assigned by a router for the same network

    can be different because every router is assigning or advertizing the label independently

    or independent of other routers .similarly B will advertize the different label 51 and so on.

    Actually the label assigning router is instructing the other router that they will only

    receive the packet for network 10.0.0.0 with this label. For example router A isinstructing the router B that it will only forward the packet for 10.0.0.0 with label 40 so

    whenever router B send the packet to A for 10.0.0.0 it will assign the label 40 to it.

    Although every neighbor is dependent on the other router as it is getting the label value

    from it while forwarding but remember label assigning process is independent. Each

    router assign the label to a network independent to the label value assigned by the other

    router to the same network.

    3. So from LIB, LFIB is built. In this table there is mapping between the assigned labels and

    the advertized labels for a specific network. For example if router A will receive packet

    for network 10.0.0.0 with label 40 it will forward it with label value 17 to the left. Similarly

    router B will replace the label 51 with for 10.0.0.0 with 40.so remember label values are

    changed on every router although ip address address remains the same.So ip is an end-

    to-end protocol but label information of ip exchanged locally.

    LDP

    10.0.0.0

    =40

    1740

    LFIB

    LDP

    10.1.1.1

    =51

    4051

    LFIB

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    4/22

    MPLS label:-

    LABEL=20 bits EXP=3bit *Bos=1bit TTL=8bits

    EXP=experimental bit, used to implement QoS.These bits plays the same role as the

    precedence bit in the IP header. In IP header there are 8 bits of CoS in which last three bits are

    used for precedence.

    BoS=Bottom of stack bit

    An Routing protocols forwards the routing information.

    Where the MPLS packet is inserted?

    Once an IP packet is generated by a computer it is forwarded to router. As computers are

    unable to create an MPLS labeled packet so MPLS router actually insert or shim the MPLS label

    in the IP packet. MPLS label is inserted in between the layer 2 and layer 3.

    Layer 2 MPLS Label

    Layer 2.5

    Layer 3 Payload

    Modes of MPLS:-i) Frame mode

    ii) Cell Mode

    we will discuss only the frame mode as cell mode is not used.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    5/22

    MPLS Domain

    Lecture#2

    Now we discuss the MPLS domains or network.

    We have mostly discussed the networks with reference to custumer or subscriber or an

    enterprise network. We always show the service provider with a cloud. But when we discuss

    MPLS it is the technology used largly by SPs.So now we should see the SPs could as our own

    cloud and the enterprise cloud as other cloud.

    What are the roles of different routers in an MPLS domain?

    IP Packet

    We can easily explain from above figure that MPLS routers has three function to perform.That is

    Inserting, swaping and poping labels on the ip packets.Also that edge LSR has two types i.e.

    ingress and egress LSR depending upon the flow of traffic.A simple edge LSR can contain both

    the roles depending upon the flow of traffic.So here is the summary of the story

    Ed

    ge

    LS

    R

    Ed

    ge

    LS

    R

    Ed

    ge

    LSR

    Ed

    ge

    LS

    R

    Co

    re

    LS

    RR1 R2

    IP Packet

    Label

    INSERTEDPack

    et

    Label

    SWAPEDPack

    et

    Label POPED Packet

    mean simple IP Packet

    ngress Edge LSR

    Converting IP

    packet to

    Label

    Inserting Label

    LSR within the MPLS

    domain only do the

    swapping

    Egress Edge LSR

    Converting

    Label packet

    to IP

    Popping Label

    R3

    IPPa

    cket

    LabelSWAPED

    R2

    IP packet

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    6/22

    i) Ordinary or Core LSR(Label Switching Router)ii) Edge LSR

    Ingress Edge LSR

    Egress Edge LSR

    A router can be ingress, egress, Core LSR or an ordinary router at the same time depending

    upon the flow of traffic. For example our edge routers in above figure is actually serving all the

    roles. So role the router depends upon the flow of traffic.

    Architecture of Edge LSR

    LSR regardless of its types perform the three functions

    i) Exchange routing information. CONTROL PLAN

    ii) Exchange Label information.

    iii) With help of this information forward the user traffic or data. DATA PLAN

    Control Plan

    Data Plan

    If incoming packet is IP packet then it will pass through the FIB and the forwarding

    decision is taken by FIB. If incoming packet is label packet then it will pass through theLFIB and the forwarding decision is taken by LFIB.

    FIB always receive IP packet but it can forward both IP and label packets. Similarly LFIB

    always receive labeled packet but it can forward both the label and IP packets.

    RIB

    LIB

    FIB

    LFIB

    FIBIP

    Packet

    IP

    Packet

    Routin

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    7/22

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    8/22

    In labeled information it instruct the neighboring router that if you

    want to route traffic to 10.0.0.0 through me then I need this (e.g.

    93 specified by instructing router) label.

    The difference between routing update and labeled update is that in routing update IP will

    always remain the same throughout every router but in label update every router will change thelabel independent of the neighboring router. So router updates are end-to-end but label updates

    are local.

    Ingress router MPLS Domain Egress Router

    Every router here is informing the its neighbor that what should be the next hop label if it wana

    route the traffic to 10.0.0.0/8.note that in LFIB there is no net.ID entry.It mean here routing

    lookup is only on the base of labels.

    Now we see this process

    This is normal routing without labels.

    AB D

    E

    FIB

    10/8NH,

    25LFIB

    untag25

    C

    FIB

    10/8NH,

    44LFIB

    2544

    FIB

    10/8NH

    LFIB

    44unta

    g

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    9/22

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    10/22

    Every router take all entries from its routing table and assign labels to each entry and store this

    information into its LIB as local table. Here router B has assigned label 25 to network X in its

    LIB.

    This label information is send to all neighbors. Now every router will take this entry in its LIB. In

    other word router B is informing or updating every neighbor that if they want to route traffic to

    network X then they should insert label 25 with this network. Only in that case router B will do

    label forwarding for network X.

    How E will forward this labeled packet?

    As E has not received any label from C so it can forward the label packet to C.So it simply

    remove the label and send an IP packet to C.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    11/22

    Now C will also assign a label 47 for network X independent of the neighbors and take it into the

    LIB table and then take it into the LFIB also. Also we can see that in LIB we have two entries for

    network X. So we can say that for every entry it has two tables in the LIB. One is local and

    second for the labels learned from its neighbors.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    12/22

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    13/22

    As D is not in our MPLS domain so C forward only an IP packet after popping the label to D.How LDP determine the next hop?

    This is done by routing protocols. So LDP is dependent upon the routing protocol to tell the

    exact path.

    How the labels are assigned?

    Labels are assigned in two ways.

    On per platform basis

    On per interface basis

    Per plate form means that a label is assigned to the whole router. That is same label is

    advertized to all of its interfaces.

    Per interface means that every interface can advertize the different labels. In this case different

    labels can be attached to single network. This is only done in cell mode. In frame mode we

    assign labels only on per platform basis.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    14/22

    How LDP works?

    It is very similar to OSPF and EIGRP.

    LDP like other routing protocols 1st build the neighbor relationship between the MPLS speaking

    routers and then it exchange its label information.

    LDP use UDP/ TCP port 646. It use UDP for neighbor relationship and TCP for label information

    exchange.It multicast on All Router multicast address 224.0.0.2.

    Its hello interval is 5 seconds and dead interval is 15 seconds.

    Penultimate Hop Popping (PHP)

    Here when packet reaches at egress LSR the network 10.0.0.0 is now directly connected so

    here the router will not send label rather it will do ARP to resolve its Mac and then send the IP

    packet. So to do it it will first remove LFIB and then FIB. So it needs a double lookup here. If the

    next router is non MPLS then still it needs a double lookup. So efficiency of the router will

    decrease.

    So in penultimate Hop Popping the penultimate means second last router will not insert label for

    the last ingress edge router. So the last router means egress edge router will not do double

    lookup and its performance improves.

    PHP optimizes the performance of the network (One less LFIB lookup).

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    15/22

    How the second last router knows, not to send the labeled packet?

    The last egress edge LSR will send labeled packet to its penultimate router with label value 3.The label 3 is reserved for pop or Implicit Null value. When it is send to its neighbors then it

    mean not to send it labeled packets.

    Actually 1-16 label values are reserved. Every value has a specific meaning and purpose. Only

    are few values are in use.

    KEY ACRONYMS

    MPLS Multiple Protocol Label Switching; also, Multiple Protocol Lambda Switching

    LER Label Edge Router

    LSR Label Switch Router

    LIB Label Information Base

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    16/22

    LSP Label Switch Path

    FEC Forward Equivalence Class; also, Functional Equivalent Class

    MPLS HIGHLIGHTS

    MPLS allows for the marriage of IP to layer 2 technologies by overlaying a protocol on top of IPnetworks.

    Network routers equipped with special MPLS software process MPLS labels contained in the ShimHeader.Raw IP traffic is presented to the LER, where labels are pushed; these packets are forwarded over LSPto LSR where labels are swapped.At the egress to the network, the LER removes the MPLS labels and marks the IP packets for delivery.

    If traffic crosses several networks, it can be tunneled across the networks by using stacked labels.

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    17/22

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    18/22

    R3(config)#int serial 1/0

    R3(config-if)#ip add 2.1.1.2 255.0.0.0

    R3(config-if)#no sh

    R3(config-if)#exit

    R3(config)#int s 1/1

    R3(config-if)#ip add 3.1.1.1 255.0.0.0R3(config-if)#no shut

    R3(config-if)#exit

    R3(config)#int ethernet 2/0

    R3(config-if)#ip add 30.1.1.1 255.0.0.0

    R3(config-if)#no sh

    R3(config-if)#exit

    R3(config)#router ospf 1

    R3(config-router)#net 2.0.0.0 0.255.255.255 a 0

    R3(config-router)#net 3.0.0.0 0.255.255.255 a 0

    R3(config-router)#net 30.0.0.0 0.255.255.255 a 0

    R3(config-router)#net 33.3.3.3 255.255.255.255 a 0

    R3(config-router)#exit

    Router(config)#hostname R4

    R4(config)#int loopback 0

    R4(config-if)#ip add 44.4.4.4 255.255.255.255

    R4(config-if)#no sh

    R4(config)#int s 1/0

    R4(config-if)#ip add 3.1.1.1 255.0.0.0

    R4(config-if)#no shR4(config)#int serial 1/1

    R4(config-if)#ip add 4.1.1.1 255.0.0.0

    R4(config-if)#no sh

    R4(config-if)#exit

    R4(config)#int Ethernet 2/0

    R4(config-if)#ip add 40.1.1.1 255.0.0.0

    R4(config-if)#no sh

    R4(config-if)#exit

    R4(config)#router ospf 1

    R4(config-router)#network 3.0.0.0 0.255.255.255 a 0

    R4(config-router)#network 4.0.0.0 0.255.255.255 a 0

    R4(config-router)#network 40.0.0.0 0.255.255.255 a 0

    R4(config-router)#network 44.4.4.4 255.255.255.255 a 0

    Router(config)#hostname R5

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    19/22

    R5(config)#int loopback 0

    R5(config-if)#ip add 55.5.5.5 255.255.255.255

    R5(config-if)#no sh

    R5(config)#int serial 1/0

    R5(config-if)#ip add 4.1.1.2 255.0.0.0

    R5(config-if)#no shR5(config-if)#exit

    R5(config)#int e

    R5(config)#int ethernet 2/0

    R5(config-if)#ip add 50.1.1.1 255.0.0.0

    R5(config-if)#no sh

    R5(config-if)#exit

    R5(config)#router ospf 1

    R5(config-router)#net 4.0.0.0 0.255.255.255 a 0

    R5(config-router)#net 50.0.0.0 0.255.255.255 a 0

    R5(config-router)#net 55.5.5.5 255.255.255.255 a 0

    R1#sh ip route ospf 1

    O 50.0.0.0/8 [110/266] via 1.1.1.2, 00:04:12, Serial1/0

    O 2.0.0.0/8 [110/128] via 1.1.1.2, 00:04:12, Serial1/0

    33.0.0.0/32 is subnetted, 1 subnets

    O 33.3.3.3 [110/129] via 1.1.1.2, 00:04:12, Serial1/0

    O 3.0.0.0/8 [110/192] via 1.1.1.2, 00:04:12, Serial1/0

    O 4.0.0.0/8 [110/256] via 1.1.1.2, 00:04:12, Serial1/0

    55.0.0.0/32 is subnetted, 1 subnets

    O 55.5.5.5 [110/257] via 1.1.1.2, 00:04:12, Serial1/0

    O 20.0.0.0/8 [110/74] via 1.1.1.2, 00:04:12, Serial1/022.0.0.0/32 is subnetted, 1 subnets

    O 22.2.2.2 [110/65] via 1.1.1.2, 00:04:12, Serial1/0

    O 40.0.0.0/8 [110/202] via 1.1.1.2, 00:04:12, Serial1/0

    44.0.0.0/32 is subnetted, 1 subnets

    O 44.4.4.4 [110/193] via 1.1.1.2, 00:04:12, Serial1/0

    O 30.0.0.0/8 [110/138] via 1.1.1.2, 00:04:12, Serial1/0

    R1#sh ip route connected

    C 1.0.0.0/8 is directly connected, Serial1/0

    C 10.0.0.0/8 is directly connected, Ethernet2/0

    11.0.0.0/32 is subnetted, 1 subnets

    C 11.1.1.1 is directly connected, Loopback0

    R2#sh ip route connected

    C 1.0.0.0/8 is directly connected, Serial1/0

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    20/22

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    21/22

    R4#sh ip route connected

    C 3.0.0.0/8 is directly connected, Serial1/0

    C 4.0.0.0/8 is directly connected, Serial1/1

    C 40.0.0.0/8 is directly connected, Ethernet2/0

    44.0.0.0/32 is subnetted, 1 subnetsC 44.4.4.4 is directly connected, Loopback0

    R4#sh ip route ospf 1

    O 1.0.0.0/8 [110/192] via 3.1.1.1, 00:15:49, Serial1/0

    O 50.0.0.0/8 [110/74] via 4.1.1.2, 00:15:49, Serial1/1

    O 2.0.0.0/8 [110/128] via 3.1.1.1, 00:15:49, Serial1/0

    33.0.0.0/32 is subnetted, 1 subnets

    O 33.3.3.3 [110/65] via 3.1.1.1, 00:15:49, Serial1/0

    55.0.0.0/32 is subnetted, 1 subnets

    O 55.5.5.5 [110/65] via 4.1.1.2, 00:15:49, Serial1/1

    O 20.0.0.0/8 [110/138] via 3.1.1.1, 00:15:49, Serial1/0

    22.0.0.0/32 is subnetted, 1 subnets

    O 22.2.2.2 [110/129] via 3.1.1.1, 00:15:49, Serial1/0

    O 10.0.0.0/8 [110/202] via 3.1.1.1, 00:15:49, Serial1/0

    11.0.0.0/32 is subnetted, 1 subnets

    O 11.1.1.1 [110/193] via 3.1.1.1, 00:15:49, Serial1/0

    O 30.0.0.0/8 [110/74] via 3.1.1.1, 00:15:49, Serial1/0

    R4#sh ip route connR4#sh ip route connected

    C 3.0.0.0/8 is directly connected, Serial1/0

    C 4.0.0.0/8 is directly connected, Serial1/1

    C 40.0.0.0/8 is directly connected, Ethernet2/0

    44.0.0.0/32 is subnetted, 1 subnets

    C 44.4.4.4 is directly connected, Loopback0

    R4#sh ip route ospf 1

    O 1.0.0.0/8 [110/192] via 3.1.1.1, 00:15:49, Serial1/0

    O 50.0.0.0/8 [110/74] via 4.1.1.2, 00:15:49, Serial1/1

    O 2.0.0.0/8 [110/128] via 3.1.1.1, 00:15:49, Serial1/0

    33.0.0.0/32 is subnetted, 1 subnets

    O 33.3.3.3 [110/65] via 3.1.1.1, 00:15:49, Serial1/0

    55.0.0.0/32 is subnetted, 1 subnets

    O 55.5.5.5 [110/65] via 4.1.1.2, 00:15:49, Serial1/1

    O 20.0.0.0/8 [110/138] via 3.1.1.1, 00:15:49, Serial1/0

    22.0.0.0/32 is subnetted, 1 subnets

  • 8/14/2019 MPLS Stands for Multi Protocol Label Switching.

    22/22

    O 22.2.2.2 [110/129] via 3.1.1.1, 00:15:49, Serial1/0

    O 10.0.0.0/8 [110/202] via 3.1.1.1, 00:15:49, Serial1/0

    11.0.0.0/32 is subnetted, 1 subnets

    O 11.1.1.1 [110/193] via 3.1.1.1, 00:15:49, Serial1/0

    O 30.0.0.0/8 [110/74] via 3.1.1.1, 00:15:49, Serial1/0

    R5#sh ip route connected

    C 50.0.0.0/8 is directly connected, Ethernet2/0

    C 4.0.0.0/8 is directly connected, Serial1/0

    55.0.0.0/32 is subnetted, 1 subnets

    C 55.5.5.5 is directly connected, Loopback0

    R5#sh ip route ospf 1

    O 1.0.0.0/8 [110/256] via 4.1.1.1, 00:17:09, Serial1/0

    O 2.0.0.0/8 [110/192] via 4.1.1.1, 00:17:09, Serial1/0

    33.0.0.0/32 is subnetted, 1 subnets

    O 33.3.3.3 [110/129] via 4.1.1.1, 00:17:09, Serial1/0

    O 3.0.0.0/8 [110/128] via 4.1.1.1, 00:17:09, Serial1/0

    O 20.0.0.0/8 [110/202] via 4.1.1.1, 00:17:09, Serial1/0

    22.0.0.0/32 is subnetted, 1 subnets

    O 22.2.2.2 [110/193] via 4.1.1.1, 00:17:09, Serial1/0

    O 40.0.0.0/8 [110/74] via 4.1.1.1, 00:17:09, Serial1/0

    O 10.0.0.0/8 [110/266] via 4.1.1.1, 00:17:09, Serial1/0

    11.0.0.0/32 is subnetted, 1 subnets

    O 11.1.1.1 [110/257] via 4.1.1.1, 00:17:09, Serial1/0

    44.0.0.0/32 is subnetted, 1 subnets

    O 44.4.4.4 [110/65] via 4.1.1.1, 00:17:09, Serial1/0O 30.0.0.0/8 [110/138] via 4.1.1.1, 00:17:09, Serial1/0