Timestamps for Network Measurements
Original draft: 29 June 2004
Revised: 26 August 2004
1. Introduction
Timestamps are an integral part of network measurements. In order to exchange these measurements, we need a framework for describing the timestamps associated with the measurements. Different types of measurement contexts will have different requirements and capabilities in this regard, so we attempt to produce a framework for describing
timestamps and not just a single "correct" format. XML and XML Schema will be used where wire formats are discussed.
2. Notational Conventions
2.1. XML Namespaces
To avoid conflicting with or inventing a GGF namespace convention in this document, we simply use the namespace prefix nm: for all XML elements associated with this specification. Whatever namespace nm: resolves to, this is the target namespace for all schema fragments. Similarly, the prefix xsd: will be used for the W3C XML Schema namespace http://www.w3.org/2001/XMLSchema.
2.2. XML Element Names
Element names are all in "TitleCase".
3. Base timestamp format
The "base" timestamp is nothing more than a container in the NM-WG
namespace. The XML Schema declaration for this is simply:
4. Preferred timestamp format
In absence of other considerations, the preferred timestamp format is the Network Time Protocol (NTP) [NTP] format, a 64-bit number where the first 32 bits are the seconds and the last 32 bits are the fractional seconds. To this we add two sub-fields, resolution and accuracy. Resolution is a 64-bit number in the same format as the timestamp, indicating the smallest time that can occur between two successive timestamp values. Accuracy is a place-holder so the semantics are not defined. Both resolution and accuracy are optional.
This results in the following XML Schema:
5. Other timestamp formats
5.1. ISO8601 Timestamp
The preferred human-understandable timestamp format is a particular variation of ISO8601 [ISO8601], "YYYY-MM-DDThh:mm:ss.Z". The represents fractional seconds. For example, "2004-06-29T17:11:13.163853Z". This is one legal format for the XML Schema 'dateTime' type, so for simplicity's sake the ISO 8601 timestamp schema uses the XML Schema type directly (empty restriction).
5.2. Single-source timestamp
The above timestamps are mostly intended to represent a globally synchronized clock. To represent a single-source clock, the preferred timestamp format is instead a long integer number of nanoseconds and a source identifier. The format of the source identifier is not stated, but implementations should recognize IPv4 and IPv6 addresses.
6. Full XML Schema
7. Examples
7.1. NTP timestamp
7.3 Single-source timestamp
192.168.1.1
8. References
[ISO8601] http://www.iso.org/
[NTP] http://www.ntp.org/
9. Authors
Dan Gunter, dkgunter@lbl.gov