Multiprotocol Label Switching: Difference between revisions

Content deleted Content added
JAnDbot (talk | contribs)
m robot Adding: cs:Mpls
 
Line 1:
{{Short description|Network routing scheme based on labels identifying paths}}
{{IPstack}}
{{redirect|MPLS|the U.S. city|Minneapolis|other uses|mpls (disambiguation)}}
 
'''Multiprotocol Label Switching''' ('''MPLS''') is a routing technique in [[telecommunications network]]s that directs data from one [[Node (networking)|node]] to the next based on labels rather than network addresses.<ref>{{Cite web|url=https://searchnetworking.techtarget.com/definition/Multiprotocol-Label-Switching-MPLS|title = What is Multiprotocol Label Switching (MPLS)?}}</ref> Whereas network addresses identify [[Communication endpoint|endpoints]], the labels identify established paths between endpoints. MPLS can encapsulate packets of various [[network protocol]]s, hence the ''multiprotocol'' component of the name. MPLS supports a range of access technologies, including [[Digital Signal 1|T1]]/[[E-carrier|E1]], [[Asynchronous Transfer Mode|ATM]], [[Frame Relay]], and [[DSL]].
{{dablink|"Mpls" redirects here; it is also a common abbreviation for the city of [[Minneapolis, Minnesota|Minneapolis]].}}
 
==Role and functioning==
In [[computer networking]] and [[telecommunications]], '''MultiProtocol Label Switching''' ('''MPLS''') is a data-carrying mechanism which emulates some properties of a [[Circuit switching|circuit-switched network]] over a [[Packet switching|packet-switched network]]. MPLS operates at an [[OSI Model]] layer that is generally considered to lie between traditional definitions of Layer 2 (data link layer) and Layer 3 (network layer), and thus is often referred to as a "Layer 2.5" protocol. It was designed to provide a unified data-carrying service for both [[Telecommunication circuit|circuit]]-based clients and [[packet-switching]] clients which provide a [[datagram]] service model. It can be used to carry many different kinds of traffic, including IP [[packet]]s, as well as native ATM, SONET, and Ethernet frames.
In an MPLS network, labels are assigned to data packets. Packet-forwarding decisions are made solely on the contents of this label, without the need to examine the packet itself. This allows one to create end-to-end circuits across any type of transport medium, using any protocol. The primary benefit is to eliminate dependence on a particular [[OSI model]] [[data link layer]] (layer 2) technology, and eliminate the need for multiple layer-2 networks to satisfy different types of traffic. Multiprotocol label switching belongs to the family of [[packet-switched network]]s.
 
MPLS operates at a layer that is generally considered to lie between traditional definitions of OSI Layer 2 ([[data link layer]]) and Layer 3 ([[network layer]]), and thus is often referred to as a ''layer 2.5'' protocol. It was designed to provide a unified data-carrying service for both [[Telecommunication circuit|circuit]]-based clients and packet-switching clients which provide a [[datagram]] service model. It can be used to carry many different kinds of traffic, including IP [[packet (information technology)|packets]], as well as native [[Asynchronous Transfer Mode]] (ATM), [[Frame Relay]], [[Synchronous Optical Networking]] (SONET) or [[Ethernet]].
== Background ==
A number of different technologies were previously deployed with essentially identical goals, such as [[frame relay]] and [[Asynchronous Transfer Mode|ATM]]. MPLS is now replacing these technologies in the marketplace, mostly because it is better aligned with current and future technology needs.
 
InA particularnumber of different technologies were previously deployed with essentially identical goals, such as Frame Relay and ATM. Frame Relay and ATM use ''labels'' to move [[Frame (networking)|frames]] or cells through a network. The header of the Frame Relay frame and the ATM cell refers to the [[virtual circuit]] that the frame or cell resides on. The similarity between Frame Relay, ATM, and MPLS is that at each hop throughout the network, the ''label'' value in the header is changed. This is different from the [[IP routing|forwarding of IP packets]].<ref>{{cite book|title=MPLS Fundamentals|isbn=978-1587051975|last1=Ghein|first1=Luc De|year=2007|publisher=Cisco Press }}</ref> MPLS technologies have evolved with the strengths and weaknesses of ATM in mind. MPLS is designed to have lower overhead than ATM while providing [[connection-oriented service]]s for variable-length frames, and has replaced much use of ATM in the market.<ref>{{cite book|title=Applied Data Communications (A Business-Oriented Approach)|isbn=0471346403|last1=Goldman|first1=James E.|last2=Rawles|first2=Phillip T.|date=12 January 2004|publisher=Wiley }}</ref> MPLS dispenses with the cell-switching and signaling-protocol baggage of ATM. MPLS recognizes that small ATM cells are not needed in the core of modern networks, since modern optical networks (as of [[2001]]) are so fast (at 10 Gbit/s and well beyond)enough that even full-length 1500 -byte packets do not incur significant real-time queuing delays.{{efn|The (the needdesire to reduceminimize such[[network delayslatency]] e.g., to support voice traffic, having beenwas the motivation for the small-cell nature of ATM.}} At the same time, MPLS attempts to preserve the [[teletraffic engineering|traffic engineering]] (TE) and [[out-of-band control]] that made Frame Relay and ATM attractive for deploying large-scale networks.
 
==History==
At the same time, it attempts to preserve the [[traffic engineering (telecommunications)|traffic engineering]] and [[out-of-band]] control that made frame relay and ATM attractive for deploying large-scale networks.
* 1994: [[Toshiba_Telecommunication_Systems_Division|Toshiba]] presented Cell Switch Router (CSR) ideas to [[IETF BOF]]
* 1995: [[George Varghese]] and [[Girish Chandranmenon]] published paper on threaded indices, a form of label switching, at [[ACM SIGCOMM]] annual conference<ref>{{citation |title = Trading Packet Headers for Packet Processing | journal = ACM SIGCOMM Computer Communication Review| date = October 1995 |doi = 10.1145/217391.217427| last1 = Chandranmenon| first1 = Girish P.| last2 = Varghese|author2-link=George Varghese| first2 = George| volume = 25| issue = 4| pages = 162–173}}</ref>
* 1996: Ipsilon, Cisco and IBM announced label-switching plans
* 1997: Formation of the IETF MPLS working group
* 1999: First MPLS VPN (L3VPN) and TE deployments
* 2000: MPLS Traffic Engineering
* 2001: First MPLS [[Request for Comments]] (RFC) published{{Ref RFC|3031}}
* 2002: AToM (L2VPN)
* 2004: GMPLS; Large-scale L3VPN
* 2006: Large-scale TE "Harsh"
* 2007: Large-scale L2VPN
* 2009: Label Switching Multicast
* 2011: [[MPLS-TP|MPLS transport profile]]
 
In 1996 a group from [[Ipsilon Networks]] proposed a ''flow management protocol''.{{Ref RFC|1953}} Their ''IP Switching'' technology, which was defined only to work over ATM, did not achieve market dominance. [[Cisco Systems]] introduced a related proposal, not restricted to ATM transmission, called ''Tag Switching''<ref>{{cite journal|doi=10.1109/5.650179|title=Tag switching architecture overview|year=1997|last1=Rekhter|first1=Y.|author1-link=Yakov Rekhter|last2=Davie|first2=B.|last3=Rosen|first3=E.|last4=Swallow|first4=G.|last5=Farinacci|first5=D.|last6=Katz|first6=D.|journal=Proceedings of the IEEE|volume=85|issue=12|pages=1973–1983}}</ref> with its Tag Distribution Protocol (TDP).<ref>{{Cite web|url=https://tools.ietf.org/id/draft-doolan-tdp-spec-00.txt|title=IETF - Tag Distribution Protocol (draft-doolan-tdp-spec-00)|date=September 1996|website=IETF}}</ref> It was a Cisco proprietary proposal, and was renamed ''Label Switching''. It was handed over to the [[Internet Engineering Task Force]] (IETF) for open standardization. The IETF formed the MPLS Working Group in 1997. Work involved proposals from other vendors, and development of a consensus protocol that combined features from several vendors' work.<ref>{{Cite web|url=https://datatracker.ietf.org/wg/mpls/history/|title = Multiprotocol Label Switching (mpls) WG History|website=IETF}}</ref>
MPLS was originally proposed by a group of engineers from [[Cisco Systems, Inc.]]; it was called "Tag Switching" when it was a Cisco proprietary proposal, and was renamed "Label Switching" when it was handed over to the IETF for open standardization.
 
Some time later it was recognized that the work on threaded indices by Girish Chandranmenon and George Varghese had invented the idea of using labels to represent destination prefixes that was central to tag switching.<ref>{{cite book|title = Computer Networks: A Systems Approach|author = L. Peterson and B. Davie|date = 2022|page = 336|url=https://book.systemsapproach.org/scaling/mpls.html}}</ref>
One original motivation was to allow the creation of simple high-speed switches, since for a significant length of time it was impossible to forward IP packets entirely in hardware. However, advances in [[Very-large-scale integration|VLSI]] have made such devices possible. The systemic advantages of MPLS, such as the ability to support multiple service models, do traffic management, etc., remain.
 
One original motivation was to allow the creation of simple high-speed switches since for a significant length of time it was considered impractical to forward IP packets entirely in hardware. Advances in [[VLSI]] and in forwarding algorithms have made hardware forwarding of IP packets possible and common. The current advantages of MPLS primarily revolve around the ability to support multiple service models and perform traffic management. MPLS also offers a robust recovery framework{{Ref RFC|3469}} that goes beyond the simple protection rings of [[synchronous optical networking]] (SONET/SDH).
== How MPLS works ==
MPLS works by preappending packets with an MPLS header, containing one or more 'labels'. This is called a label [[Stack (data structure)|stack]].
 
==Operation==
Each label stack entry contains four fields:
MPLS works by prefixing packets with an MPLS header, containing one or more labels. This is called a label [[stack (data structure)|stack]].
* a 20-bit label value.
{{APHD|start|title=MPLS packet structure}}
* a 3-bit field for QoS priority (experimental).
{{APHD|0|bits1=32|field1=MPLS Label [1]}}
* a 1-bit ''bottom of stack'' flag. If this is set, it signifies the current label is the last in the stack.
{{APHD|4|bits1=32|background1=linen|field1=MPLS Label [2]}}
* an 8-bit TTL ([[time to live]]) field.
{{APHD|999|bits1=32|background1=linen|field1=&vellip;}}
{{APHD|999|bits1=32|background1=linen|field1=MPLS Label [n]}}
{{APHD|999|hoctets=4n|hbits=32n|bits1=0|background1=mistyrose|field1=Packet}}
{{APHD|end}}
 
Each entry in the label stack contains four fields:
These MPLS labeled packets are switched after a Label Lookup/Switch instead of a lookup into the IP table. Label Lookup and [[Label Switching]] may be faster than usual [[RIB (computer networking)|RIB]] lookup because it can take place directly within the [[switching fabric]] and not the [[CPU]].
{{APHD|start|title=MPLS Label}}
{{APHD|0|bits1=20|field1=Label|bits2=3|field2=TC|hint2=Traffic Class|bits3=1|field3=S|hint3=Bottom of Stack|bits4=8|field4=Time to Live}}
{{APHD|end}}
;{{APHD|def|name=Label|length=20 bits|text=A label with the value of 1 represents the [[router alert label]].}}
;{{APHD|def|name=Traffic Class|short=TC|length=3 bits|text=Field for QoS ([[quality of service]]) priority and ECN ([[Explicit Congestion Notification]]). Prior to 2009 this field was called EXP.<ref>{{citation | url = https://tools.ietf.org/html/rfc5462 | title = Multiprotocol Label Switching (MPLS) Label Stack Entry: "EXP" Field Renamed to "Traffic Class" Field | author = L. Andersson | author2 = R. Asati |date=February 2009 | publisher = IETF| doi = 10.17487/RFC5462 }}</ref>}}
;{{APHD|def|name=Bottom of Stack|short=S|length=1 bit|text=If this flag is set, it signifies that the current label is the last in the stack.}}
;{{APHD|def|name=[[Time to Live]]|short=TTL|length=8 bits|text=Time to live.}}
 
These MPLS-labeled packets are switched based on the label instead of a lookup in the IP [[routing table]]. When MPLS was conceived, [[label switching]] was faster than a routing table lookup because switching could take place directly within the [[switched fabric]] and avoided CPU and software involvement.
The exit points of an MPLS network are called [[Label Edge Router]]s (LER). Routers that perform routing based only on [[Label Switching]] are called [[Label Switch Router]]s (LSR). Remember that a LER is not usually the one that pops the label. For more information see [[Penultimate Hop Popping]].
 
The presence of such a label has to be indicated to the switch. In the case of Ethernet frames this is done through the use of [[EtherType]] values 0x8847 and 0x8848, for [[unicast]] and [[multicast]] connections respectively.<ref name="Pepelnjak 2002">{{citation | title = MPLS and VPN Architectures, Volume 1 | author = Ivan Pepelnjak | author2 = Jim Guichard | publisher = Cisco Press | date = 2002 | isbn = 1587050811 | page = 27}}</ref>
Devices that function as [[Ingress router|ingress]] and/or [[egress router]]s are often called PE (Provider Edge) routers. Devices that function only as transit routers are similarly called P (Provider) routers. The job of a P router is significantly easier than that of a PE router, so they can be less complex and may be more dependable because of this.
 
===Equipment===
When an unlabeled packet enters the ingress router and needs to be passed on to an MPLS tunnel, the router first determines the [[forwarding equivalence class]] the packet should be in, and then inserts one or more labels in the packet's newly created MPLS header. The packet is then passed on to the next hop router for this tunnel.
{{MPLS diagram}}
====Label switch router====
An MPLS router that performs routing based only on the label is called a '''label switch router''' ('''LSR''') or '''transit router'''. This is a type of router located in the middle of an MPLS network. It is responsible for switching the labels used to route packets.
 
When aan labeledLSR packetreceives isa receivedpacket, byit an MPLS router,uses the topmost label isincluded examined. Based onin the contentspacket ofheader theas labelan aindex ''swap'',to ''push''determine (''impose'') or ''pop'' (''dispose'') operationthe can[[Per-hop bebehavior|next performedhop]] on the packet's label-switched stack.path Routers(LSP) canand havea prebuilt lookup tables that tell them which kind of operation to do based on the topmostcorresponding label offor the incoming packet sofrom theya can[[Label processInformation theBase]]. packetThe veryold quickly.label Inis athen ''swap''removed operationfrom the labelheader isand swappedreplaced with athe new label, andbefore the packet is forwardedrouted along the path associated with the new labelforward.
 
====Label edge router====
In a ''push'' operation a new label is pushed on top of the existing label, effectively "encapsulating" the packet in another layer of MPLS. This allows the hierarchical routing of MPLS packets. Notably, this is used by [[MPLS VPN]]s.
A '''label edge router''' (LER, also '''edge LSR''' (which is "technically more correct")<ref>{{cite web |url=https://ftp.unpad.ac.id/orari/library/library-ref-eng/ref-eng-3/network/mpls/mpls.pdf |title=Cisco MPLS Controller Software Configuration Guide |date=May 2001 |publisher=[[Cisco]]}}</ref> or simply ''edge router''<ref>{{cite web |url=https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mp_ias_and_csc/configuration/xe-3s/mp-ias-and-csc-xe-3s-book/mp-carrier-ldp-igp.html |title=MPLS VPN Carrier Supporting Carrier Using LDP and an IGP |date=4 April 2014 |publisher=[[Cisco]]}}</ref>) is a router that operates at the edge of an MPLS network and acts as the entry and exit points for the network. LERs ''push'' an MPLS label onto an incoming packet{{efn|In some applications, the packet presented to the LER already may have a label, so that the new LER pushes a second label onto the packet.}} and ''pop'' it off an outgoing packet. Alternatively, under [[penultimate hop popping]] this function may instead be performed by the LSR directly connected to the LER.{{efn|See for example 'Penultimate LSR' in Table 3-1 of {{cite web |url=https://www.ciscopress.com/articles/article.asp?p=426645&seqNum=3 |title=A Network Administrator's View of Multiservice Networks |date=9 December 2005 |publisher=[[Cisco Press]]}}}}
 
When forwarding an [[IP datagram]] into the MPLS ___domain, a LER uses routing information to determine the appropriate label to be affixed, labels the packet accordingly, and then forwards the labeled packet into the MPLS ___domain. Likewise, upon receiving a labeled packet that is destined to exit the MPLS ___domain, the LER strips off the label and forwards the resulting IP packet using normal IP forwarding rules.
In a ''pop'' operation the label is removed from the packet, which may reveal an inner label below. This process is called "decapsulation". If the popped label was the last on the label stack, the packet "leaves" the MPLS tunnel. This is usually done by the egress router, but see PHP below.
 
====Provider router====
During these operations, the contents of the packet below the MPLS Label [[Stack (data structure)|stack]] are not examined. Indeed transit routers typically need only to examine the topmost label on the stack. The forwarding of the packet is done based on the contents of the labels, which allows "protocol independent packet forwarding" that does not need to look at a protocol-dependent [[routing table]] and avoids the expensive IP [[longest prefix match]] at each hop.
In the specific context of an MPLS-based [[virtual private network]] (VPN), LERs that function as [[ingress router|ingress]] or [[egress router]]s to the VPN are often called [[provider edge]] (PE) routers. Devices that function only as transit routers are similarly called [[Provider router|provider]] (P) routers.{{Ref RFC|4364}} The job of a P router is significantly easier than that of a PE router.
 
===Label Distribution Protocol===
At the egress router, when the last label has been popped, only the payload remains. This can be an IP packet, or any of a number of other kinds of payload packet. The egress router must therefore have routing information for the packet's payload, since it must forward it without the help of label lookup tables. An MPLS transit router has no such requirement.
Labels may be distributed between LERs and LSRs using the [[Label Distribution Protocol]] (LDP){{Ref RFC|3037}} or [[Resource Reservation Protocol]] (RSVP).{{Ref RFC|2205}} LSRs in an MPLS network regularly exchange label and reachability information with each other using standardized procedures in order to build a complete picture of the network so that they can then use that information to forward the packets.
 
===Label-switched paths===
In some special cases, the last label can also be popped off at the penultimate hop (the hop before the egress router). This is called [[Penultimate Hop Popping]] (PHP). This may be interesting in cases where the egress router has lots of packets leaving MPLS tunnels, and thus spends inordinate amounts of CPU time on this. By using PHP, transit routers connected directly to this egress router effectively offload it, by popping the last label themselves.
Label-switched paths (LSPs) are established by the network operator for a variety of purposes, such as to create network-based IP virtual private networks or to route traffic along specified paths through the network. In many respects, LSPs are not different from [[permanent virtual circuit]]s (PVCs) in ATM or Frame Relay networks, except that they are not dependent on a particular layer-2 technology.
 
===Routing===
MPLS can make use of existing ATM network infrastructure, as its labeled flows can be mapped to ATM virtual circuit identifiers, and vice-versa.
When an unlabeled packet enters the ingress router and needs to be passed on to an MPLS [[Tunneling protocol|tunnel]], the router first determines the [[forwarding equivalence class]] (FEC) for the packet and then inserts one or more labels in the packet's newly created MPLS header. The packet is then passed on to the next hop router for this tunnel.
 
From an [[OSI model]] perspective, the MPLS Header is added between the [[network layer]] header and [[link layer]] header.<ref>Savecall telecommunication consulting company Germany [http://www.savecall.de/mpls/ Savecall - MPLS]</ref>
== Installing and removing MPLS paths ==
There are two standardized protocols for managing MPLS paths: [[CR-LDP]] (Constraint-based Routing Label Distribution Protocol) and [[RSVP-TE]], an extension of the [[Resource Reservation Protocol|RSVP]] protocol for traffic engineering.
 
When a labeled packet is received by an MPLS router, the topmost label is examined. Based on the contents of the label a ''swap'', ''push''{{efn|A.k.a. ''impose''}} or ''pop''{{efn|A.k.a. ''dispose''}} operation is performed on the packet's label stack. Routers can have prebuilt lookup tables that tell them which kind of operation to do based on the topmost label of the incoming packet so they can process the packet very quickly.
An MPLS header does not identify the type of data carried inside the MPLS path. If one wants to carry two different types of traffic between the same two routers, with different treatment from the core routers for each type, one has to establish a separate MPLS path for each type of traffic. cll
* In a ''swap'' operation the label is swapped with a new label, and the packet is forwarded along the path associated with the new label.
* In a ''push'' operation a new label is pushed on top of the existing label, effectively ''encapsulating'' the packet in another layer of MPLS. This allows [[hierarchical routing]] of MPLS packets. Notably, this is used by [[MPLS VPN]]s.
* In a ''pop'' operation the label is removed from the packet, which may reveal an inner label below. This process is called ''decapsulation''. If the popped label was the last on the label stack, the packet ''leaves'' the MPLS tunnel. This can be done by the egress router, or at the penultimate hop.
 
During these operations, the contents of the packet below the MPLS Label stack are not examined. Indeed, transit routers typically need only to examine the topmost label on the stack. The forwarding of the packet is done based on the contents of the labels, which allows protocol-independent packet forwarding that does not need to look at a protocol-dependent routing table and avoids the expensive IP [[longest prefix match]] at each hop.
== Comparison of MPLS versus IP ==
MPLS cannot be compared to IP as a separate entity because it works in conjunction with IP and IP's [[Interior Gateway Protocol|IGP]] routing protocols. MPLS gives IP networks simple traffic engineering, the ability to transport Layer 3 (IP) VPNs with overlapping address spaces, and support for Layer 2 pseudo wires (with '''A'''ny '''T'''ransport '''O'''ver '''M'''PLS, or ATOM - see [[Martini draft]]). Routers with programmable CPUs and without [[Content-addressable memory|TCAM/CAM]] or another method for fast lookups may also see a limited increase in performance.
 
At the egress router, when the last label has been popped, only the payload remains. This can be an IP packet or any type of packet. The egress router must, therefore, have routing information for the packet's payload since it must forward it without the help of label lookup tables. An MPLS transit router has no such requirement.
MPLS relies on IGP routing protocols to construct its label forwarding table, and the scope of any IGP is usually restricted to a single carrier for stability and policy reasons. As there is still no standard for carrier-carrier MPLS it is not possible to have the same MPLS service (Layer2 or Layer3 [[VPN]]) covering more than one operator.
 
Usually{{efn|This is the default behavior with only one label in the stack, accordingly to the MPLS specification.}}, the last label is popped off at the penultimate hop (the hop before the egress router). This is called [[penultimate hop popping]] (PHP). This is useful in cases where the egress router has many packets leaving MPLS tunnels and thus spends significant CPU resources on these transitions. By using PHP, transit routers connected directly to this egress router effectively offload it, by popping the last label themselves. In the label distribution protocols, this PHP label pop action is advertised as label value 3 (implicit null) and is never found in a label, since it means that the label is to be popped.
=== MPLS Local Protection ===
{{main|MPLS local protection}}
 
Several MPLS services including end-to-end [[Quality of service|QoS]] management,<ref>{{Cite news|url=https://www.networkworld.com/article/912436/cisco-subnet-understanding-mpls-explicit-and-implicit-null-labels.html|title=Understanding MPLS Explicit and Implicit Null Labels|last=Doyle|first=Jeff|work=Network World|access-date=2018-03-13|language=en}}</ref> and [[6PE]],<ref>{{cite web|title=6PE FAQ: Why Does 6PE Use Two MPLS Labels in the Data Plane?|url=https://www.cisco.com/c/en/us/support/docs/multiprotocol-label-switching-mpls/mpls/116061-qa-6pe-00.html|website=Cisco|language=en|access-date=2018-03-13}}</ref> require keeping a label even between the penultimate and the last MPLS router, with a label disposition always done on the last MPLS router, ultimate hop popping (UHP).<ref>{{Cite book|title=Router security strategies : securing IP network traffic planes|last=Gregg.|first=Schudel|date=2008|publisher=Cisco Press|others=Smith, David J. (Computer engineer)|isbn=978-1587053368|___location=Indianapolis, Ind.|oclc=297576680}}</ref><ref>{{cite web|title=Configuring Ultimate-Hop Popping for LSPs - Technical Documentation - Support - Juniper Networks|url=https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/mpls-ultimate-hop-popping-enabling.html|website=www.juniper.net|access-date=2018-03-13}}</ref> Some specific label values have been notably reserved<ref>{{Cite journal|url=https://tools.ietf.org/html/rfc3032|title=MPLS Label Stack Encoding|last1=Dino|first1=Farinacci|last2=Guy|first2=Fedorkow|website=tools.ietf.org|language=en|access-date=2018-03-13|last3=Alex|first3=Conta|last4=Yakov|first4=Rekhter|last5=C.|first5=Rosen, Eric|last6=Tony|first6=Li|year=2001 |doi=10.17487/RFC3032 }}</ref><ref>{{Cite journal|url=https://tools.ietf.org/html/rfc4182|title=Removing a Restriction on the use of MPLS Explicit NULL|last=<erosen@cisco.com>|first=Eric C. Rosen|website=tools.ietf.org|year=2005 |doi=10.17487/RFC4182 |language=en|access-date=2018-03-13}}</ref> for this use. In this scenario the remaining label stack entry conveys information to the last hop (such as its Traffic Class field for QoS information), while also instructing the last hop to pop the label stack using one of the following reserved label values:
In the event of a network element failure when recovery mechanisms are employed at the IP layer, restoration may take several seconds which is unacceptable for real-time applications (such as VoIP)<ref name="aslam">{{cite paper|author=Aslam et al. |title=NPP: A Facility Based Computation Framework for Restoration Routing Using Aggregate Link Usage Information|url=http://cat.inist.fr/?aModele=afficheN&cpsidt=16546516|version=QoS-IP 2005 : quality of service in multiservice IP network|date=2005-02-02|accessdate=2006-10-27}}</ref>
* 0: Explicit-null for IPv4
<ref name="raza">{{cite paper|author=Raza et al. |title=Online routing of bandwidth guaranteed paths with local restoration using optimized aggregate usage information|url=http://ieeexplore.ieee.org/iel5/9996/32109/01494347.pdf|version=IEEE-ICC 2005|accessdate=2006-10-27}}</ref><ref name="LiLi">{{cite journal|author=Li Li et al. |title=Routing bandwidth guaranteed paths with local restoration in label switched networks|url=http://ieeexplore.ieee.org/iel5/49/30289/01391048.pdf?tp=&arnumber=1391048&isnumber=30289|version=IEEE Journal on Selected Areas in Communications|accessdate=2006-10-27}}</ref>. In contrast, [[MPLS local protection]] meets the requirements of real-time applications with recovery times comparable to those of [[SONET]] rings (up to 50ms).<ref name="aslam"/><ref name="LiLi"/><ref name="Kodialam">{{cite paper|author=Kodialam et al.|title=Dynamic Routing of Locally Restorable Bandwidth Guaranteed Tunnels using Aggregated Link Usage Information|url=http://ieeexplore.ieee.org/iel5/7321/19793/00916720.pdf|version=IEEE Infocom. pp. 376–385. 2001|accessdate=2006-10-27}}</ref>
* 2: Explicit-null for IPv6
 
An MPLS header does not identify the type of data carried inside the MPLS path. To carry two different types of traffic between the same two routers, with different treatment by the core routers for each type, a separate MPLS path for each type of traffic is required.
== Comparison of MPLS versus ATM ==
While the underlying protocols and technologies are different, both MPLS and [[Asynchronous Transfer Mode|ATM]] provide a [[connection-oriented]] service for transporting data across computer networks. In both technologies connections are signaled between endpoints, connection state is maintained at each node in the path and encapsulation techniques are used to carry data across the connection. Excluding differences in the signaling protocols (RSVP/LDP for MPLS and [[PNNI]] for ATM) there still remain significant differences in the behavior of the technologies.
 
====Label-switched path====
The most significant difference is in the transport and encapsulation methods. MPLS is able to work with variable length packets while ATM transports fixed-length (53 byte) cells. Packets must be segmented, transported and re-assembled over an ATM network using an adaption layer, which adds significant complexity and overhead to the data stream. MPLS, on the other hand, simply adds a label to the head of each packet and transmits it on the network.
A label-switched path (LSP) is a path through an MPLS network set up by the [[Network Management System|NMS]] or by a signaling protocol such as [[Label Distribution Protocol|LDP]], [[RSVP-TE]], [[BGP]] (or the now deprecated [[CR-LDP]]). The path is set up based on criteria in the FEC.
 
The path begins at an LER, which makes a decision on which label to prefix to a packet based on the appropriate FEC. It then forwards the packet along to the next router in the path, which swaps the packet's outer label for another label, and forwards it to the next router. The last router in the path removes the label from the packet and forwards the packet based on the header of its next layer, for example [[IPv4]]. Due to the forwarding of packets through an LSP being opaque to higher network layers, an LSP is also sometimes referred to as an MPLS tunnel.
Differences exist, as well, in the nature of the connections. An MPLS connection ([[Label switched path|LSP]]) is uni-directional - allowing data to flow in only one direction between two endpoints. Establishing two-way communications between endpoints requires a pair of LSPs to be established. Because 2 LSPs are required for connectivity, data flowing in the forward direction may use a different path from data flowing in the reverse direction. ATM point-to-point connections (Virtual Circuits), on the other hand, are [[bi-directional]], allowing data to flow in both directions over the same path (bi-directional are only svc ATM connections; pvc ATM connections are uni-directional).
 
The router which first prefixes the MPLS header to a packet is an [[ingress router]]. The last router in an LSP, which pops the label from the packet, is called an [[egress router]]. Routers in between, which need only swap labels, are called transit routers or label switch routers (LSRs).
Both ATM and MPLS support tunnelling of connections inside connections. MPLS uses label stacking to accomplish this while ATM uses ''Virtual Paths''. MPLS can stack multiple labels to form tunnels within tunnels. The ATM Virtual Path Indicator (VPI) and Virtual Circuit Indicator (VCI) are both carried together in the cell header, limiting ATM to a single level of tunnelling.
 
Note that LSPs are unidirectional; they enable a packet to be label switched through the MPLS network from one endpoint to another. Since bidirectional communication is typically desired, the aforementioned dynamic signaling protocols can automatically set up a separate LSP in the opposite direction.
The biggest single advantage that MPLS has over ATM is that it was designed from the start to be complementary to IP. Modern routers are able to support both MPLS and IP natively across a common interface allowing network operators great flexibility in network design and operation. ATM's incompatibilities with IP require complex adaptation making it largely unsuitable in today's predominantly IP networks.
 
When [[link protection]] is considered, LSPs can be categorized as primary (working), secondary (backup) and tertiary (LSP of last resort).
== MPLS deployment ==
MPLS is currently in use in large "IP Only" networks, and is standardized by [[IETF]] in RFC 3031.
 
===Installing and removing paths===
In practice, MPLS is mainly used to forward [[Internet Protocol|IP]] datagrams and [[Ethernet]] traffic. Major applications of MPLS are [[Telecommunications traffic engineering]] and [[MPLS VPN]].
There are two standardized protocols for managing MPLS paths: the [[Label Distribution Protocol]] (LDP) and [[RSVP-TE]], an extension of the [[Resource Reservation Protocol]] (RSVP) for traffic engineering.{{Ref RFC|5036}}{{Ref RFC|3209}} Furthermore, there exist extensions of the [[Border Gateway Protocol]] (BGP) that can be used to manage an MPLS path.{{Ref RFC|4364}}{{Ref RFC|8277}}{{Ref RFC|4781}}
 
===Multicast addressing===
== Competitors to MPLS ==
Multicast was, for the most part, an afterthought in MPLS design. It was introduced by point-to-multipoint RSVP-TE.{{Ref RFC|4875}} It was driven by [[service provider]] requirements to transport broadband video over MPLS.
MPLS can exist in both [[IPv4]] environment (IPv4 routing protocols) and [[IPv6]] environment (IPv6 routing protocols). The major goal of MPLS development - the increase of routing speed - is no longer relevant because of the usage of [[Application-specific integrated circuit|ASIC]], TCAM and CAM based switching. Therefore the major usage of MPLS is to implement limited traffic engineering and Layer 3/Layer 2 “service provider type” VPNs over existing IPv4 networks. The only competitors to MPLS are technologies like [[L2TPv3]] that also provide services such as service provider Layer 2 and Layer 3 VPNs.
 
The hub and spoke multipoint LSP ([[HSMP LSP]]) was also introduced by IETF. HSMP LSP is mainly used for multicast, time synchronization, and other purposes.
[[IEEE 1355]] is a completely unrelated technology that does something similar in hardware.
 
==Relationship to Internet Protocol==
IPv6 references:
MPLS works in conjunction with the Internet Protocol (IP) and its routing protocols, usually [[interior gateway protocol]]s (IGPs). MPLS LSPs provide dynamic, transparent virtual networks with support for traffic engineering, the ability to transport layer-3 (IP) VPNs with overlapping address spaces, and support for layer-2 [[pseudowire]]s using [[Pseudowire Emulation Edge-to-Edge]] (PWE3){{Ref RFC|3985}} that are capable of transporting a variety of transport payloads ([[IPv4]], [[IPv6]], ATM, Frame Relay, etc.). MPLS-capable devices are referred to as LSRs. The paths an LSR knows can be defined using explicit hop-by-hop configuration, or are dynamically routed by the [[Constrained Shortest Path First]] (CSPF) algorithm, or are configured as a loose route that avoids a particular IP address or that is partly explicit and partly dynamic.
Grosetete, Patrick, IPv6 over MPLS, Cisco Systems 2001;
Juniper Networks IPv6 and Infranets White Paper;
Juniper Networks DoD's Research and Engineering Community White Paper.
 
In a pure IP network, the shortest path to a destination is chosen even when the path becomes congested. Meanwhile, in an IP network with MPLS Traffic Engineering CSPF routing, constraints such as the RSVP bandwidth of the traversed links can also be considered, such that the shortest path with available bandwidth will be chosen. MPLS Traffic Engineering relies upon the use of TE extensions to [[Open Shortest Path First]] (OSPF) or [[Intermediate System to Intermediate System]] (IS-IS) and RSVP. In addition to the constraint of RSVP bandwidth, users can also define their own constraints by specifying link attributes and special requirements for tunnels to route (or not to route) over links with certain attributes.<ref>{{cite book|title=MPLS Fundamentals|isbn=978-1587051975| pages=249–326|last1=Ghein|first1=Luc De|year=2007|publisher=Cisco Press }}</ref>
==References==
<div class="references-small">
<references />
</div>
 
For end-users the use of MPLS is not visible directly, but can be assumed when doing a [[traceroute]]: only nodes that do ''full'' IP routing are shown as hops in the path, thus not the MPLS nodes used in between, therefore when you see that a packet ''hops'' between two very distant nodes and hardly any other ''hop'' is seen in that provider's network (or [[Autonomous System (Internet)|AS]]) it is very likely that network uses MPLS.
==Books==
 
* "Deploying IP and MPLS QoS for Multiservice Networks: Theory and Practice" by John Evans, Clarence Filsfils (Morgan Kaufmann, 2007, ISBN 0-12-370549-5)
===MPLS local protection===
{{Main|MPLS local protection}}
In the event of a network element failure when recovery mechanisms are employed at the IP layer, restoration may take several seconds which may be unacceptable for real-time applications such as [[VoIP]].<ref name="aslam">{{Citation|author=Aslam |title=NPP: A Facility Based Computation Framework for Restoration Routing Using Aggregate Link Usage Information|url=http://cat.inist.fr/?aModele=afficheN&cpsidt=16546516|version=QoS-IP 2005 : quality of service in multiservice IP network|date=2005-02-02|access-date=2006-10-27|postscript=.|display-authors=etal}}</ref><ref name="raza">{{Citation|author=Raza |title=IEEE International Conference on Communications, 2005. ICC 2005. 2005|chapter=Online routing of bandwidth guaranteed paths with local restoration using optimized aggregate usage information|volume=1|pages=201–207|version=IEEE-ICC 2005|postscript=.|display-authors=etal|doi=10.1109/ICC.2005.1494347|isbn=0-7803-8938-7|year=2005|s2cid=5659648}}</ref><ref name="LiLi">{{Citation|author=Li Li |title=Routing bandwidth guaranteed paths with local restoration in label switched networks|journal=IEEE Journal on Selected Areas in Communications|volume=23|issue=2|pages=437–449|version=IEEE Journal on Selected Areas in Communications|postscript=.|display-authors=etal|doi=10.1109/JSAC.2004.839424|year=2005|s2cid=195347236 }}</ref> In contrast, [[MPLS local protection]] meets the requirements of real-time applications with recovery times comparable to those of [[shortest path bridging]] networks or [[SONET]] rings of less than 50&nbsp;ms.<ref name="aslam"/><ref name="LiLi"/><ref name="Kodialam">{{Citation|author=Kodialam|title=Proceedings IEEE INFOCOM 2001. Conference on Computer Communications. Twentieth Annual Joint Conference of the IEEE Computer and Communications Society (Cat. No.01CH37213)|chapter=Dynamic Routing of Locally Restorable Bandwidth Guaranteed Tunnels using Aggregated Link Usage Information|volume=1|pages=376–385|version=IEEE Infocom. pp. 376–385. 2001|postscript=.|display-authors=etal|doi=10.1109/INFCOM.2001.916720|isbn=0-7803-7016-3|year=2001|s2cid=13870642}}</ref>
 
==Comparisons==
MPLS can make use of existing ATM network or Frame Relay infrastructure, as its labeled flows can be mapped to ATM or Frame Relay virtual-circuit identifiers, and vice versa.
 
===Frame Relay===
[[Frame Relay]] aimed to make more efficient use of existing physical resources, which allow for the underprovisioning of data services by [[telecommunications companies]] (telcos) to their customers, as clients were unlikely to be utilizing a data service 100 percent of the time. Consequently, [[oversubscription]] of capacity by the telcos, while financially advantageous to the provider, can directly affect overall performance.
 
Telcos often sold Frame Relay to businesses looking for a cheaper alternative to [[dedicated line]]s; its use in different geographic areas depended greatly on governmental and telecommunication companies' policies.
 
Many customers migrated from Frame Relay to MPLS over IP or Ethernet, which in many cases reduced costs and improved manageability and performance of their wide area networks.<ref>{{Cite web|url=http://www.icact.org/upload/2010/0264/20100264_finalpaper.pdf|title=A Study on Any Transport over MPLS (AToM)|last=Tran Cong Hung, Le Quoc Cuong, Tran Thi Thuy Mai|date=10 Feb 2019|website=International Conference on Advanced Communications Technology|access-date=5 February 2020}}</ref>
 
===Asynchronous Transfer Mode===
While the underlying protocols and technologies are different, both MPLS and [[Asynchronous Transfer Mode|ATM]] provide a connection-oriented service for transporting data across computer networks. In both technologies, connections are signaled between endpoints, the connection state is maintained at each node in the path, and encapsulation techniques are used to carry data across the connection. Excluding differences in the signaling protocols (RSVP/LDP for MPLS and [[PNNI]] for ATM) there still remain significant differences in the behavior of the technologies.
 
The most significant difference is in the transport and encapsulation methods. MPLS is able to work with variable-length packets while ATM uses fixed-length (53 bytes) cells. Packets must be segmented, transported and re-assembled over an ATM network using an adaptation layer, which adds significant complexity and overhead to the data stream. MPLS, on the other hand, simply adds a label to the head of each packet and transmits it on the network.
 
Differences exist, as well, in the nature of the connections. An MPLS connection (LSP) is unidirectional, allowing data to flow in only one direction between two endpoints. Establishing two-way communications between endpoints requires a pair of LSPs be established. Because two LSPs are used, data flowing in the forward direction may use a different path from data flowing in the reverse direction. ATM point-to-point connections (virtual circuits), on the other hand, are [[Two-way communication|bidirectional]], allowing data to flow in both directions over the same path.{{efn|Both SVC and PVC ATM connections are bidirectional.<ref>[[ITU-T]] I.150 3.1.3.1</ref>}}
 
Both ATM and MPLS support tunneling of connections inside connections. MPLS uses label stacking to accomplish this while ATM uses ''virtual paths''. MPLS can stack multiple labels to form tunnels within tunnels. The ATM virtual path indicator (VPI) and virtual circuit indicator (VCI) are both carried together in the cell header, limiting ATM to a single level of tunneling.
 
The biggest advantage that MPLS has over ATM is that it was designed from the start to be complementary to IP. Modern routers can support both MPLS and IP natively across a common interface allowing network operators great flexibility in [[network design]] and operation. ATM's incompatibilities with IP require complex adaptation, making it comparatively less suitable for today's predominantly IP networks.
 
==Deployment==
MPLS is standardized by the IETF in {{IETF RFC|3031}}. It is deployed to connect as few as two facilities to very large deployments. In practice, MPLS is mainly used to forward [[Internet Protocol|IP]] protocol data units (PDUs) and [[Virtual Private LAN Service]] (VPLS) Ethernet traffic. Major applications of MPLS are telecommunications traffic engineering, and [[MPLS VPN]].
 
== Evolution ==
MPLS was originally proposed to allow high-performance traffic forwarding and [[Traffic engineering (telecommunications)|traffic engineering]] in IP networks. However, it evolved in [[Generalized MPLS]] (GMPLS) to also allow the creation of LSPs in non-native IP networks, such as [[SONET|SONET/SDH networks]] and [[wavelength switched optical network]]s.
 
==Competing protocols==
MPLS can exist in both an [[IPv4]] and an [[IPv6]] environment, using appropriate routing protocols. The major goal of MPLS development was the increase of routing speed.<ref>{{Cite news|url=https://www.802101.com/is-mpls-faster/|title=Is MPLS faster?|date=2017-08-04|work=www.802101.com|access-date=2017-08-05|language=en-US}}</ref> This goal is no longer relevant<ref>{{Cite book|title=Advanced MPLS design and implementation|last=Alwayn, Vivek.|date=2002|publisher=Cisco Press|isbn=158705020X|___location=Indianapolis, Ind.|oclc=656875465}}</ref> because of the usage of newer switching methods such as [[ASIC]], [[Content-addressable memory#Ternary CAMs|TCAM]] and [[Content-addressable memory|CAM]]-based switching able to forward plain IPv4 as fast as MPLS labeled packets.<ref>{{Cite web|url=https://forums.juniper.net/t5/Routing/An-Informal-Guide-to-the-Engines-of-Packet-Forwarding/ta-p/401192|title=An Informal Guide to the Engines of Packet Forwarding|last=Salah M. S. Buraiky|date=December 2018|website=Juniper Forums}}</ref> Now, therefore, the main benefit<ref>{{Cite web|url=https://archive.nanog.org/meetings/nanog49/presentations/Sunday/mpls-nanog49.pdf|title=MPLS for Dummies|last=Richard A Steenbergen|date=June 13–16, 2010|website=NANOG}}</ref> of MPLS is to implement limited traffic engineering and layer 3 or layer 2 service provider type VPNs over IPv4 networks.<ref>{{Cite book|url=http://www.surfer.mauigateway.com/library/JNCIA_studyguide.pdf|title=Juniper JNCIA Study Guide|last=Joseph M. Soricelli with John L. Hammond, Galina Diker Pildush, Thomas E. Van Meter, Todd M. Warble|date=June 2003|publisher=Wiley |isbn=0-7821-4071-8}}</ref>
 
== Notes ==
{{Notelist}}
 
== References ==
{{Reflist}}
 
== Further reading ==
* "Deploying IP and MPLS QoS for Multiservice Networks: Theory and Practice" by John Evans, Clarence Filsfils (Morgan Kaufmann, 2007, {{ISBN|0-12-370549-5}})
* Rick Gallaher's MPLS Training Guide ({{ISBN|1932266003}})
 
== External links ==
* [http://tools.ietf.org/wg/mpls/ MPLS Working Group], IETF.
* http://www.mplstutorial.com/: A page containing simple and starter mpls tutorial.
* [http://www.broadband-forum.org/index.php?option=com_sppagebuilder&view=page&id=185 MPLS IP Specifications], Broadband Forum.
* http://www.riverstonenet.com/support/mpls/intro_to_mpls.htm Clearly defined with graphics
* [https://web.archive.org/web/20170505045143/http://meetings.ripe.net/ripe-39/presentations/mpls-arch/sld005.html A brief history of MPLS], RIPE
* http://www.telcoiq.com/services/mpls Research options from different MPLS Providers
 
* http://www.ietf.org/html.charters/mpls-charter.html
* http://www.mplsforum.org/
* http://www.mplssecurity.org
* [http://www.netcraftsmen.net/welcher/papers/mplsvpn.html Using MPLS for VPNs]
* http://www.mplsrc.com/index.shtml
* http://www.qosdesign.com/en/index.htm - NEST IP/MPLS Software Suite for Network Planning, Design & Optimisation
* http://www.software-data-solutions.com/ipmpls.htm Powerful IP/MPLS modelling tool
* http://gitaca.unex.es/opensimmpls Powerful IPv4/MPLS network simulator.
* [http://www.rennes.enst-bretagne.fr/~gbertran/pages/tutorials_ns.html http://www.rennes.enst-bretagne.fr/~gbertran/pages/tutorials_ns.html] A page containing decent tutorial for MPLS simulations with the Network Simulator (NS-2).
* [http://sourceforge.net/projects/mpls-linux/ sourceforge.net/projects/mpls-linux] mpls-linux project
* [http://www.elcom.pub.ro/~adrian.popa/mpls-linux/mpls-linux-docs/ mpls-linux-docs] documentation and examples of the mpls-linux project
[[Category:MPLS networking]]
[[Category:Internet standardsStandards]]
[[Category:Network protocols]]
[[Category:Tunneling protocols]]
 
[[cs:Mpls]]
[[de:Multiprotocol Label Switching]]
[[es:MPLS]]
[[fr:Multiprotocol Label Switching]]
[[hr:MPLS]]
[[id:MPLS]]
[[it:Multi Protocol Label Switching]]
[[nl:Multi Protocol Label Switching]]
[[ja:Multi-Protocol Label Switching]]
[[no:Multiprotocol Label Switching]]
[[pl:Multiprotocol Label Switching]]
[[pt:MPLS]]
[[ru:MPLS]]
[[fi:MPLS]]
[[tr:MPLS]]