A ToD server, “Time of Day” (Not NTP)

inetdtimexinetd

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)

Best Answer

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.