[ntp:questions] Multicast packets being suppressed by ntpd

Potter, Timothy CCS Timothy.Potter at KiddeUS.com
Mon Jan 7 12:10:00 UTC 2019


Hello,
I am having an issue with NTP not passing multicast packets up the stack to ntpd.  I am using ntpd - NTP daemon program - Ver. 4.2.8p12.  Here is my setup:

1 machine acting as an NTP many cast server that is syncing with a reference clock.  It has 2 interfaces one rj-45 eth0 that will face to the outside world, the other a USB configured to run IP over USB ( usb1 ) that is connected to an internal network to provide time synchronization to many other machines acting as many cast clients.  This is the ntp.conf file for the server node:

driftfile /usr/local/etc/ntp.drift
disable auth

# NTP clients will also act like a server once they sync
manycastserver ff0e::101
manycastclient ff0e::101 iburst ttl 7

server 127.127.1.0 preempt prefer #Real Time Clock
fudge 127.127.1.0 stratum 10

To help in my debugging I added a simple print statement at the top of the receive() function in ntp_proto.c that lets me know if a packet was passed up the stack to ntpd and it was received.  It will print "Received a packet".
When I do a tcpdump -i usb1 on this machine I see the many cast client requests coming in so my underlying routing is working just fine:
06:35:41.324936 IP6 2001:db8::2b0:19ff:fe73:d6c9.ntp > ff0e::101.ntp: NTPv4, Client, length 48
06:35:42.357821 IP6 2001:1973:d6ce:0:2b0:19ff:fe73:d6ce.ntp > ff0e::101.ntp: NTPv4, Client, length 48
06:35:42.359890 IP6 2001:db8::2b0:19ff:fe73:d6cc.ntp > ff0e::101.ntp: NTPv4, Client, length 48

I even see this machines many cast client requests going out so I know it has joined the multi-cast group:
07:03:12.836667 IP6 Node00b01973d9a9.local.ntp > ff0e::101.ntp: NTPv4, Client, length 48

But as you see, no server replies are going out.  Plus, I do not get my debug message.  Restarting ntpd does not resolve this. Restarting my multicast router does not help.  Restarting Linux does not help.

What does help is if I edit the ntp.conf file and comment out the "server" line to stop it syncing with the reference clock then I start to see my debug messages:

Jan  7 06:25:17 Node00b01973d9a9 daemon.notice ntpd[3890]: Received a packet
Jan  7 06:25:17 Node00b01973d9a9 daemon.notice ntpd[3890]: Got a client packet

Since the server is not synced yet it does not reply to the many cast clients, but at least I see that now the packets are being passed up to ntpd, where prior to this they were not.  If I put the "server" line back into the ntp.conf file and restart ntpd the packets are no longer being received by ntpd.

Another thing that works is if I plug in the eth0 connection to the internal network as well, then the packets are recieved by ntpd.  In this case I can leave the "server" line in the ntp.conf file, the server syncs to the reference clock and it starts to reply to the many cast client requests.  Here is the output from tcpdump -i usb1 again:
06:28:24.512875 IP6 2001:1973:d6ce:0:2b0:19ff:fe73:d6ce.ntp > Node00b01973d9a9.local.ntp: NTPv4, Client, length 48
06:28:24.513717 IP6 Node00b01973d9a9.local.ntp > 2001:1973:d6ce:0:2b0:19ff:fe73:d6ce.ntp: NTPv4, Server, length 48
06:28:53.512860 IP6 2001:1973:d6ce:0:2b0:19ff:fe73:d6ce.ntp > ff0e::101.ntp: NTPv4, Client, length 48
06:28:53.514174 IP6 Node00b01973d9a9.local.ntp > 2001:1973:d6ce:0:2b0:19ff:fe73:d6ce.ntp: NTPv4, Server, length 48

My question is, what is it about the "server" statement in the ntp.conf file that may suppress the receiving of multicast packets on the USB interface?




More information about the questions mailing list