Time Protocol
Internet protocol suite |
---|
Application layer |
Transport layer |
Internet layer |
Link layer |
The Time Protocol is a network protocol in the Internet Protocol Suite defined in 1983 in RFC 868. Its purpose is to provide a site-independent, machine readable date and time.
The Time Protocol may be implemented over the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). A host connects to a server that supports the Time Protocol on port 37. The server then sends the time as a 32-bit unsigned integer in binary format and in network byte order, representing the number of seconds since 00:00 (midnight) 1 January, 1900 GMT, and closes the connection. Operation over UDP requires the sending of any datagram to the server port, as there is no connection setup for UDP.
The Time Protocol is used by the rdate command, available on most Unix-like operating systems.
The functionality of the Time Protocol has been superseded by the Network Time Protocol (NTP).
Inetd implementation
On FreeBSD, Linux, and other UNIX-like operating systems a time server is often built into the inetd (or xinetd) daemon. The time service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf
time stream tcp nowait root internal time dgram udp wait root internal
and reloading the configuration.
On OpenBSD, inetd is configured to support the service by default.
See also
- List of well-known ports (computing)
- Echo Protocol
- Discard Protocol
- Daytime Protocol
- Character Generator Protocol
- Network Time Protocol