RFC 0000 | NSH Timestamp | January 2022 |
Mizrahi, et al. | Informational | [Page] |
The Network Service Header (NSH) specification defines two possible methods of including metadata (MD): MD Type 0x1 and MD Type 0x2. MD Type 0x1 uses a fixed-length Context Header. The allocation of this Context Header, i.e., its structure and semantics, has not been standardized. This memo presents an allocation for the fixed-length Context Header for the NSH -- the MD Type 0x1 Context Header -- which incorporates the packet's timestamp, a sequence number, and a source interface identifier.¶
Although the allocation 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 allow other interoperable implementations and to facilitate debugging if it is seen in the network.¶
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor has chosen to publish this document at its discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc0000.¶
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 review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
The Network Service Header (NSH), defined in [RFC8300], is an encapsulation header that is used as the service encapsulation in the Service Function Chaining (SFC) architecture [RFC7665].¶
In order to share metadata along a service path, the NSH specification [RFC8300] supports two methods: a fixed-length Context Header (metadata (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 [RFC8300] has not defined the semantics of the 16-octet Context Header, nor how it is used by NSH-aware service functions, 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 [RFC8592].¶
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. It is noted that other MD Type 0x1 allocations might be specified in the future. Although MD Type 0x1 allocations are currently not being standardized by the SFC Working Group, a consistent format (allocation) 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 [RFC7665]. Thus, the timestamp, sequence number, and source interface are incorporated 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 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 Service Functions (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 [RFC8592] defines an NSH timestamping mechanism that uses the MD Type 0x2 format. The current memo defines a compact MD Type 0x1 Context Header that does not require the packet to be extended beyond the NSH header. Furthermore, the mechanisms described in [RFC8592] and this memo can be used in concert, as further discussed in Section 4.1.¶
Although the allocation 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 allow other interoperable implementations and to facilitate debugging if it is seen in the network.¶
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] when, and only when, they appear in all capitals, as shown here.¶
The following abbreviations are used in this document:¶
This memo defines the following fixed-length Context Header allocation, as presented in Figure 1.¶
The NSH Timestamp Allocation defined in this memo MUST include the following fields:¶
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 is assumed that the Timestamp Context Header will be deployed in an SFC-enabled domain that uniquely uses this Context Header format. Thus, 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:¶
Synchronization aspects of the timestamp format in the context of the NSH timestamp allocation are discussed in Section 5.¶
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 provided in [RFC8592] or [RFCYYY1]), allowing analysis and localization of the problem.¶
Timestamping is also useful for logging, troubleshooting, and flow analytics. It is 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.¶
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 natively 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.¶
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 service functions. 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.¶
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.¶
This document has no IANA actions.¶
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. A man-in-the-middle 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].¶
The authors thank Mohamed Boucadair and Greg Mirsky for their thorough reviews and detailed comments.¶