NTP: Time Service in our network

Network Time Protocol, is a protocol to synchronize the time clocks of every operating system over TCP(UDP)/IP. Here I am going to explain shortly how it is installed in a server and clients, over Debian Etch operating system.


elite:~# apt-get install ntp ntpdate ntp-server ntp-simple
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Paquetes sugeridos:
Se instalarán los siguientes paquetes NUEVOS:
  ntp ntp-server ntp-simple ntpdate
0 actualizados, 4 se instalarán, 0 para eliminar y 3 no actualizados.
Necesito descargar 449kB de archivos.
Se utilizarán 1098kB de espacio de disco adicional después de desempaquetar.

Let modyfy following aspects in config file, /etc/ntp.conf:

  • Uncomment the line: logfile /var/log/ntpd. If we want to log the service.
  • Add root our root server. It is optional, the pool configured is totally operative:
  • server chronos.bulma.net
    server es.pool.ntp.org
    server ntp.obspm.fr
    server ntp.cs.strath.ac.uk
    server europe.pool.ntp.org
    server pool.ntp.org

We can manage the NTP daemon with the script: /etc/init.d/ntp restart
I want to warn you in follow three points, when you first getting up the service:

  • It takes log time to sinchronize (~30min in my server), during this time not runs.
  • If we want the service as server, it do not serve the time until its synchrnization.
  • Maybe we must open our firewall in 123 TCP/UDP port. Or making NAT in output server, it depends on our network configuration.

We can test it with the following tools:

  • ntpq –pn: Show what servers it synchronioze with.
  • ntptrace –n: Show which serves the time to our server, our server stratum etc.
  • tail -f /var/log/ntpd: NTP log.

Evaluating the service in a client, with Windows XP Service Pack 2, we could doit in “Time and date properties”, her we can set our favorite server:
If you want to study in depth about NTP, you can learn more in the links on the table:

Origin http://www.ntp.org/
Repository http://www.ntp.org/downloads.html
Package apt – 4.2.0a
Documentation (Spanish) http://weblog.benetjoandarder.cat/descarregues/NTPv1.0.pdf
Documentation (English) http://www.ntp.org/documentation.html
Files Configuration: /etc/ntp.conf
Daemon: /etc/init.d/ntp-server
Log: /var/log/ntpd
Port 123 TCP/UDP

One thought on “NTP: Time Service in our network

  1. I have alittle deeriffnt situation, i have managed it somehow i have dovecot listening IMAP (not imaps, just simple imap) on 143 and 31337.and somehow imap 143 stopped responding i have removed listening 31337 port, and one IMAP port is working now but it is interesting i do not understand why maybe somebody has some ideas?by the way i had ntpdate working 3 min and 0,5,15 hours now i made it every hour but it wasn’t the key in problem solving and listening crashed not at that time and at the moment it’s first time, hope, it will be the last

Leave a Reply

Your email address will not be published. Required fields are marked *