Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Multiprotocol Label Switching
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Operation== MPLS works by prefixing packets with an MPLS header, containing one or more labels. This is called a label [[stack (data structure)|stack]]. {{APHD|start|title=MPLS packet structure}} {{APHD|0|bits1=32|field1=MPLS Label [1]}} {{APHD|4|bits1=32|background1=linen|field1=MPLS Label [2]}} {{APHD|999|bits1=32|background1=linen|field1=⋮}} {{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: {{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 | url-access = subscription }}</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 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> ===Equipment=== {{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 an LSR receives a packet, it uses the label included in the packet header as an index to determine the [[Per-hop behavior|next hop]] on the label-switched path (LSP) and a corresponding label for the packet from a [[Label Information Base]]. The old label is then removed from the header and replaced with the new label before the packet is routed forward. ====Label edge router==== 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. ====Provider router==== 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=== 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=== 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=== 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> 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. * 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. 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. 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. 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 |url-access=subscription}}</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|url-access=subscription}}</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: * 0: Explicit-null for IPv4 * 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. ====Label-switched path==== 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. 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). 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. When [[link protection]] is considered, LSPs can be categorized as primary (working), secondary (backup) and tertiary (LSP of last resort). ===Installing and removing paths=== 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=== 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. 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)