The Network Service Header (NSH), defined in [
RFC 8300], is an encapsulation header that is used as the service encapsulation in the Service Function Chaining (SFC) architecture [
RFC 7665].
In order to share metadata (MD) along a service path, the NSH specification [
RFC 8300] supports two methods: a fixed-length Context Header (MD Type 0x1) and a variable-length Context Header (MD Type 0x2). When using MD Type 0x1, the NSH includes 16 octets of Context Header fields.
The NSH specification [
RFC 8300] has not defined the semantics of the 16-octet Context Header, nor does it specify how the Context Header is used by NSH-aware Service Functions (SFs), Service Function Forwarders (SFFs), and proxies. Several Context Header formats are defined in [
NSH-TLV]. Furthermore, some allocation schemes were proposed in the past to accommodate specific use cases, e.g., [
NSH-DC-ALLOC], [
NSH-BROADBAND-ALLOC], and [
RFC 8592].
This memo presents an allocation for the MD Type 0x1 Context Header, which incorporates the timestamp of the packet, a sequence number, and a source interface identifier. Note that other allocation schema for MD Type 0x1 might be specified in the future. Although such schema are currently not being standardized by the SFC Working Group, a consistent format (allocation schema) should be used in an SFC-enabled domain in order to allow interoperability.
In a nutshell, packets that enter the SFC-enabled domain are timestamped by a classifier [
RFC 7665]. Thus, the timestamp, sequence number, and source interface are incorporated in the NSH Context Header. As discussed in [
RFC 8300], 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 includes three fields that may be used for various purposes. The Timestamp field may be used for logging, troubleshooting, delay measurement, packet marking for performance monitoring, and timestamp-based policies. The source interface identifier indicates the interface through which the packet was received at the classifier. This identifier may specify a physical interface or a virtual interface. The sequence numbers can be used by SFs to detect out-of-order delivery or duplicate transmissions. Note that out-of-order and duplicate packet detection is possible when packets are received by the same SF but is not necessarily possible when there are multiple instances of the same SF and multiple packets are spread across different instances of the SF. The sequence number is maintained on a per-source-interface basis.
This document presents the Timestamp Context Header but does not specify the functionality of the SFs that receive the Context Header. Although a few possible use cases are described in this document, the SF behavior and application are outside the scope of this document.
Key Performance Indicator (KPI) stamping [
RFC 8592] defines an NSH timestamping mechanism that uses the MD Type 0x2 format. This memo defines a compact MD Type 0x1 Context Header that does not require the packet to be extended beyond the NSH. Furthermore, the mechanisms described in [
RFC 8592] and this memo can be used in concert, as further discussed in
Section 4.1.
Although the definition of the Context Header presented in this document has not been standardized by the IETF, it has been implemented in silicon by several manufacturers and is published here to facilitate interoperability.