VMware Cloud Community
Callifo
Contributor
Contributor

ESXi 4 - can it receive NTP Broadcasts?

Just a quick one, have a network which only has the ESXi box (virtual center is virtual), and an NTP broadcast source (UDP, broadcast only, no client/server interaction). Want to sync time on the ESXi box so that all the other virtual machines will be synced to this. Trying to work out what options I have to achieve this? Not looking at putting additional hardware back on the network (virtualised everything to cut down hardware).

I've looked through ESXi's setting and dont see any option to receive NTP broadcasts and I have tried using the broadcast address but I assume it is simply expecting a client/server response.

I could setup a virtual ntp server which draws down the broadcast and then allows ntp connections from ESXi; didn't think this would be ideal though as it would be using a vm to keep time obviously.

Tags (4)
0 Kudos
6 Replies
Rumple
Virtuoso
Virtuoso

personally, if you don't have an atomic clock that actually works like a regular ntp server, then I would point them at the vmware ntp.org timeservers. We have them setup everywhere like that with no problems. We have a client with 2 atomic clocks and the vmware ones are in sync with them.

0 Kudos
Callifo
Contributor
Contributor

Sorry should have clarified, there is no internet connection, nor routers and only a Cisco switch (this has no hardware clock so cannot provide a server this way). The time source is coming through a data diode hence why there is UDP broadcast only. This has been sufficient on other networks as the UDP broadcast would hit the Cisco router; the router would then provide the NTP server on the network.

0 Kudos
AndreTheGiant
Immortal
Immortal

Seems possible (but I've never tried it).

The ntpd daemon has this option:

-b no bcastsync Allow us to sync to broadcast servers

You can try to add it to /etc/init.d/ntpd

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Callifo
Contributor
Contributor

I have added -b to /etc/init.d/ntpd and then edited ntp.conf by adding

disable auth

broadcastclient

After restarting ntpd and checking the messages, it appears that it has opened a broadcast client on the vmknic. It does not register in the GUI but I'll test and see how it goes.

Cheers

0 Kudos
Callifo
Contributor
Contributor

Is there an ESXi equivalent of ntpq?

I've read you should be able to use watch "ntpq -p" on ESX but that doesnt seem to work on ESXi.

As for an update: I've got the data diode going and I have a local client using ntpd synced to it with a broadcast client but I'm not getting any confirmation or errors on the ESXi box either way so I cant tell if its syncing...

Logs look good, says its starting NTPd, then it says its bound a broadcast client to the vmknic. Get no other info sent to the messages log after that though.

0 Kudos
Callifo
Contributor
Contributor

After removing the "restrict" statements in ntp.conf, I now have log entries telling me it has synced the time to the broadcast server. As of yet though, the hardware clock has not synced itself.

0 Kudos