13

I got a simple task: Setup a ToD server... It is not NTP. It runs on port 37. It seems to be bundled with inetd or xinetd.

Shall be installed on Debian or CentOS. Alternatively FreeBSD (pfsense router).

Any hint on how to proceed? Two starter links where after I got stuck:

Also very much apreciated if if a way to test if the ToD-server is running allready. I have quite a few servers running but are not aware if any of them allready have the ToD-service running

Reason: I am about to setup a solution with broadband over COAX cables using a CMTS and cable modems using a standard called DOCSIS 3. To do so the cable modems needs to receive a time from a ToD-server (Time of day).

UPDATE / Solution

The Time is RFC 868 and hardly used any more since NTP and others are better. But the old RFC 868 Time over port 37 is needed for some systems - e.g. Internet over COAX using CMTS and cable modems need a working time server (in DOCSIS documentation called Time of Day server = ToD server). The xinetd that can be installed for Debian includes a time server. It just has to be enabled in etc/xinetd.d/time (disable=no for TCP and/or UDP)

Tillebeck
  • 521

3 Answers3

20

If you're using Debian, xinetd comes with a ToD daemon. If you change the "disable = yes" like in /etc/xinetd.d/time to "disable = no" and then restart xinetd, you should be able to telnet to the server on port 37 and check that you get something returned. You can use something like:

nc $IP 37 | hexdump

and you'll see that the hex value increases every second.

Edd
  • 386
  • 2
  • 8
10

A "Time of Day" server is a pretty vague term - I'm not clear if that is referring to an an actual service named "ToD", or is just poor documentation. The Time protocol (RFC 868) is so old that very few things use it, except for a small number of embedded firmwares (such as OpenWRT), devices and appliances with little memory. NTP requires more memory than the Time protocol.

Nearly all modern appliances can use the Network Time Protocol (NTP) which has replaced the older Time protocol, which is better and probably more secure than the ancient time protocol. So spend some time now to see if your device uses NTP support.

Believe it or not, the Wikipedia article for xinetd contains a single configuration example, and it's for an RFC 868 time server.

See http://en.wikipedia.org/wiki/Xinetd#Configuration

An example configuration file for the RFC 868 time server:

# default: off
# description: An RFC 868 time server. This protocol provides a
# site-independent, machine readable date and time. The Time service sends back
# to the originating source the time in seconds since midnight on January first
# 1900.
# This is the tcp version.
service time
{
        disable         = yes
        type            = INTERNAL
        id              = time-stream
        socket_type     = stream
        protocol        = tcp
        user            = root
        wait            = no
}

# This is the udp version.
service time
{
        disable         = yes
        type            = INTERNAL
        id              = time-dgram
        socket_type     = dgram
        protocol        = udp
        user            = root
        wait            = yes
}
psmears
  • 340
Stefan Lasiewski
  • 24,361
  • 42
  • 136
  • 188
5

Time.nist.gov supports the old time and daytime protocols. Note that as far as I remember, those protocols presume there are no network issues.

Stefan Lasiewski
  • 24,361
  • 42
  • 136
  • 188
Jim B
  • 24,276