RFC 9192
Network Service Header (NSH) Fixed-Length Context Header Allocation
RFC 9192: Network Service Header (NSH) Fixed-Length Context Header Allocation ๐
Okay bestie, RFC 9192 is giving Independent Submission ๐ฆ. It's labelled Informational, so it's published for info and isn't a Standards Track spec โจ. It was written by T. Mizrahi (Huawei), I. Yerushalmi, D. Melman (Marvell), and R. Browne (Intel), and it's dated February 2022. The ISSN is 2070-1721. The header doesn't list anything it obsoletes or updates, so no drama there ๐
Abstract
So the NSH spec gives you two ways to carry metadata: MD Type 0x1 and MD Type 0x2 ๐ง. MD Type 0x1 uses a fixed-length Context Header, and ngl, the structure and semantics of that Context Header never got standardized ๐ญ. This doc fills that gap by defining the Timestamp Context Header, an NSH fixed-length Context Header that carries the packet's timestamp, a sequence number, and a source interface identifier โฐ.
Even though the IETF hasn't standardized this Context Header, several manufacturers have already built it into silicon, so it's published here to help with interoperability ๐ .
Status of This Memo
This document is not an Internet Standards Track specification. It's just published for informational purposes ๐ธ.
This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor chose to publish it at their discretion, and they make no statement about its value for implementation or deployment. Documents the RFC Editor approves for publication aren't candidates for any level of Internet Standard, see Section 2 of RFC 7841 ๐.
Info about the current status of this document, any errata, and how to give feedback can be found at https://www.rfc-editor.org/info/rfc9192 ๐.
Copyright Notice
Copyright (c) 2022 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) in effect on the date of publication of this document. Please read these carefully, because they describe your rights and restrictions with respect to this document ๐.
Table of Contents
1. Introduction
2. Terminology
2.1. Requirements Language
2.2. Abbreviations
3. NSH Timestamp Context Header Allocation
4. Timestamping Use Cases
4.1. Network Analytics
4.2. Alternate Marking
4.3. Consistent Updates
5. Synchronization Considerations
6. IANA Considerations
7. Security Considerations
8. References
8.1. Normative References
8.2. Informative References
Acknowledgments
Authors' Addresses
1. Introduction ๐ฆ
The Network Service Header (NSH), defined in [RFC8300], is an encapsulation header. It's the service encapsulation used in the Service Function Chaining (SFC) architecture [RFC7665] โจ.
To share metadata (MD) along a service path, the NSH spec [RFC8300] gives you two methods: a fixed-length Context Header (MD Type 0x1) and a variable-length Context Header (MD Type 0x2). When you use MD Type 0x1, the NSH carries 16 octets of Context Header fields ๐.
Here's the tea โ: the NSH spec [RFC8300] never defined the semantics of that 16-octet Context Header, and it doesn't say how NSH-aware Service Functions (SFs), Service Function Forwarders (SFFs), and proxies use it. Several Context Header formats are defined in [NSH-TLV]. Some allocation schemes were proposed in the past for specific use cases, e.g., [NSH-DC-ALLOC], [NSH-BROADBAND-ALLOC], and [RFC8592] ๐.
This memo presents an allocation for the MD Type 0x1 Context Header, which incorporates the packet's timestamp, a sequence number, and a source interface identifier. Note that other allocation schema for MD Type 0x1 might be specified in the future. Although those schema aren't being standardized by the SFC Working Group right now, a consistent format (allocation schema) should be used in an SFC-enabled domain so that interoperability is possible ๐ซถ.
In a nutshell, packets that enter the SFC-enabled domain get timestamped by a classifier [RFC7665]. So the timestamp, sequence number, and source interface all end up in the NSH Context Header. As discussed in [RFC8300], if reclassification is used, it may result in an update to the NSH metadata. Specifically, when the Timestamp Context Header is used, a reclassifier may either leave it unchanged or update the three fields: Timestamp, Sequence Number, and Source Interface ๐.
The Timestamp Context Header has three fields that can be used for different things. The Timestamp field may be used for logging, troubleshooting, delay measurement, packet marking for performance monitoring, and timestamp-based policies โฑ๏ธ. The source interface identifier tells you which interface the packet came in through at the classifier. That identifier may specify a physical interface or a virtual one ๐. The sequence numbers can be used by SFs to detect out-of-order delivery or duplicate transmissions ๐ข.
Heads up: out-of-order and duplicate packet detection works when packets are received by the same SF. It's not necessarily possible when there are multiple instances of the same SF and packets are spread across those instances ๐. The sequence number is maintained on a per-source-interface basis.
This document presents the Timestamp Context Header but doesn't specify how the SFs that receive it should function. A few possible use cases are described here, but SF behavior and application are outside the scope of this document ๐ โโ๏ธ.
Key Performance Indicator (KPI) stamping [RFC8592] defines an NSH timestamping mechanism that uses the MD Type 0x2 format. This memo defines a compact MD Type 0x1 Context Header that doesn't need the packet to be extended beyond the NSH ๐ฆ. Also, the mechanisms described in [RFC8592] and this memo can be used together, as further discussed in Section 4.1 ๐ฏโโ๏ธ.
Once again, because it's so important: the definition of the Context Header in this document hasn't been standardized by the IETF, but it has been implemented in silicon by several manufacturers and is published here to facilitate interoperability ๐ .
2. Terminology ๐ง
2.1. Requirements Language
Okay so here's the vibe ๐. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are read as described in BCP 14 [RFC2119] [RFC8174], but only when they show up in all capitals, exactly as shown here ๐.
2.2. Abbreviations
Here are the abbreviations used in this document ๐:
KPI Key Performance Indicator [RFC8592]
MD Metadata [RFC8300]
NSH Network Service Header [RFC8300]
SF Service Function [RFC7665]
SFC Service Function Chaining [RFC7665]
SFF Service Function Forwarder [RFC8300]
3. NSH Timestamp Context Header Allocation โจ
okay so this section is where the actual Context Header gets defined, and it's giving very "here is your fixed-length bag of goodies" energy ๐ this memo defines the following fixed-length Context Header allocation, and you can see the layout in Figure 1 below ๐
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Interface |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Timestamp |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: NSH Timestamp Allocation
the NSH Timestamp allocation defined in this memo MUST include the following fields ๐ธ
Sequence Number: a 32-bit sequence number ๐ฆ it's maintained on a per-source-interface basis, and sequence numbers can be used by SFs to detect out-of-order delivery or duplicate transmissions ๐ the classifier increments it by 1 for each packet received through the source interface, which means the classifier has to keep a per-source-interface counter ๐งฎ the sequence number gets initialized to a random number on startup, and after it reaches its maximal value (2^32-1) it wraps around back to zero ๐
Source Interface: a 32-bit source interface identifier that's assigned by the classifier ๐ the combination of the source interface and the classifier identity is unique within the context of an SFC-enabled domain, so for an SF to use the source interface as a unique identifier, it needs to know the identity of the classifier for each packet ๐ซถ the source interface is unique in the context of the given classifier, so that's the vibe ๐ง
Timestamp: a 64-bit field that specifies the time at which the packet was received by the classifier โฐ there are two possible timestamp formats that can be used for this field: the two 64-bit recommended formats specified in [RFC8877] ๐ one is based on the timestamp format defined in [IEEE1588], and the other is based on the format defined in [RFC5905] โจ
ngl this is the part where you need to know which format your deployment is using, because mixing them up is not it ๐
the NSH specification [RFC8300] does not specify the possible coexistence of multiple MD Type 0x1 Context Header formats in a single SFC-enabled domain ๐ it's assumed that the Timestamp Context Header will be deployed in an SFC-enabled domain that uniquely uses this Context Header format, so operators SHOULD ensure that either a consistent Context Header format is used in the SFC-enabled domain, or there is a clear policy that allows SFs to know the Context Header format of each packet ๐ specifically, operators are expected to ensure the consistent use of a timestamp format across the whole SFC-enabled domain ๐ฃ
the two timestamp formats that can be used in the Timestamp field are as follows ๐ฆ
Truncated Timestamp Format [IEEE1588]: this format is specified in Section 4.3 of [RFC8877] ๐ for the reader's convenience, it's illustrated in Figure 2 ๐ธ
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Seconds |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Nanoseconds |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Truncated Timestamp Format (IEEE 1588)
NTP 64-bit Timestamp Format [RFC5905]: this format is specified in Section 4.2.1 of [RFC8877] ๐ for the reader's convenience, it's illustrated in Figure 3 ๐ซ
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Seconds |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fraction |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: NTP 64-Bit Timestamp Format (RFC 5905)
synchronization aspects of the timestamp format in the context of the NSH Timestamp allocation are discussed in Section 5 ๐ฐ๏ธ
4. Timestamping Use Cases ๐
4.1. Network Analytics ๐
per-packet timestamping enables coarse-grained monitoring of network delays along the Service Function Chain ๐ once a potential problem or bottleneck is detected (for example, when the delay exceeds a certain policy), a highly granular monitoring mechanism can be triggered (for example, using the hop-by-hop measurement data defined in [RFC8592] or [IOAM-DATA]), which allows analysis and localization of the problem ๐
timestamping is also useful for logging, troubleshooting, and flow analytics ๐ it's often useful to maintain the timestamp of the first and last packet of the flow ๐ furthermore, traffic mirroring and sampling often require a timestamp to be attached to analyzed packets ๐ช attaching the timestamp to the NSH provides an in-band common time reference that can be used for various network analytics applications, which is seriously iconic ๐
4.2. Alternate Marking ๐จ
a possible approach for passive performance monitoring is to use an Alternate-Marking Method [RFC8321] ๐ฆ this method requires data packets to carry a field that marks (colors) the traffic, and enables passive measurement of packet loss, delay, and delay variation ๐ the value of this marking field is periodically toggled between two values ๐
when the timestamp is incorporated in the NSH, it can intrinsically be used for Alternate Marking ๐ for example, the least significant bit of the timestamp Seconds field can be used for this purpose, since the value of this bit is inherently toggled every second โฑ๏ธ
4.3. Consistent Updates ๐
the timestamp can be used for making policy decisions, such as 'Perform action A if timestamp>=T_0' ๐ง this can be used for enforcing time-of-day policies or periodic policies in SFs ๐ furthermore, timestamp-based policies can be used for enforcing consistent network updates, as discussed in [DPT] ๐ ๏ธ it should be noted that, as in the case of Alternate Marking, this use case alone does not require a full 64-bit timestamp but could be implemented with a significantly smaller number of bits ๐ค
5. Synchronization Considerations โฐ
some of the applications that make use of the timestamp require the classifier and SFs to be synchronized to a common time reference -- for example, using the Network Time Protocol [RFC5905] or the Precision Time Protocol [IEEE1588] ๐ although it is NOT a requirement to use a clock synchronization mechanism, it is expected that, depending on the applications that use the timestamp, such synchronization mechanisms will be used in most deployments that use the Timestamp allocation ๐ค
wait, I need to be precise here: the original text says it is not a requirement to use clock sync, so don't read this as "you must sync" ๐
6. IANA Considerations ๐
this document has no IANA actions ๐ธ
7. Security Considerations ๐
the security considerations for the NSH in general are discussed in [RFC8300] ๐ก๏ธ the NSH is typically run within a confined trust domain ๐ฐ however, if a trust domain is not enough to provide the operator with protection against the timestamp threats as described below, then the operator SHOULD use transport-level protection between SFC processing nodes as described in [RFC8300] ๐
the security considerations of in-band timestamping in the context of the NSH are discussed in [RFC8592]; this section is based on that discussion ๐
in-band timestamping, as defined in this document and [RFC8592], can be used as a means for network reconnaissance ๐ต๏ธโโ๏ธ by passively eavesdropping on timestamped traffic, an attacker can gather information about network delays and performance bottlenecks ๐ฑ an on-path attacker can maliciously modify timestamps in order to attack applications that use the timestamp values, such as performance-monitoring applications ๐จ
since the timestamping mechanism relies on an underlying time synchronization protocol, by attacking the time protocol an attack can potentially compromise the integrity of the NSH Timestamp ๐ a detailed discussion about the threats against time protocols and how to mitigate them is presented in [RFC7384] ๐
8. References ๐
8.1. Normative References ๐
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function Chaining (SFC) Architecture", RFC 7665, DOI 10.17487/RFC7665, October 2015, <https://www.rfc-editor.org/info/rfc7665>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
- [RFC8300] Quinn, P., Ed., Elzur, U., Ed., and C. Pignataro, Ed., "Network Service Header (NSH)", RFC 8300, DOI 10.17487/RFC8300, January 2018, <https://www.rfc-editor.org/info/rfc8300>.
- [RFC8877] Mizrahi, T., Fabini, J., and A. Morton, "Guidelines for Defining Packet Timestamps", RFC 8877, DOI 10.17487/RFC8877, September 2020, <https://www.rfc-editor.org/info/rfc8877>.
8.2. Informative References ๐
Okay, bestie, these are the extra reads that back up the story. Not strictly required to build the thing, but the receipts are right here ๐
- [DPT] Mizrahi, T. and Y. Moses, "The Case for Data Plane Timestamping in SDN", IEEE INFOCOM Workshop on Software-Driven Flexible and Agile Networking (SWFAN), DOI 10.1109/INFCOMW.2016.7562197, 2016, <https://ieeexplore.ieee.org/document/7562197>.
- [IEEE1588] IEEE, "IEEE 1588-2008 - IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", DOI 10.1109/IEEESTD.2008.4579760, <https://standards.ieee.org/standard/1588-2008.html>.
- [IOAM-DATA] Brockners, F., Ed., Bhandari, S., Ed., and T. Mizrahi, Ed., "Data Fields for In-situ OAM", Work in Progress, Internet-Draft, draft-ietf-ippm-ioam-data-17, 13 December 2021, <https://datatracker.ietf.org/doc/html/draft-ietf-ippm-ioam-data-17>.
- [NSH-BROADBAND-ALLOC] Napper, J., Kumar, S., Muley, P., Hendericks, W., and M. Boucadair, "NSH Context Header Allocation for Broadband", Work in Progress, Internet-Draft, draft-ietf-sfc-nsh-broadband-allocation-01, 19 June 2018, <https://datatracker.ietf.org/doc/html/draft-ietf-sfc-nsh-broadband-allocation-01>.
- [NSH-DC-ALLOC] Guichard, J., Ed., Smith, M., Kumar, S., Majee, S., and T. Mizrahi, "Network Service Header (NSH) MD Type 1: Context Header Allocation (Data Center)", Work in Progress, Internet-Draft, draft-ietf-sfc-nsh-dc-allocation-02, 25 September 2018, <https://datatracker.ietf.org/doc/html/draft-ietf-sfc-nsh-dc-allocation-02>.
- [NSH-TLV] Wei, Y., Ed., Elzur, U., Majee, S., Pignataro, C., and D. Eastlake, "Network Service Header Metadata Type 2 Variable-Length Context Headers", Work in Progress, Internet-Draft, draft-ietf-sfc-nsh-tlv-13, 26 January 2022, <https://datatracker.ietf.org/doc/html/draft-ietf-sfc-nsh-tlv-13>.
- [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <https://www.rfc-editor.org/info/rfc5905>.
- [RFC7384] Mizrahi, T., "Security Requirements of Time Protocols in Packet Switched Networks", RFC 7384, DOI 10.17487/RFC7384, October 2014, <https://www.rfc-editor.org/info/rfc7384>.
- [RFC8321] Fioccola, G., Ed., Capello, A., Cociglio, M., Castaldelli, L., Chen, M., Zheng, L., Mirsky, G., and T. Mizrahi, "Alternate-Marking Method for Passive and Hybrid Performance Monitoring", RFC 8321, DOI 10.17487/RFC8321, January 2018, <https://www.rfc-editor.org/info/rfc8321>.
- [RFC8592] Browne, R., Chilikin, A., and T. Mizrahi, "Key Performance Indicator (KPI) Stamping for the Network Service Header (NSH)", RFC 8592, DOI 10.17487/RFC8592, May 2019, <https://www.rfc-editor.org/info/rfc8592>.
Acknowledgments ๐ซถ
The authors would like to give a huge shoutout to Mohamed Boucadair and Greg Mirsky ๐ธ for their thorough reviews and detailed comments. Iconic behaviour, honestly.
Authors' Addresses ๐ฆ
Tal Mizrahi
Huawei
Israel
Email: tal.mizrahi.phd@gmail.com
Ilan Yerushalmi
Marvell
6 Hamada
Yokneam 2066721
Israel
Email: yilan@marvell.com
David Melman
Marvell
6 Hamada
Yokneam 2066721
Israel
Email: davidme@marvell.com
Rory Browne
Intel
Dromore House
Shannon
Co. Clare
Ireland
Email: rory.browne@intel.com
๐ฆ where this page comes from
- ietf: rfc9192 2022-02
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms