RFC 9491

Integration of the Network Service Header (NSH) and Segment Routing for Service Function Chaining (SFC)

๐Ÿ“… published November 2023, from ietf

๐Ÿ“œ RFC 9491: Integration of the Network Service Header (NSH) and Segment Routing for Service Function Chaining (SFC) ๐ŸŽ€

okay bestie, this one is literally about getting two of my favourite protocol brains to work together ๐Ÿง ๐Ÿ’– NSH (the Network Service Header) and Segment Routing (SR) are like two iconic besties who are both amazing on their own, and this doc is the story of how they tag-team a service chain without stepping on each other's toes ๐Ÿ’…โœจ

Quick glance at the title block so you know what you're looking at ๐Ÿ‘€๐ŸŽ€

  • Who wrote it: J. Guichard, Ed. (Futurewei Technologies) and J. Tantsura, Ed. (Nvidia) ๐Ÿงš
  • Category: Standards Track ๐Ÿ”ฅ (so this is a real, official spec, not just vibes)
  • Date: November 2023 ๐Ÿ“…
  • Obsoletes / Updates: nothing listed in the header, so it's a fresh start, no drama ๐ŸŒธ
  • Status: an Internet Standards Track document, reviewed publicly and approved by the IESG ๐Ÿ‘‘

Abstract โœจ

okay so the big idea, no cap ๐Ÿ’… This document describes how the Network Service Header (NSH) and Segment Routing (SR) can be integrated, including the encapsulation details, so Service Function Chaining (SFC) works efficiently while still keeping the service plane and the transport plane separate, which is exactly what the SFC architecture was designed to do ๐Ÿฆ‹

Here's the vibe check: SR handles steering packets between Service Function Forwarders (SFFs) along a Service Function Path (SFP) ๐Ÿ›ฃ๏ธ Meanwhile NSH is the one keeping the service plane intact, plus the SFC instance context and any metadata that rides along ๐ŸŽ€ It's giving teamwork ๐Ÿซถ

The payoff is really satisfying ngl ๐Ÿ˜ญ A network operator gets to pick whichever transport technology makes sense in each part of their network, and they can still have an end-to-end service plane running on NSH ๐Ÿ‘‘ Iconic flexibility, periodt ๐Ÿ’œ


Status of This Memo ๐Ÿ“‹

This is an Internet Standards Track document ๐ŸŒˆ

It's an IETF product and it represents the consensus of the IETF community. It went through public review and got the green light from the Internet Engineering Steering Group (IESG) ๐Ÿ’… If you want more on what Internet Standards are, check Section 2 of RFC 7841 ๐Ÿงš

Want the current status, any errata, or a way to send feedback? Head to https://www.rfc-editor.org/info/rfc9491 ๐Ÿ”—


Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved ๐Ÿ”’

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date. Please actually read those, bestie, because they spell out your rights and restrictions for this document ๐Ÿ“œ Code Components pulled out of this document have to include the Revised BSD License text described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as the Revised BSD License describes ๐Ÿ’–


Table of Contents ๐Ÿ—บ๏ธ

1.  Introduction
  1.1.  SFC Overview and Rationale
  1.2.  Requirements Language
2.  SFC within Segment Routing Networks
3.  NSH-Based SFC with SR-MPLS or the SRv6 Transport Tunnel
4.  SR-Based SFC with the Integrated NSH Service Plane
5.  Packet Processing for SR-Based SFC
  5.1.  SR-Based SFC (SR-MPLS) Packet Processing
  5.2.  SR-Based SFC (SRv6) Packet Processing
6.  Encapsulation
  6.1.  NSH Using SR-MPLS Transport
  6.2.  NSH Using SRv6 Transport
7.  Security Considerations
8.  Backwards Compatibility
9.  Caching Considerations
10. MTU Considerations
11. IANA Considerations
  11.1.  Protocol Number for the NSH
  11.2.  SRv6 Endpoint Behavior for the NSH
12. References
  12.1.  Normative References
  12.2.  Informative References
Contributors
Authors' Addresses

1. Introduction โœจ

1.1. SFC Overview and Rationale ๐ŸŒธ

Okay so picture this: the way packets get treated when they enter a network with advanced Service Functions (SFs) has become a huge challenge for operators ๐Ÿ˜ญ Dynamically enforcing a service-derived, appropriate forwarding policy is the whole game now ๐ŸŽฎ

The example they give is cascading SFs at the Third Generation Partnership Project (3GPP) Gi interface (the N6 interface in 5G architecture), and it's honestly a mess ๐Ÿ™ˆ Three big problems came up: 1) every SF needs the same classification features built in, 2) some SFs get traffic they're never supposed to touch (think TCP proxies getting UDP traffic, which hurts their sizing and performance), and 3) it gets really complicated to invoke several SFs in the right order ๐Ÿ’€

So the fix is to decouple the service topology from the physical network, which makes service delivery way simpler โœจ That's what SFC techniques are for, and they're specified in [RFC7665] ๐Ÿงš

SFC is all about rationalizing service delivery logic and cutting down complexity, while also speeding up service activation for operators who need agile delivery to keep up with demanding customers ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ With SFC, operators can dynamically create service planes for specific traffic flows, and each plane is built by chaining the right service functions in the right sequence ๐Ÿฆ‹ [RFC7498] gives the big-picture overview of the SFC problem space, and [RFC7665] describes the SFC data plane architecture ๐Ÿ“š The SFC architecture doesn't assume anything about how advanced features (like load balancing, or loose versus strict service paths) get enabled inside a domain, so operators have lots of deployment options to fit their different contexts ๐ŸŒˆ

There are many ways to encode the info SFC needs ๐Ÿคฏ You could carry a service chain pointer, encode a list of loose or explicit paths, or spread a service chain identifier along with a set of context information. Likewise, the channel that carries that SFC info has options too: a new header, existing packet header fields, or an IPv6 extension header ๐Ÿ’… Out of all these, the IETF made a transport-independent SFC encapsulation scheme called NSH [RFC8300] ๐Ÿ‘‘ It's pragmatic, because it doesn't force anyone to redo the whole specification effort for each underlying transport encapsulation ๐Ÿ™Œ It also makes consistent SFC-based service delivery possible even when different transport protocols run in different network segments, or between SFFs versus SF-SFF hops ๐Ÿซถ

1.2. Requirements Language ๐ŸŽ€

Here's the important bit, bestie ๐Ÿ”ฅ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174], but only when they appear in all capitals, exactly as shown here ๐Ÿ’–


2. SFC within Segment Routing Networks ๐Ÿฆ‹

So [RFC8300] explains how to encapsulate the NSH directly inside a link-layer header ๐Ÿ”— In this document, IANA assigned IP protocol number 145 to the NSH, so it can also be encapsulated directly inside an IP header โœจ The procedures that come next lean on that property ๐Ÿ’…

As [RFC8402] describes, SR uses the source-routing technique ๐Ÿงญ A node steers a packet through an SR policy, which is built as an ordered list of instructions called segments ๐ŸŽ€ SR was first designed for policy-based source routing, but it also shows up in supporting SFC [SERVICE-PROGRAMMING] ๐ŸŒธ

The two SR data plane encapsulations, SR-MPLS [RFC8660] and Segment Routing over IPv6 (SRv6) [RFC8754], can both encode an SF as a segment, so a whole service function chain can be written as a segment list ๐Ÿงš But, as [RFC7498] points out, traffic steering is only one slice of the problems SFC was built to solve ๐Ÿ™ˆ Other things matter too, like simplifying classification at intermediate SFs, and letting SFs coordinate their behaviour by sharing context information (a.k.a. metadata) ๐Ÿ’œ Those should be on your radar when you design an SFC data plane solution ๐Ÿ‘€

NSH-based SFC and SR-based SFC can each work on their own, but this document shows how they can team up and complement each other through two representative application scenarios ๐Ÿซถ Both scenarios can run over either SR-MPLS or SRv6 ๐ŸŒˆ

NSH-based SFC with the SR-based transport plane: In this scenario, SR-MPLS or SRv6 handles the transport encapsulation between SFFs, while the NSH is what carries and triggers the SFC policies ๐Ÿš€

SR-based SFC with the integrated NSH service plane: In this scenario, every service hop in the chain is represented as a segment in the SR segment list ๐Ÿ›ค๏ธ SR takes care of steering traffic through the necessary SFFs as part of the segment routing path, while the NSH keeps the service plane going and holds the SFC instance context (including any associated metadata) ๐ŸŽ€

And yes, you can totally combine both scenarios if a specific deployment or use case needs it ๐Ÿ’…โœจ

A classifier MUST use one NSH Service Path Identifier (SPI) for each SR policy ๐Ÿ”ฅ That way, different traffic flows can share the same NSH Service Function Path (SFP), and different SR policies can coexist on that same SFP without conflicting during SFF processing ๐Ÿ’–


๐Ÿซถ that's the end of part 1, bestie! more coming in the next parts, so stay tuned ๐ŸŽ€โœจ

3. NSH-Based SFC with SR-MPLS or the SRv6 Transport Tunnel โœจ

okay bestie, so NSH-based service function chains don't care what transport they ride on, which means the NSH is expected to be super useful across all kinds of network domains (access, core, the whole vibe) ๐Ÿ’–. For example, the service functions (SFs) in a chain could all chill in one data center, or be spread out across multiple locations like data centers and different Points of Presence (POPs), depending on what the network operator prefers and what service resources are available ๐ŸŒธ. Wherever the SFs live, you still need traffic steering through a set of SFFs, and when NSH and SR team up, that steering is handled by SR-MPLS or SRv6 ๐Ÿฆ‹.

Let's walk through an example ๐Ÿ‘‘. Flow F has SF instances in two data centers, DC1 and DC2. For this example, the SFC's NSH SPI is 100 and the initial Service Index (SI) is 255 ๐Ÿงš.

Referring to Figure 1, packets of flow F in DC1 get classified into an NSH-based service function chain. After classification they're encapsulated as <Inner Pkt><NSH: SPI 100, SI 255><Outer-transport> and forwarded to SFF1, which is the first SFF hop for this chain ๐Ÿ’….

After the outer transport encapsulation is removed, SFF1 uses the SPI and SI carried in the NSH encapsulation to determine that it should forward the packet to SF1. SF1 applies its service, decrements the SI by 1, and returns the packet to SFF1. So SFF1 has <SPI 100, SI 254> when the packet comes back from SF1. SFF1 does a lookup on <SPI 100, SI 254>, which results in <next-hop: DC1-GW1>, and forwards the packet to DC1-GW1 ๐ŸŽ€.

   +--------------------------- DC1 ----------------------------+
   |                          +-----+                           |
   |                          | SF1 |                           |
   |                          +--+--+                           |
   |                             |                              |
   |                             |                              |
   |        +------------+       |    +------------+            |
   |        | N(100,255) |       |    | N(100,254) |            |
   |        +------------+       |    +------------+            |
   |        | F:Inner Pkt|       |    | F:Inner Pkt|            |
   |        +------------+  ^    |  | +------------+            |
   |                    (2) |    |  | (3)                       |
   |                        |    |  v                           |
   |                  (1)        |         (4)                  |
   |+------------+   ---->    +--+---+    ---->     +---------+ |
   ||            |    NSH     |      |     NSH      |         | |
   || Classifier +------------+ SFF1 +--------------+ DC1-GW1 + |
   ||            |            |      |              |         | |
   |+------------+            +------+              +---------+ |
   |                                                            |
   |             +------------+       +------------+            |
   |             | N(100,255) |       | N(100,254) |            |
   |             +------------+       +------------+            |
   |             | F:Inner Pkt|       | F:Inner Pkt|            |
   |             +------------+       +------------+            |
   |                                                            |
   +------------------------------------------------------------+

                   Figure 1: SR for Inter-DC SFC - Part 1

Now Figure 2 ๐ŸŒˆ. DC1-GW1 does a lookup using the information in the NSH, which results in <next-hop: DC2-GW1, encapsulation: SR>. The SR encapsulation, which may be SR-MPLS or SRv6, carries the SR segment list that forwards the packet across the inter-DC network to DC2.

                     +----------- Inter DC ----------------+
              (4)    |                (5)                  |
   +------+  ---->   | +---------+   ---->     +---------+ |
   |      |   NSH    | |         |     SR      |         | |
   + SFF1 +----------|-+ DC1-GW1 +-------------+ DC2-GW1 + |
   |      |          | |         |             |         | |
   +------+          | +---------+             +---------+ |
                     |                                     |
                     |          +------------+             |
                     |          | S(DC2-GW1) |             |
                     |          +------------+             |
                     |          | N(100,254) |             |
                     |          +------------+             |
                     |          | F:Inner Pkt|             |
                     |          +------------+             |
                     +-------------------------------------+

                   Figure 2: SR for Inter-DC SFC - Part 2

When the packet arrives at DC2, as shown in Figure 3, the SR encapsulation is removed, and DC2-GW1 does a lookup on the NSH, which results in next hop: SFF2. When SFF2 gets the packet, it does a lookup on <NSH: SPI 100, SI 254> and decides to forward it to SF2. SF2 applies its service, decrements the SI by 1, and returns the packet to SFF2, so SFF2 has <NSH: SPI 100, SI 253> when the packet comes back from SF2. SFF2 does a lookup on <NSH: SPI 100, SI 253>, which results in the end of the service function chain ๐Ÿ.

                   +------------------------ DC2 ----------------------+
                   |                         +-----+                   |
                   |                         | SF2 |                   |
                   |                         +--+--+                   |
                   |                            |                      |
                   |                            |                      |
                   |        +------------+      |    +------------+    |
                   |        | N(100,254) |      |    | N(100,253) |    |
                   |        +------------+      |    +------------+    |
                   |        | F:Inner Pkt|      |    | F:Inner Pkt|    |
                   |        +------------+  ^   |  | +------------+    |
                   |                    (7) |   |  | (8)               |
                   |                        |   |  v                   |
             (5)   |                 (6)        |     (9)              |
+---------+  --->  | +----------+   ---->    +--+---+ ---->            |
|         |   SR   | |          |    NSH     |      |  IP              |
+ DC1-GW1 +--------|-+ DC2-GW1  +------------+ SFF2 |                  |
|         |        | |          |            |      |                  |
+---------+        | +----------+            +------+                  |
                   |                                                   |
                   |           +------------+      +------------+      |
                   |           | N(100,254) |      | F:Inner Pkt|      |
                   |           +------------+      +------------+      |
                   |           | F:Inner Pkt|                          |
                   |           +------------+                          |
                   +---------------------------------------------------+

                Figure 3: SR for Inter-DC SFC - Part 3

Why is this scheme so iconic? Here's the tea ๐Ÿซ–:

  • The network operator gets to take advantage of the transport-independent nature of the NSH encapsulation while the service is provisioned end-to-end. ๐Ÿ’œ
  • The network operator gets to take advantage of the traffic-steering (traffic-engineering) capability of SR where appropriate. ๐Ÿ”ฅ
  • There's a clear division of responsibility and scope between the NSH and SR. ๐Ÿซถ

Note that this scenario applies to any case where multiple segments of a service function chain are distributed across multiple domains, or where traffic-engineered paths are necessary between SFFs (strict forwarding paths, for example). Also, the example above can be implemented using end-to-end segment routing between SFF1 and SFF2, no cap ๐Ÿ™ˆ. (As such, DC-GW1 and DC-GW2 are forwarding the packets based on segment routing instructions and are not looking at the NSH header for forwarding.) ๐Ÿง 

4. SR-Based SFC with the Integrated NSH Service Plane โœจ

Okay so in this scenario, we're assuming the SFs are NSH-aware ๐Ÿ’… which means we don't need an SFC proxy to get SFC working. The vibe is that SR-MPLS or SRv6 handles the SFF-to-SFF transport, and the NSH provides the service plane between SFs. That way the SFC context (like the service plane path the SPI points to) and any metadata stick around the whole time ๐ŸŽ€

So when a service function chain gets set up, a packet on that chain shows up carrying an NSH. The NSH keeps the end-to-end service plane going through the SFC context ๐Ÿฆ‹ An SFF uses that SFC context to figure out the SR segment list for sending the packet on to the next-hop SFFs. Then the packet gets wrapped in the SR header and sent through the SR domain like normal SR stuff ๐ŸŒธ

When a packet needs to go to an SF attached to an SFF, the SFF looks up the segment identifier (SID) tied to that SF ๐Ÿ‘€ With SR-MPLS, that's a Prefix-SID [RFC8402]. With SRv6, the behavior in this document is called END.NSH, and Section 11.2 covers how IANA hands out the code point ๐Ÿงš The lookup gives the SFF the next-hop context between it and the SF, like the destination Media Access Control (MAC) address if Ethernet encapsulation is being used between them ๐Ÿ’– Also, the SFF strips the SR info off the packet, updates it, and stashes it in a cache indexed by the NSH Service Path Identifier (SPI) and the Service Index (SI) minus 1. That saved SR info is what gets used to wrap and forward the packets that come back from the SF โœจ

The "remember the segment list" move happens at the very end of the regular logic, and the "reattach the segment list" move happens right before the SR process forwards the packet to the next entry in the list. Both get the full breakdown in Section 5 ๐Ÿซถ

When the SF gets the packet, it processes it like usual. If the SF is sitting with a classifier, the already-processed packet might get reclassified ๐Ÿ™ˆ The SF then sends the packet back to the SFF. Once the SFF gets it back, it pulls the SR info out using the NSH SPI and SI as the key into the cache. Then it pushes the saved SR header on top of the NSH header and forwards the packet to the next segment in the list ๐Ÿ’… Heads up though: the cache lookup could fail if reclassification at the SF changed the NSH SPI and/or SI into values that aren't in the SFF cache. In that case, the SFF must generate an error and drop the packet ๐Ÿ’€

Figure 4 shows what this looks like ๐Ÿ‘‡

                    +-----+                       +-----+
                    | SF1 |                       | SF2 |
                    +--+--+                       +--+--+
                       |                             |
                       |                             |
         +-----------+ | +-----------+ +-----------+ | +-----------+
         |N(100,255) | | |N(100,254) | |N(100,254) | | |N(100,253) |
         +-----------+ | +-----------+ +-----------+ | +-----------+
         |F:Inner Pkt| | |F:Inner Pkt| |F:Inner Pkt| | |F:Inner Pkt|
         +-----------+ | +-----------+ +-----------+ | +-----------+
                 (2) ^ | (3) |                 (5) ^ | (6) |
                     | |     |                     | |     |
                     | |     |                     | |     |
             (1)     | |     v      (4)            | |     v (7)
+------------+   --->    +-+----+      ---->          +---+--+   -->
|            | NSHoverSR |      |    NSHoverSR        |      |    IP
| Classifier +-----------+ SFF1 +---------------------+ SFF2 |
|            |           |      |                     |      |
+------------+           +------+                     +------+

         +------------+        +------------+        +------------+
         |   S(SF1)   |        |   S(SF2)   |        | F:Inner Pkt|
         +------------+        +------------+        +------------+
         |   S(SFF2)  |        | N(100,254) |
         +------------+        +------------+
         |   S(SF2)   |        | F:Inner Pkt|
         +------------+        +------------+
         | N(100,255) |
         +------------+
         | F:Inner Pkt|
         +------------+

                Figure 4: NSH over SR for SFC

So why's this scheme so good? Let me count the ways ๐Ÿ“

  • It's economically sound for SF vendors to only support one unified SFC solution. The SF is unaware of the SR. ๐Ÿ’œ
  • It simplifies the SFF (i.e., the SR router) by nullifying the needs for reclassification and SR proxy. โœจ
  • SR is also used for forwarding purposes, including between SFFs. ๐Ÿฆ‹
  • It takes advantage of SR to eliminate the NSH forwarding state in SFFs. This applies each time strict or loose SFPs are in use. ๐Ÿ‘‘
  • It requires no interworking, as would be the case if SR-MPLS-based SFC and NSH-based SFC were deployed as independent mechanisms in different parts of the network. ๐ŸŒˆ

5. Packet Processing for SR-Based SFC ๐ŸŽ€

Here we cover the End.NSH behavior (SRv6), the Prefix-SID behavior (SR-MPLS), and the NSH processing logic ๐Ÿ’–

5.1. SR-Based SFC (SR-MPLS) Packet Processing ๐ŸŒธ

When an SFF gets a packet destined to S, and S is a local Prefix-SID tied to an SF, the SFF strips the SR segment list (label stack) off the packet, updates the SR info, and saves it in a cache indexed by the NSH Service Path Identifier (SPI) and the Service Index (SI) minus 1. That saved SR info is then used to re-encapsulate and forward the packets coming back from the SF ๐Ÿซถ

5.2. SR-Based SFC (SRv6) Packet Processing ๐Ÿงš

This section describes the End.NSH behavior and NSH processing logic for SRv6. The pseudocode is below ๐Ÿ‘‡

When N receives a packet destined to S, and S is a local End.NSH SID, the processing is the same as that specified by [RFC8754], Section 4.3.1.1, up through line S15.

After S15, if S is a local End.NSH SID, then:

S15.1.         Remove and store IPv6 and SRH headers in local cache
               indexed by <NSH: service-path-id, service-index -1>
S15.2.         Submit the packet to the NSH FIB lookup and transmit
               to the destination associated with <NSH:
               service-path-id, service-index>

   |  Note: The End.NSH behavior interrupts the normal SRH packet
   |  processing, as described in [RFC8754], Section 4.3.1.1, which
   |  does not continue to S16 at this time.

When a packet comes back to the SFF from the SF, reattach the cached IPv6 and SRH headers based on the <NSH: service-path-id, service-index> from the NSH header. Then resume processing from [RFC8754], Section 4.3.1.1 with line S16 ๐Ÿฆ‹


6. Encapsulation ๐ŸŒˆ

6.1. NSH Using SR-MPLS Transport ๐Ÿ’œ

SR-MPLS instantiates segment identifiers (SIDs) as MPLS labels, so the segment routing header is a stack of MPLS labels ๐Ÿ“

When an NSH is carried within an SR-MPLS transport, the full encapsulation headers look like Figure 5 โœจ

                    +------------------+
                    ~   SR-MPLS Labels ~
                    +------------------+
                    |   NSH Base Hdr   |
                    +------------------+
                    | Service Path Hdr |
                    +------------------+
                    ~     Metadata     ~
                    +------------------+

             Figure 5: NSH Using SR-MPLS Transport

As described in [RFC8402], "[t]he IGP signaling extension for IGP-Prefix segment includes a flag to indicate whether directly connected neighbors of the node on which the prefix is attached should perform the NEXT operation or the CONTINUE operation when processing the SID." ๐Ÿค“ So when an NSH rides beneath SR-MPLS, the NSH-based SFC has to end at the tail-end node of the SR-MPLS label stack ๐Ÿ˜ญ That can be done with either the NEXT or CONTINUE operation.

If the NEXT operation is used, then at the end of the SR-MPLS path, the tail end has to be given an indication that the NSH follows the SR-MPLS label stack, as described by [RFC8596] ๐Ÿซถ

If the CONTINUE operation is used, that's the equivalent of MPLS Ultimate Hop Popping (UHP). So it's necessary to make sure the penultimate hop node doesn't pop the top label of the SR-MPLS label stack, because that would expose the NSH to the wrong SFF ๐Ÿ™ˆ This is handled by setting the No Penultimate Hop Popping (No-PHP) flag in the Prefix-SID Sub-TLV [RFC8667] [RFC8665]. It is RECOMMENDED that a specific Prefix-SID be allocated at each node for use by the SFC application for this purpose ๐Ÿ’…

6.2. NSH Using SRv6 Transport ๐Ÿฆ‹

okay bestie, so when the NSH rides inside an SRv6 transport, the whole encapsulation looks like Figure 6 ๐Ÿ’…โœจ

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Last Entry   |     Flags     |              Tag              | S
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ e
   |                                                               | g
   |            Segment List[0] (128-bit IPv6 address)             | m
   |                                                               | e
   |                                                               | n
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ t
   |                                                               |
   |                                                               | R
   ~                              ...                              ~ o
   |                                                               | u
   |                                                               | t
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ i
   |                                                               | n
   |            Segment List[n] (128-bit IPv6 address)             | g
   |                                                               |
   |                                                               | S
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ R
   //                                                             // H
   //         Optional Type Length Value objects (variable)       //
   //                                                             //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Ver|O|U|    TTL    |   Length  |U|U|U|U|MD Type| Next Protocol |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ N
   |          Service Path Identifier              | Service Index | S
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ H
   |                                                               |
   ~              Variable-Length Context Headers  (opt.)          ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Figure 6: NSH Using SRv6 Transport

the way the NSH gets wrapped up after SRv6 is signalled by the IP protocol number for the NSH, and that number goes in the Next Header of the SRH. main character energy ๐ŸŒธ


7. Security Considerations ๐Ÿ”’

the generic SFC security stuff lives in [RFC7665] ๐Ÿงš

the NSH-specific security considerations are in [RFC8300] ๐Ÿ’œ

and the generic segment routing security considerations are in Section 7 of [RFC8754] and Section 5 of [RFC8663]. read them, bestie, this part is serious ๐Ÿ˜ญ


8. Backwards Compatibility ๐ŸŽ€

for SRv6/IPv6, if a processing node doesn't recognise the NSH, it should follow the procedures in Section 4 of [RFC8200] ๐Ÿซถ

for SR-MPLS, if a processing node doesn't recognise the NSH, it should follow the procedures laid out in Section 3.18 of [RFC3031] ๐Ÿ“


9. Caching Considerations ๐ŸŒˆ

the cache mechanism must remove cached entries at an appropriate time that the implementation decides on, okay? โฐ Further, an implementation MAY allow network operators to set that time value, so operators get a say ๐Ÿ‘‘

and here's the important bit ๐Ÿšจ: if a packet shows up from an SF and there's no matching cached entry, the SFF SHOULD log the event and MUST drop the packet. no matching entry, no packet, periodt ๐Ÿ’€


10. MTU Considerations ๐Ÿฆ‹

aligned with Section 5 of [RFC8300] and Section 5.3 of [RFC8754], it is RECOMMENDED for network operators to bump up the underlying MTU so SR/NSH traffic gets forwarded inside an SR domain without fragmentation. no fragmenting drama, please ๐Ÿ™โœจ


11. IANA Considerations ๐Ÿ“š

11.1. Protocol Number for the NSH ๐Ÿ”ข

IANA has assigned protocol number 145 for the NSH [RFC8300] in the "Assigned Internet Protocol Numbers" registry <https://www.iana.org/assignments/protocol-numbers/> ๐Ÿ’–

    +=========+=========+================+================+===========+
    | Decimal | Keyword | Protocol       | IPv6 Extension | Reference |
    |         |         |                | Header         |           |
    +=========+=========+================+================+===========+
    | 145     | NSH     | Network        | N              | RFC 9491  |
    |         |         | Service Header |                |           |
    +---------+---------+----------------+----------------+-----------+

Table 1: Assigned Internet Protocol Numbers Registry

11.2. SRv6 Endpoint Behavior for the NSH ๐ŸŒŸ

IANA has allocated the following value in the "SRv6 Endpoint Behaviors" subregistry under the "Segment Routing" registry ๐Ÿ’…

      +=======+========+===================+===========+============+
      | Value | Hex    | Endpoint Behavior | Reference | Change     |
      |       |        |                   |           | Controller |
      +=======+========+===================+===========+============+
      | 84    | 0x0054 | End.NSH - NSH     | RFC 9491  | IETF       |
      |       |        | Segment           |           |            |
      +-------+--------+-------------------+-----------+------------+

Table 2: SRv6 Endpoint Behaviors Subregistry


12. References ๐Ÿ“–

12.1. Normative References ๐Ÿ’œ

12.2. Informative References ๐Ÿฆ‹


Contributors ๐Ÿซถ

The following coauthors provided valuable inputs and text contributions to this document ๐Ÿ’–

Mohamed Boucadair
Orange
Email: mohamed.boucadair@orange.com

Joel Halpern
Ericsson
Email: joel.halpern@ericsson.com

Syed Hassan
Cisco System, inc.
Email: shassan@cisco.com

Wim Henderickx
Nokia
Email: wim.henderickx@nokia.com

Haoyu Song
Futurewei Technologies
Email: haoyu.song@futurewei.com

Authors' Addresses โœจ

James N Guichard (editor)
Futurewei Technologies
2330 Central Expressway
Santa Clara, CA
United States of America
Email: james.n.guichard@futurewei.com

Jeff Tantsura (editor)
Nvidia
United States of America
Email: jefftant.ietf@gmail.com
๐Ÿ“ฆ where this page comes from