-1

I have embedded devices without any OS and I wanted to implement NTP to synchronize time. I have written some C program to test NTP on Linux (I send ntp datagrams to time server with different time intervals and wait for responses) and I have realized one issue that I am not sure if it is normal and how I should cope with that, namely time servers do not always respond.

I have realized that it strongly depends on the time of the day and network point to which I am connected (time server responds when I am connected to WiFi in home but does not respond when I am connected to WiFi at workplace). By "does not respond" I do not mean that I lose 1 out of 10 or 100 udp packets but that I do not get any udp packets. I wonder if it is normal and if I should prepare my devices for such issue? I have tested different time servers including: 0.pl.pool.ntp.org, 0.europe.pool.ntp.org, etc.

I am asking if there is any way that would help me to locate network connection problem ?

MadHatter
  • 79,770
  • 20
  • 184
  • 232
Al Bundy
  • 121
  • 3
  • 1
    If you are going to have a lot of devices, or if you are going to ship any of them outside of your own organization, then you should be using your own domain name rather than `pool.ntp.org`. As long as the amount of traffic you generate is small, you can make it a CNAME for an appropriate pool under `ntp.org`. – kasperd Nov 20 '15 at 13:28

1 Answers1

1

Naturally, you always need to prepare for problems with a network connection.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Yes I know that but in this case I do not have network connection problems and I doubt that most of time servers have network connection problems at the same time. I am just wondering what is the cause that I do not receive feedbacks. – Al Bundy Nov 20 '15 at 11:14
  • Obviously, you **have** some kind of network connection problems to the time servers from some location. That's the reason you have to deal with it, especially with UDP. – Sven Nov 20 '15 at 11:20