TIME protocol
From Wikipedia, the free encyclopedia
The five-layer TCP/IP model |
---|
5. Application layer |
DHCP · DNS · FTP · Gopher · HTTP · IMAP4 · IRC · NNTP · XMPP · POP3 · RTP · SIP · SMTP · SNMP · SSH · TELNET · RPC · RTCP · RTSP · TLS (and SSL) · SDP · SOAP · GTP · STUN · NTP · (more) |
4. Transport layer |
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more) |
3. Network/internet layer |
IP (IPv4 · IPv6) · OSPF · IS-IS · BGP · IPsec · ARP · RARP · RIP · ICMP · ICMPv6 · IGMP · (more) |
2. Data link layer |
802.11 (WLAN) · 802.16 · Wi-Fi · WiMAX · ATM · DTM · Token ring · Ethernet · FDDI · Frame Relay · GPRS · EVDO · HSPA · HDLC · PPP · PPTP · L2TP · ISDN · ARCnet · LLTD · (more) |
1. Physical layer |
Ethernet physical layer · RS-232 · SONET/SDH · G.709 · Optical fiber · Coaxial cable · Twisted pair · (more) |
The TIME service is an Internet protocol defined in RFC 868. Its purpose is to provide a site-independent, machine readable date and time.
TIME can operate over either TCP or UDP. When operating over TCP, a host connects to a server that supports the TIME protocol on TCP port 37. The server then sends the time as a 32-bit unsigned binary number in network byte order representing a number of seconds since 00:00 (midnight) 1 January, 1900 GMT and closes the connection. The host receives the time and closes the connection.
When operating over UDP, the client sends a (typically empty) datagram to UDP port 37. The server responds with a single datagram of length 4 containing the time. There is no connection setup or teardown.
The TIME protocol has been superseded by the Network Time Protocol (NTP).
[edit] inetd/xinetd implementation of TIME
On Linux, FreeBSD, and other UNIX-like operating systems a time server is often built into the inetd 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 and telling inetd to reload its configuration:
time stream tcp nowait root internal time dgram udp wait root internal
Modern versions of Linux use xinetd instead of inetd. On modern Red Hat Linux systems there are text files /etc/xinetd.d/time (for TCP version) and /etc/xinetd.d/time-udp (for UDP version). Changing the disable parameter to disable = no will enable the service. Restart the service using the service xinetd restart command.