RFC 3032

MPLS Label Stack Encoding

๐Ÿ“… published January 2001, from ietf

RFC 3032: MPLS Label Stack Encoding ๐ŸŽ€

okay bestie, this is RFC 3032, MPLS Label Stack Encoding, and it's a Standards Track doc from January 2001 ๐Ÿฆ‹ It's written by a whole squad: E. Rosen, D. Tappan, and G. Fedorkow from Cisco Systems, Inc., Y. Rekhter from Juniper Networks, D. Farinacci and T. Li from Procket Networks, Inc., and A. Conta from TranSwitch Corporation. The title block doesn't have any "Obsoletes" or "Updates" line, so it isn't replacing or changing another RFC ๐Ÿ’…


Status of this Memo โœจ

so this doc is an Internet standards track protocol for the Internet community, and it's basically asking for discussion and suggestions for improvements ๐Ÿซถ If you want to know where it stands officially, check the current edition of the "Internet Official Protocol Standards" (STD 1). And the distribution of this memo is unlimited, so everyone can read it ๐Ÿ’œ

Copyright (C) The Internet Society (2001). All Rights Reserved. ๐ŸŒธ

Abstract

okay, so the vibe here is that MPLS, "Multi-Protocol Label Switching (MPLS)" [1], needs a bunch of procedures for adding "label stacks" onto network layer packets, which turns them into "labeled packets" ๐Ÿงš Routers that do MPLS are called "Label Switching Routers", or "LSRs" ๐Ÿ”ฅ

To send a labeled packet over a data link, an LSR has to have an encoding technique that takes a label stack plus a network layer packet and spits out a labeled packet โœจ This doc lays out the encoding an LSR uses to send labeled packets over Point-to-Point Protocol (PPP) data links, LAN data links, and possibly other data links too ๐ŸŒˆ On some links, the label at the top of the stack might be encoded differently, but the techniques described here MUST be used to encode the rest of the label stack ๐Ÿ’€ It also covers the rules for processing the fields of the label stack encoding, so it's giving full coverage ๐Ÿ‘‘

Table of Contents

    1      Introduction  ...........................................  2
    1.1    Specification of Requirements  ..........................  3
    2      The Label Stack  ........................................  3
    2.1    Encoding the Label Stack  ...............................  3
    2.2    Determining the Network Layer Protocol  .................  5
    2.3    Generating ICMP Messages for Labeled IP Packets  ........  6
    2.3.1  Tunneling through a Transit Routing Domain  .............  7
    2.3.2  Tunneling Private Addresses through a Public Backbone  ..  7
    2.4    Processing the Time to Live Field  ......................  8
    2.4.1  Definitions  ............................................  8
    2.4.2  Protocol-independent rules  .............................  8
    2.4.3  IP-dependent rules  .....................................  9
    2.4.4  Translating Between Different Encapsulations  ...........  9
    3      Fragmentation and Path MTU Discovery  ................... 10
    3.1    Terminology  ............................................ 11
    3.2    Maximum Initially Labeled IP Datagram Size  ............. 12
    3.3    When are Labeled IP Datagrams Too Big?  ................. 13
    3.4    Processing Labeled IPv4 Datagrams which are Too Big  .... 13
    3.5    Processing Labeled IPv6 Datagrams which are Too Big  .... 14
    3.6    Implications with respect to Path MTU Discovery  ........ 15
    4      Transporting Labeled Packets over PPP  .................. 16
    4.1    Introduction  ........................................... 16
    4.2    A PPP Network Control Protocol for MPLS  ................ 17
    4.3    Sending Labeled Packets  ................................ 18
    4.4    Label Switching Control Protocol Configuration Options  . 18
    5      Transporting Labeled Packets over LAN Media  ............ 18
    6      IANA Considerations  .................................... 19
    7      Security Considerations  ................................ 19
    8      Intellectual Property  .................................. 19
    9      Authors' Addresses  ..................................... 20
   10      References  ............................................. 22
   11      Full Copyright Statement  ............................... 23

1. Introduction ๐Ÿฆ‹

so the Abstract's intro stuff is repeated here: "Multi-Protocol Label Switching (MPLS)" [1] needs procedures for augmenting network layer packets with "label stacks", turning them into "labeled packets" โœจ MPLS routers are "Label Switching Routers", or "LSRs" ๐Ÿ’– To send a labeled packet on a data link, an LSR needs an encoding technique that, given a label stack and a network layer packet, produces a labeled packet ๐ŸŒธ

this doc specifies the encoding an LSR uses to send labeled packets on PPP data links and LAN data links ๐Ÿซถ The encoding might also be useful for other data links, no cap ๐ŸŒˆ

it also gives the rules and procedures for processing the fields of the label stack encoding ๐Ÿงš MPLS doesn't care which network layer protocol you're using, so most of the procedures are protocol-independent, but a few do change depending on the protocol. Here we cover the protocol-independent procedures, plus the protocol-dependent ones for IPv4 and IPv6 ๐ŸŽ€

some LSRs on certain switching devices (like ATM switches) might encode the top one or two entries of the label stack in a different way ๐Ÿ”ฅ But when the label stack has more entries than that, the encoding technique described in this document MUST be used for those additional label stack entries ๐Ÿ’…

1.1. Specification of Requirements ๐Ÿ’œ

the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [2] ๐Ÿ“š ngl this is the bit that tells you how strict every requirement is ๐Ÿ™ˆ

2. The Label Stack ๐ŸŒˆ

2.1. Encoding the Label Stack โœจ

okay so the label stack is a sequence of "label stack entries" ๐Ÿงš Each entry is 4 octets, and it's shown in Figure 1 ๐Ÿ‘‘

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label
|                Label                  | Exp |S|       TTL     | Stack
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Entry

                    Label:  Label Value, 20 bits
                    Exp:    Experimental Use, 3 bits
                    S:      Bottom of Stack, 1 bit
                    TTL:    Time to Live, 8 bits

                              Figure 1

the label stack entries show up AFTER the data link layer headers, but BEFORE any network layer headers ๐Ÿฆ‹ The top of the stack is earliest in the packet, and the bottom is latest. The network layer packet comes right after the label stack entry that has the S bit set ๐Ÿ’–

each label stack entry has these fields:

  1. Bottom of Stack (S)

this bit is set to one for the last entry in the label stack (aka the bottom of the stack), and zero for every other entry ๐Ÿ“

  1. Time to Live (TTL)

this eight-bit field encodes a time-to-live value. Its processing is described in section 2.4 โฐ

  1. Experimental Use

this three-bit field is reserved for experimental use ๐Ÿงช

  1. Label Value

this 20-bit field carries the actual value of the Label ๐Ÿซถ

when a labeled packet comes in, the label value at the top of the stack gets looked up ๐Ÿ‘€ A successful lookup tells you:

  • a) the next hop the packet gets forwarded to;
  • b) the operation to do on the label stack before forwarding. That could be replacing the top label stack entry with another, popping an entry off the stack, or replacing the top entry and then pushing one or more more entries on the stack ๐Ÿ”ฅ

along with the next hop and the label stack operation, you might also learn the outgoing data link encapsulation, plus other info you need to forward the packet properly ๐Ÿ’…

there are several reserved label values:

  • i. A value of 0 represents the "IPv4 Explicit NULL Label". This label value is only legal at the bottom of the label stack. It means the label stack must be popped, and then forwarding has to be based on the IPv4 header ๐Ÿ’€
  • ii. A value of 1 represents the "Router Alert Label". This label value is legal anywhere in the label stack except at the bottom. When a received packet has this label value at the top of the stack, it gets delivered to a local software module for processing. Where the packet actually goes is decided by the label beneath it in the stack. But if the packet is forwarded further, the Router Alert Label should be pushed back onto the label stack before forwarding. This is kind of like the "Router Alert Option" in IP packets [5] ๐ŸŒธ Since this label can't be at the bottom of the stack, it isn't tied to any particular network layer protocol โœจ
  • iii. A value of 2 represents the "IPv6 Explicit NULL Label". This label value is only legal at the bottom of the label stack. It means the label stack must be popped, and then forwarding has to be based on the IPv6 header ๐Ÿงš
  • iv. A value of 3 represents the "Implicit NULL Label". This is a label an LSR may assign and distribute, but it never actually shows up in the encapsulation ๐Ÿ™ˆ When an LSR would normally replace the label at the top of the stack with a new label, but that new label is "Implicit NULL", the LSR pops the stack instead of doing the replacement. Even though this value never appears in the encapsulation, it needs to be specified in the Label Distribution Protocol, so a value is reserved for it ๐ŸŽ€
  • v. Values 4-15 are reserved. ๐ŸŒˆ

Dang, that's the whole first chunk, and it's giving everything you need to start reading the rest of the spec ๐Ÿซถ

2.2. Determining the Network Layer Protocol ๐Ÿฆ‹

okay so bestie, when the last label gets popped off a packet's label stack (so the stack is totally empty now ๐Ÿ’€), the packet still needs more processing, and that processing is based on its network layer header. ๐Ÿงš The LSR that pops that last label has to be able to figure out which network layer protocol the packet is using. Here's the tea though: the label stack has NO field that says which network layer protocol it is ๐Ÿ˜ญ. So the protocol has to be guessable from the label value that got popped off the bottom of the stack, maybe combined with what's inside the network layer header itself.

So when the first label gets pushed onto a network layer packet, the label has to be one that's used ONLY for packets of one particular network layer, OR one that's used ONLY for a specified set of network layer protocols, where you can tell the packets apart by peeking at the network layer header ๐Ÿ‘€. And if that label gets swapped for a different label value during the packet's trip, the new value has to follow the same rules too ๐Ÿ’…. If these conditions aren't met, the LSR that pops the last label won't be able to tell what protocol the packet is using. Not it. ๐Ÿ™…โ€โ™€๏ธ

Adherence to these conditions doesn't automatically let intermediate nodes figure out a packet's network layer protocol. Usually that's not needed ๐ŸŒธ, but there are error situations where it's super useful. Like, if an intermediate LSR decides a labeled packet can't be delivered, it might want to send error messages that are specific to that packet's network layer โœจ. The only clues that intermediate LSR has are the top label and the network layer header. So if intermediate nodes are going to be able to generate protocol-specific error messages for labeled packets, EVERY label in the stack has to meet the criteria we just talked about for labels at the bottom of the stack. Iconic behavior, honestly ๐Ÿ‘‘.

If a packet can't be forwarded for some reason (for example, it's bigger than the data link MTU ๐Ÿ“), and either its network layer protocol can't be identified, or there are no protocol-dependent rules for handling that error, then the packet MUST be silently discarded ๐Ÿซถ.

2.3. Generating ICMP Messages for Labeled IP Packets ๐ŸŽ€

Section 2.4 and section 3 talk about situations where it's desirable to generate ICMP messages for labeled IP packets ๐Ÿ’œ. For a particular LSR to generate an ICMP packet and send it back to the source of the IP packet, two things have to be true:

  1. The LSR has to be able to tell that a particular labeled packet is an IP packet ๐Ÿ”ฅ;
  2. The LSR has to be able to route to the packet's IP source address ๐Ÿ—บ๏ธ.

Condition 1 is covered in section 2.2. The next two subsections are about condition 2 ๐Ÿ’…. Heads up though, sometimes condition 2 just doesn't hold at all, and in those cases the ICMP message simply can't be generated ๐Ÿ˜ญ.

2.3.1. Tunneling through a Transit Routing Domain ๐Ÿš‡

Picture this: you're using MPLS to "tunnel" through a transit routing domain, and the external routes don't get leaked into the domain's interior routers ๐Ÿ‘€. For example, the interior routers might be running OSPF and only know how to reach destinations inside that OSPF domain. The domain could have several Autonomous System Border Routers (ASBRs) that talk BGP to each other ๐ŸŒˆ. But in this example, the routes from BGP don't get distributed into OSPF, and the LSRs that aren't ASBRs don't run BGP at all ๐Ÿ™ˆ.

So in this setup, only an ASBR knows how to route back to the source of some random packet. If an interior router needs to send an ICMP message to the source of an IP packet, it won't know how to route that ICMP message ๐Ÿ’€.

One fix is to have one or more of the ASBRs inject "default" into the IGP. (N.B.: this does NOT require that there be a "default" carried by BGP ๐Ÿค“.) That makes sure any unlabeled packet that has to leave the domain (like an ICMP packet) gets sent to a router with full routing information ๐Ÿงš. Those routers will label the packets before sending them back through the transit domain, so using default routing inside the transit domain doesn't cause any loops ๐Ÿ”.

This fix only works for packets with globally unique addresses, and for networks where all the ASBRs have complete routing information ๐Ÿ’–. The next subsection describes a solution for when those conditions don't hold ๐Ÿ‘‘.

2.3.2. Tunneling Private Addresses through a Public Backbone ๐ŸŒธ

In some cases where MPLS is used to tunnel through a routing domain, it might not be possible to route to the source address of a fragmented packet at all ๐Ÿ˜ญ. For example, this would happen if the IP addresses in the packet were private (not globally unique) addresses, and MPLS was tunneling those packets through a public backbone. Default routing to an ASBR won't work in this environment ๐Ÿ™…โ€โ™€๏ธ.

In this environment, to send an ICMP message to the source of a packet, you can copy the label stack from the original packet to the ICMP message, and then label switch the ICMP message โœจ. This makes the message head in the direction of the original packet's destination, NOT its source ๐Ÿงญ. Unless the message gets label switched all the way to the destination host, it'll end up unlabeled in a router that does know how to route to the source of the original packet ๐ŸŽฏ. At that point the message gets sent in the proper direction ๐Ÿฆ‹.

This technique can be super useful if the ICMP message is a "Time Exceeded" message or a "Destination Unreachable because fragmentation needed and DF set" message ๐Ÿ’….

When you copy the label stack from the original packet to the ICMP message, the label values have to be copied EXACTLY ๐Ÿ”’. The TTL values in the label stack should be set to the TTL value that goes in the IP header of the ICMP message ๐Ÿซถ. That TTL should be long enough to cover the roundabout route the ICMP message has to take ๐ŸŒ.

Note that if a packet's TTL expires because of a routing loop, then with this technique the ICMP message may loop too ๐ŸŒ€. But an ICMP message is never sent as a result of receiving an ICMP message, and lots of implementations throttle how fast ICMP messages get generated, so this isn't expected to be a problem ๐Ÿ™Œ.

2.4. Processing the Time to Live Field โฐ

2.4.1. Definitions ๐Ÿ“–

The "incoming TTL" of a labeled packet is defined as the value of the TTL field in the top label stack entry when the packet is received ๐ŸŽ€.

The "outgoing TTL" of a labeled packet is defined as the larger of:

  1. one less than the incoming TTL,
  2. zero. ๐Ÿงฎ

2.4.2. Protocol-independent rules ๐ŸŒˆ

If the outgoing TTL of a labeled packet is 0, then the labeled packet MUST NOT be forwarded any further; and the label stack MUST NOT be stripped off and the packet forwarded as an unlabeled packet either ๐Ÿ›‘. The packet's lifetime in the network is considered expired ๐Ÿ’€.

Depending on the label value in the label stack entry, the packet MAY be simply discarded, or it may be passed to the appropriate "ordinary" network layer for error processing (for example, to generate an ICMP error message, see section 2.3) ๐Ÿ“.

When a labeled packet is forwarded, the TTL field of the label stack entry at the top of the label stack MUST be set to the outgoing TTL value ๐Ÿ’–.

Note that the outgoing TTL value depends solely on the incoming TTL value, and it doesn't matter whether any labels get pushed or popped before forwarding ๐Ÿงš. The TTL field in any label stack entry that isn't at the top of the stack has no significance at all ๐Ÿซง.

2.4.3. IP-dependent rules ๐ŸŒท

We define the "IP TTL" field as the value of the IPv4 TTL field, or the value of the IPv6 Hop Limit field, whichever applies ๐ŸŒ.

When an IP packet is first labeled, the TTL field of the label stack entry MUST BE set to the value of the IP TTL field ๐Ÿ”ข. (If the IP TTL field needs to be decremented as part of IP processing, it's assumed that this has already been done ๐Ÿ™Œ.)

When a label is popped and the resulting label stack is empty, the value of the IP TTL field SHOULD BE replaced with the outgoing TTL value, as defined above โœจ. In IPv4, this also requires modifying the IP header checksum ๐Ÿงฎ.

It's recognized that some network administrators may prefer to decrement the IPv4 TTL by one as it crosses an MPLS domain, instead of decrementing it by the number of LSP hops within the domain ๐Ÿคทโ€โ™€๏ธ.

2.4.4. Translating Between Different Encapsulations ๐Ÿ”€

Sometimes an LSR may receive a labeled packet over, for example, a label switching controlled ATM (LC-ATM) interface [9], and may need to send it out over a PPP or LAN link ๐Ÿ›ธ. In that case, the incoming packet won't be received using the encapsulation specified in this document, but the outgoing packet will be sent using the encapsulation specified in this document ๐Ÿ’Œ. Here, the value of the "incoming TTL" is determined by the procedures used for carrying labeled packets on, for example, LC-ATM interfaces ๐Ÿ“ฌ. TTL processing then proceeds as described above ๐Ÿ’….

Sometimes an LSR may receive a labeled packet over a PPP or a LAN link, and may need to send it out, say, an LC-ATM interface ๐ŸŒŠ. Then the incoming packet will be received using the encapsulation specified in this document, but the outgoing packet won't be sent using that encapsulation ๐Ÿ™ƒ. In this case, the procedure for carrying the value of the "outgoing TTL" is determined by the procedures used for carrying labeled packets on, for example, LC-ATM interfaces ๐ŸŽ€.

3. Fragmentation and Path MTU Discovery โœจ

okay so, just like an unlabeled IP datagram can be too big for the link it's heading out on, a labeled packet can be too big for its output link too ๐Ÿ˜ญ

It's also possible for a packet (labeled or unlabeled) that fit on a link just fine to become too big, because one or more extra labels got pushed onto its label stack. In label switching, a packet can grow when more labels get pushed on. So if you receive a labeled packet with a 1500-byte frame payload and push on one more label, you have to forward it as a frame with a 1504-byte payload ๐Ÿซ 

This section lays out the rules for handling labeled packets that are "too large" ๐ŸŽ€ It makes sure that hosts doing Path MTU Discovery [4] and hosts using IPv6 [7,8] can generate IP datagrams that don't need fragmentation, even when those datagrams get labeled along the way.

Generally, IPv4 hosts that don't do Path MTU Discovery [4] send IP datagrams with no more than 576 bytes. Since most data links today have MTUs of 1500 bytes or more, the chance that those datagrams need fragmenting, even after labeling, is super tiny ๐Ÿ’…

Some hosts without Path MTU Discovery [4] will send 1500-byte datagrams, as long as the IP Source and Destination addresses are on the same subnet. Those datagrams don't pass through routers, so they never get fragmented ๐ŸŒธ

Unfortunately, some hosts will send 1500-byte datagrams as long as the IP Source and Destination addresses have the same classful network number. This is the one case where there's any risk of fragmentation when those datagrams get labeled. (Even then, fragmentation isn't likely unless the packet has to cross some kind of ethernet between the time it first gets labeled and the time it gets unlabeled ๐Ÿ™ˆ)

This document specifies procedures that let you configure the network so that large datagrams from hosts without Path MTU Discovery get fragmented just once, right when they're first labeled. With suitable configuration, these procedures make it possible to avoid any need to fragment packets that have already been labeled โœจ

3.1. Terminology

With respect to a particular data link, we can use the following terms ๐Ÿฆ‹

  • Frame Payload: The contents of a data link frame, excluding any data link layer headers or trailers (e.g., MAC headers, LLC headers, 802.1Q headers, PPP header, frame check sequences, etc.). When a frame is carrying an unlabeled IP datagram, the Frame Payload is just the IP datagram itself. When a frame is carrying a labeled IP datagram, the Frame Payload consists of the label stack entries and the IP datagram.
  • Conventional Maximum Frame Payload Size: The maximum Frame Payload size allowed by data link standards. For example, the Conventional Maximum Frame Payload Size for ethernet is 1500 bytes.
  • True Maximum Frame Payload Size: The maximum size frame payload that can be sent and received properly by the interface hardware attached to the data link. On ethernet and 802.3 networks, it is believed that the True Maximum Frame Payload Size is 4-8 bytes larger than the Conventional Maximum Frame Payload Size (as long as neither an 802.1Q header nor an 802.1p header is present, and as long as neither can be added by a switch or bridge while a packet is in transit to its next hop). For example, it is believed that most ethernet equipment could correctly send and receive packets carrying a payload of 1504 or perhaps even 1508 bytes, at least, as long as the ethernet header does not have an 802.1Q or 802.1p field. On PPP links, the True Maximum Frame Payload Size may be virtually unbounded.
  • Effective Maximum Frame Payload Size for Labeled Packets: This is either the Conventional Maximum Frame Payload Size or the True Maximum Frame Payload Size, depending on the capabilities of the equipment on the data link and the size of the data link header being used.
  • Initially Labeled IP Datagram: Suppose that an unlabeled IP datagram is received at a particular LSR, and that the LSR pushes on a label before forwarding the datagram. Such a datagram is called an Initially Labeled IP Datagram at that LSR.
  • Previously Labeled IP Datagram: An IP datagram that had already been labeled before it was received by a particular LSR.

3.2. Maximum Initially Labeled IP Datagram Size

Every LSR that is capable of:

  • a) receiving an unlabeled IP datagram,
  • b) adding a label stack to the datagram, and
  • c) forwarding the resulting labeled packet,

SHOULD support a configuration parameter known as the "Maximum Initially Labeled IP Datagram Size", which can be set to a non-negative value ๐Ÿ“

If this configuration parameter is set to zero, it has no effect.

If it's set to a positive value, it gets used like this. If:

  • a) an unlabeled IP datagram is received, and
  • b) that datagram does not have the DF bit set in its IP header, and
  • c) that datagram needs to be labeled before being forwarded, and
  • d) the size of the datagram (before labeling) exceeds the value of the parameter,

then:

  • a) the datagram must be broken into fragments, each of whose size is no greater than the value of the parameter, and
  • b) each fragment must be labeled and then forwarded.

For example, if this configuration parameter is set to a value of 1488, then any unlabeled IP datagram containing more than 1488 bytes will be fragmented before being labeled. Each fragment will be capable of being carried on a 1500-byte data link, without further fragmentation, even if as many as three labels are pushed onto its label stack ๐Ÿงš

In other words, setting this parameter to a non-zero value lets you eliminate all fragmentation of Previously Labeled IP Datagrams, but it may cause some unnecessary fragmentation of Initially Labeled IP Datagrams.

Note that the setting of this parameter does not affect the processing of IP datagrams that have the DF bit set, so the result of Path MTU discovery is unaffected by the setting of this parameter ๐Ÿ’œ


3.3. When are Labeled IP Datagrams Too Big?

A labeled IP datagram whose size exceeds the Conventional Maximum Frame Payload Size of the data link over which it is to be forwarded MAY be considered to be "too big" ๐Ÿ‘‘

A labeled IP datagram whose size exceeds the True Maximum Frame Payload Size of the data link over which it is to be forwarded MUST be considered to be "too big" ๐Ÿ”ฅ

A labeled IP datagram that is not "too big" MUST be transmitted without fragmentation ๐Ÿซถ

3.4. Processing Labeled IPv4 Datagrams which are Too Big

If a labeled IPv4 datagram is "too big", and the DF bit is not set in its IP header, then the LSR MAY silently discard the datagram ๐Ÿฆ‹

Note that discarding such datagrams is a sensible procedure only if the "Maximum Initially Labeled IP Datagram Size" is set to a non-zero value in every LSR in the network that is capable of adding a label stack to an unlabeled IP datagram ๐Ÿ’…

If the LSR chooses not to discard a labeled IPv4 datagram that is too big, or if the DF bit is set in that datagram, then it MUST execute the following algorithm:

  1. Strip off the label stack entries to obtain the IP datagram.
  2. Let N be the number of bytes in the label stack (i.e., 4 times the number of label stack entries).
  3. If the IP datagram does NOT have the "Don't Fragment" bit set in its IP header:
    • a. convert it into fragments, each of which MUST be at least N bytes less than the Effective Maximum Frame Payload Size.
    • b. Prepend each fragment with the same label header that would have been on the original datagram had fragmentation not been necessary.
    • c. Forward the fragments.
  4. If the IP datagram has the "Don't Fragment" bit set in its IP header:
    • a. the datagram MUST NOT be forwarded.
    • b. Create an ICMP Destination Unreachable Message:
      • i. set its Code field [3] to Fragmentation Required and DF Set,
      • ii. set its Next-Hop MTU field [4] to the difference between the Effective Maximum Frame Payload Size and the value of N.
    • c. If possible, transmit the ICMP Destination Unreachable Message to the source of the discarded datagram ๐Ÿฅบ

3.5. Processing Labeled IPv6 Datagrams which are Too Big

To process a labeled IPv6 datagram that is too big, an LSR MUST execute the following algorithm:

  1. Strip off the label stack entries to obtain the IP datagram.
  2. Let N be the number of bytes in the label stack (i.e., 4 times the number of label stack entries).
  3. If the IP datagram contains more than 1280 bytes (not counting the label stack entries), or if it does not contain a fragment header, then:
    • a. Create an ICMP Packet Too Big Message, and set its Next-Hop MTU field to the difference between the Effective Maximum Frame Payload Size and the value of N.
    • b. If possible, transmit the ICMP Packet Too Big Message to the source of the datagram.
    • c. Discard the labeled IPv6 datagram.
  4. If the IP datagram is not larger than 1280 octets, and it contains a fragment header, then:
    • a. Convert it into fragments, each of which MUST be at least N bytes less than the Effective Maximum Frame Payload Size.
    • b. Prepend each fragment with the same label header that would have been on the original datagram had fragmentation not been necessary.
    • c. Forward the fragments.

Reassembly of the fragments will be done at the destination host ๐ŸŽ€

3.6. Implications with respect to Path MTU Discovery โœจ

okay so this part is lowkey the best bit ๐Ÿซถ The fragmentation rules we just went over have a big effect on Path MTU Discovery from RFC 1191 [4]. Hosts that use it will find an MTU that's small enough to fit n labels on the datagrams with no fragmentation needed, where n is the number of labels that actually get pushed along the path being used right now ๐Ÿงš

So datagrams from hosts doing Path MTU Discovery will never need to be fragmented just because a label header has to go on, or because new labels get added to an existing one ๐Ÿ’… (And honestly, those datagrams usually have the DF bit set anyway, so they never get fragmented regardless, periodt ๐Ÿ’–)

Okay, but here's the catch ๐Ÿ™ˆ Path MTU Discovery only works if, at the point where a labeled IP Datagram would need fragmenting, it's possible to get an ICMP Destination Unreachable message routed back to the packet's source address. See section 2.3.

If it's not possible to forward an ICMP message from inside an MPLS "tunnel" back to the packet's source address, BUT the network setup still lets the LSR at the transmitting end of the tunnel receive packets that have to go through the tunnel and are too big to pass through unfragmented, then:
  • The LSR at the transmitting end of the tunnel MUST be able to determine the MTU of the tunnel as a whole. It MAY do this by sending packets through the tunnel to the tunnel's receiving endpoint, and performing Path MTU Discovery with those packets. ๐Ÿฆ‹
  • Any time the transmitting endpoint of the tunnel needs to send a packet into the tunnel, and that packet has the DF bit set, and it exceeds the tunnel MTU, the transmitting endpoint of the tunnel MUST send the ICMP Destination Unreachable message to the source, with code "Fragmentation Required and DF Set", and the Next-Hop MTU Field set as described above. ๐Ÿ’€

4. Transporting Labeled Packets over PPP ๐ŸŽ€

okay so PPP (the Point-to-Point Protocol) [6] is the standard way to send multi-protocol datagrams over point-to-point links ๐ŸŒธ It has an extensible Link Control Protocol, and it comes with a whole family of Network Control Protocols for setting up and configuring different network-layer protocols ๐Ÿ’œ

This section defines the Network Control Protocol for setting up and configuring label switching over PPP. โœจ

4.1. Introduction ๐ŸŒˆ

PPP has three main components, bestie:

  1. A method for encapsulating multi-protocol datagrams.
  2. A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
  3. A family of Network Control Protocols for establishing and configuring different network-layer protocols.

So here's the vibe ๐Ÿซง To get communications going over a point-to-point link, each end of the PPP link has to send LCP packets first to configure and test the data link. Once the link is set up and any optional facilities have been negotiated as the LCP needs, PPP must send "MPLS Control Protocol" packets to enable sending labeled packets. Once the "MPLS Control Protocol" hits the Opened state, labeled packets can be sent over the link ๐Ÿฆ‹

The link stays configured for communications until explicit LCP or MPLS Control Protocol packets close it down, or until some external event happens (an inactivity timer expires or a network administrator steps in) ๐Ÿ™ˆ

4.2. A PPP Network Control Protocol for MPLS ๐Ÿ’…

The MPLS Control Protocol (MPLSCP) is in charge of enabling and disabling label switching on a PPP link ๐Ÿ‘‘ It uses the same packet exchange mechanism as the Link Control Protocol (LCP). MPLSCP packets may not be exchanged until PPP has reached the Network-Layer Protocol phase. MPLSCP packets received before this phase is reached should be silently discarded.

The MPLS Control Protocol is exactly the same as the Link Control Protocol [6], with the following exceptions:

  1. Frame Modifications ๐Ÿงš

The packet may utilize any modifications to the basic frame format which have been negotiated during the Link Establishment phase.

  1. Data Link Layer Protocol Field ๐Ÿ“

Exactly one MPLSCP packet is encapsulated in the PPP Information field, where the PPP Protocol field indicates type hex 8281 (MPLS).

  1. Code field ๐Ÿ”ฅ

Only Codes 1 through 7 (Configure-Request, Configure-Ack, Configure-Nak, Configure-Reject, Terminate-Request, Terminate-Ack and Code-Reject) are used. Other Codes should be treated as unrecognized and should result in Code-Rejects.

  1. Timeouts โณ

MPLSCP packets may not be exchanged until PPP has reached the Network-Layer Protocol phase. An implementation should be prepared to wait for Authentication and Link Quality Determination to finish before timing out waiting for a Configure-Ack or other response. It is suggested that an implementation give up only after user intervention or a configurable amount of time. ๐Ÿซถ

  1. Configuration Option Types ๐ŸŒธ

None.

4.3. Sending Labeled Packets ๐Ÿฆ‹

Before any labeled packets can be communicated, PPP must reach the Network-Layer Protocol phase, and the MPLS Control Protocol must reach the Opened state. โœจ

Exactly one labeled packet is encapsulated in the PPP Information field, where the PPP Protocol field indicates either type hex 0281 (MPLS Unicast) or type hex 0283 (MPLS Multicast). The maximum length of a labeled packet transmitted over a PPP link is the same as the maximum length of the Information field of a PPP encapsulated packet.

The format of the Information field itself is as defined in section 2.

Note that two codepoints are defined for labeled packets: one for multicast and one for unicast. Once the MPLSCP has reached the Opened state, both label switched multicasts and label switched unicasts can be sent over the PPP link ๐Ÿ’œ

4.4. Label Switching Control Protocol Configuration Options ๐ŸŽ€

There are no configuration options. ๐Ÿ™ƒ


5. Transporting Labeled Packets over LAN Media ๐ŸŒˆ

Exactly one labeled packet is carried in each frame. ๐Ÿ’–

The label stack entries immediately precede the network layer header, and follow any data link layer headers, including, e.g., any 802.1Q headers that may exist. ๐Ÿงš

The ethertype value 8847 hex is used to indicate that a frame is carrying an MPLS unicast packet. ๐Ÿฆ‹

The ethertype value 8848 hex is used to indicate that a frame is carrying an MPLS multicast packet. ๐Ÿซถ

These ethertype values can be used with either the ethernet encapsulation or the 802.3 LLC/SNAP encapsulation to carry labeled packets. The procedure for choosing which of these two encapsulations to use is beyond the scope of this document. ๐Ÿ™ˆ


6. IANA Considerations ๐Ÿ“‹

Label values 0-15 inclusive have special meaning, as specified in this document, or as further assigned by IANA. ๐ŸŒธ

In this document, label values 0-3 are specified in section 2.1. ๐Ÿ’…

Label values 4-15 may be assigned by IANA, based on IETF Consensus. ๐Ÿ‘‘


7. Security Considerations ๐Ÿšจ

okay bestie, this part is serious, so read it carefully ๐Ÿ˜ญ

The MPLS encapsulation that is specified herein does not raise any security issues that are not already present in either the MPLS architecture [1] or in the architecture of the network layer protocol contained within the encapsulation.

There are two security considerations inherited from the MPLS architecture which may be pointed out here:

  • Some routers may implement security procedures which depend on the network layer header being in a fixed place relative to the data link layer header. These procedures will not work when the MPLS encapsulation is used, because that encapsulation is of a variable size. ๐Ÿ’€
  • An MPLS label has its meaning by virtue of an agreement between the LSR that puts the label in the label stack (the "label writer"), and the LSR that interprets that label (the "label reader"). However, the label stack does not provide any means of determining who the label writer was for any particular label. If labeled packets are accepted from untrusted sources, the result may be that packets are routed in an illegitimate manner. ๐Ÿ”ฅ

8. Intellectual Property โญ

The IETF has been notified of intellectual property rights claimed in regard to some or all of the specification contained in this document. For more information consult the online list of claimed rights. ๐ŸŒˆ


9. Authors' Addresses ๐Ÿ’Œ

Eric C. Rosen
Cisco Systems, Inc.
250 Apollo Drive
Chelmsford, MA, 01824

EMail: erosen@cisco.com


Dan Tappan
Cisco Systems, Inc.
250 Apollo Drive
Chelmsford, MA, 01824

EMail: tappan@cisco.com


Yakov Rekhter
Juniper Networks
1194 N. Mathilda Avenue
Sunnyvale, CA 94089

EMail: yakov@juniper.net


Guy Fedorkow
Cisco Systems, Inc.
250 Apollo Drive
Chelmsford, MA, 01824

EMail: fedorkow@cisco.com


Dino Farinacci
Procket Networks, Inc.
3910 Freedom Circle, Ste. 102A
Santa Clara, CA 95054

EMail: dino@procket.com

Tony Li
Procket Networks, Inc.
3910 Freedom Circle, Ste. 102A
Santa Clara, CA 95054

EMail: tli@procket.com


Alex Conta
TranSwitch Corporation
3 Enterprise Drive
Shelton, CT, 06484

EMail: aconta@txc.com

10. References ๐Ÿ“š

  • [1] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol Label Switching Architecture", RFC 3031, January 2001.
  • [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
  • [3] Postel, J., "Internet Control Message Protocol", STD 5, RFC 792, September 1981.
  • [4] Mogul, J. and S. Deering, "Path MTU Discovery", RFC 1191, November 1990.
  • [5] Katz, D., "IP Router Alert Option", RFC 2113, February 1997.
  • [6] Simpson, W., Editor, "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.
  • [7] Conta, A. and S. Deering, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", RFC 1885, December 1995.
  • [8] McCann, J., Deering, S. and J. Mogul, "Path MTU Discovery for IP version 6", RFC 1981, August 1996.
  • [9] Davie, B., Lawrence, J., McCloghrie, K., Rekhter, Y., Rosen, E. and G. Swallow, "MPLS Using LDP and ATM VC Switching", RFC 3035, January 2001.

okay so this part is the legal bit, but make it cute ๐ŸŽ€ The Internet Society owns the copyright (2001), and nobody's rights are being ignored here, bestie ๐Ÿ’…

You're allowed to copy this document and pass it around, and you can even write derivative works that comment on it, explain it, or help people implement it ๐Ÿซถ You can publish those too, in whole or in part, with no restrictions, as long as the copyright notice and this paragraph stay on every copy. ๐ŸŒธ

Here's the catch ๐Ÿ™ˆ This document itself can't be modified in any way. You can't remove the copyright notice or the references to the Internet Society or other Internet organizations. The exceptions are when you need it for developing Internet standards (in which case you follow the copyright procedures in the Internet Standards process) or when you translate it into a language other than English ๐ŸŒ

The limited permissions above last forever, and the Internet Society or its successors or assigns can't take them back ๐Ÿ’œ

This document and everything in it is provided "AS IS" ๐Ÿงš THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE ARE NOT MAKING ANY WARRANTIES, EXPRESS OR IMPLIED. That includes no promise that using the info won't infringe anyone's rights, and no implied warranties of merchantability or fitness for a particular purpose. Totally valid, but also a little dramatic ๐Ÿ’€

Acknowledgement โœจ

Funding for the RFC Editor function is currently provided by the Internet Society. So the people keeping all these RFCs organised are being funded by the Internet Society right now ๐Ÿ“

๐Ÿ“ฆ where this page comes from