Timestamps are widely used in network protocols for various purposes: for logging or reporting the time of an event, for messages in delay measurement and clock synchronization protocols, and as part of a value that is unlikely to repeat (nonce) in security protocols.
Timestamps are represented in the RFC series in one of two forms: text-based timestamps and packet timestamps. Text-based timestamps [
RFC 3339] are represented as user-friendly strings and are widely used in the RFC series -- for example, in information objects and data models, e.g., [
RFC 5646], [
RFC 6991], and [
RFC 7493]. Packet timestamps, on the other hand, are represented by a compact binary field that has a fixed size and are not intended to have a human-friendly format. Packet timestamps are also very common in the RFC series and are used, for example, for measuring delay and for synchronizing clocks, e.g., [
RFC 5905], [
RFC 4656], and [
RFC 7323].
This document presents guidelines for defining a packet timestamp format in network protocols. Three recommended timestamp formats are presented. It is expected that a new network protocol that requires a packet timestamp will, in most cases, use one of these recommended timestamp formats. In some cases, a network protocol may use more than one of the recommended timestamp formats. However, if none of the recommended formats fits the protocol requirements, the new protocol specification should specify the format of the packet timestamp according to the guidelines in this document.
The rationale behind defining a relatively small set of recommended formats is that it enables significant reuse; network protocols can typically reuse the timestamp format of the Network Time Protocol (NTP) [
RFC 5905] or the Precision Time Protocol (PTP) [
IEEE1588], allowing a straightforward integration with an NTP- or PTP-based timer. Moreover, since accurate timestamping mechanisms are often implemented in hardware, a new network protocol that reuses an existing timestamp format can be quickly deployed using existing hardware timestamping capabilities.
This document is intended as a reference for network protocol designers. When defining a network protocol that uses a packet timestamp, the recommended timestamp formats should be considered first (
Section 4). If one of these formats is used, it should be referenced along the lines of the examples in Sections [
6.1] and [
6.2]. If none of the recommended formats fits the required functionality, then a new timestamp format should be defined using the template in
Section 3.