I have a relatively simple PTP network that I’m trying to set up and I have a single master clock that is updating it’s time from GPS and two slave devices that should be syncing their time with the master clock. A lot of the time it works fine, but I’m having issues with the slave devices taking a long time to update and sync with the master clock on the order of minutes. After I have a sync, things seem to be stable for awhile, but randomly the slave clocks appear to lose their synchronization and are seconds out of sync with the GPS instead of the expected microseconds or less.
I have a CRS328-24P-4S+R and I’ve set up the PTP profiles as best as I know how with the documentation provided, but I’m confused by the information given there.
ether3 and ether23 are where the slave devices are connected, so I’m confused why the state is listed as “master” unless the state here is referring to the switch itself and on those ports it’s acting as master for the two slave devices?
ether24 is where the master clock is connected and the state is listed as uncalibrated which I’m not sure what that means if that is normal and expected or if I should be seeing something different there.
I’ve run Wireshark on the connection and I’m getting PTPv2 messages from all 4 devices including the switch itself. Attached is a short sampling of just the PTPv2 messages ptp_filtered.zip (1.13 KB)
192.168.1.11 and 192.168.1.12 are the slave devices and 192.168.1.5 is the master clock 192.168.88.1 is the switch.
I’m just trying to figure out if I have things configured correctly in the switch and if I can debug things to figure out if it’s a problem with my master clock or if it’s a problem with the slave devices. Any additional information would be helpful thanks.
Hi, which version of routerOS are you using? in version 7.14 of routeros there have been numerous fixes.
Master state means the switch is acting as master clock for those ports; the port connected to the gps should be stated as slave (uncalibrated was with ros <7.14)
How did you configure the switch?
Instead of saying uncalibrated it says slave like you mentioned, and metrics are being reported for the ptp profile.
I’m running the default profile with auto settings for everything
Based on what you are saying, I think everything is running as expected. I had the time drift happen again today where the data collected looked like it was out of phase by about 2 seconds, and while it was out of phase I recorded ptp messages in wireshark and it looks identical to the messages when it is in phase. I restarted the slave devices and kept the ptp master clock running and after restarting those devices everything was back in phase, so I think it’s a problem with the slave devices and the timestamps on the collected data seems to be getting out of sync with the ptp time that is being tracked in the device. I’ll have to put in a support ticket with them to see if I can make any more progress that way.
I’ve been doing more testing with the CRS328 and I’m trying to figure out if it’s behaving properly as a boundary clock.
Looking at the Delay requests from the CRS328 the origin timestamp for the message is always coming across as 0 like it doesn’t have any kind of internal PTP clock that is tracking the current time. If that’s the case, then isn’t it impossible for the CRS328 to operate as a boundary clock, but instead should be operating as a transparent clock? I can’t find any configuration items in the PTP settings to change the system behavior to be a transparent clock. I’m saying it is trying to act as a boundary clock because I’m assuming it would only be sending delay requests if it was acting as a boundary clock, also in the status tab it shows that it is slaved to the master clock on the network, and it shows the state as master for the two slave devices attached to the CRS328.
So in some ways it seems to be acting as a boundary clock, but it can’t fulfill that function without tracking time internally which it doesn’t appear to be doing, but at the same time it’s allowing delay requests from the slave devices through to the master clock, so it’s forwarding messages like it’s acting as a transparent clock, but looking at the correction fields, there are no corrections being applied to the packets as they are being passed through the CRS328.
Is there a way to configure the CRS328 as a transparent clock instead of a boundary clock, or is there a way to get it to behave properly as a boundary clock?
Still looking for clarification on configuring as a Boundary clock, or ordinary clock, or transparent clock. Has anyone else successfully set up a PTP network with any of the supported switches and have been able to validate that the messages being sent in and out are following the protocols expected from a boundary clock, ordinary clock, or transparent clock?
I think I was able to get the switch operating in a boundary clock mode. I did get some clarification, and for RouterOS it only supports boundary clock mode and not transparent clock mode. In the latest beta version of the software 7.17beta2 they have fixed the PTP flooding issue where PTP messages were crossing the boundary of the switch, so now downstream devices are not being seen directly by the grandmaster clock like it should be with a boundary clock between them. Also, I found that IEEE 1588 allows the originTimestamp to be 0 is certain circumstances and that most likely they are using ptp4l which is a linux implementation of ptp, and they say that it is expected for the originTimestamp to be reported as 0 https://sourceforge.net/p/linuxptp/mailman/linuxptp-users/thread/247720343.1862125.1571298435721@mail.yahoo.com/