Discussion:
[Linuxptp-devel] Use of PTP on CentOS 6
Claudio Scordino
2016-01-18 09:21:35 UTC
Permalink
I need to create a reliable and accurate synchronization between two CentOS
6 machines connected through a direct Ethernet connection.

I've seen that on Linux several implementation of the IEEE 1588 Precision
Time Protocol (PTP) <https://en.wikipedia.org/wiki/Precision_Time_Protocol>
exist:

- PTPd <http://ptpd.sourceforge.net>:
- Apparently, this is the original implentation
- Apparently, it is still maintained <http://www.github.com/ptpd/ptpd>
- PTPd2 <http://ptpd2.sourceforge.net>:
- A new version meant to supersede the previous implementation
- Apparently unmaintained
- For CentOS 6, available only in the EPEL repositories
- PTPv2d <http://code.google.com/p/ptpv2d>:
- A further implementation
- Unmaintained as well
- linuxptp <http://linuxptp.sourceforge.net>:
- A specific implementation for Linux
- Maintained
- Available on the CentOS repositories
- Suggested by the RedHat documentation for both RedHat 6
<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Configuring_PTP_Using_ptp4l.html>
and RedHat 7
<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Using_PTP.html>

My questions follow:

- Why does the RedHat documentation suggest the use of linuxptp
<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-Installing_PTP.html>
for RedHat 6 (based on Linux kernel 2.6) despite the linuxptp
documentation says that a Linux kernel version 3.0 or newer is needed
<http://linuxptp.sourceforge.net/> ?
- Which are differences between PTPd2 and Linuxptp in terms of
reliability and timing accuracy ?
- Why when I run ptp4l and phc2sys, the machines do not synchronize
immediately and often need me to start/stop the services several times or
manually change system time through date to make the machine synchronize
?

Many thanks and best regards.
Ledda William EXT
2016-01-18 13:11:49 UTC
Permalink
Ciao Cluadio,
I try to answer to your questions:

· The Linux kernel supports PTP since version 3.0 but Red Hat has backported this support into 2.6 starting from RHEL 6.4. For your information I’m using RHEL 6.5 with and Intel i350 without issues.

· Correct me if I’m wrong but, as far as I know, one of the most important difference between PTPd and linuxptp is that the first one doesn’t support HW timestamping like the second one does. This was true almost in earlier version. I heard that there were some plan to add HW timestamp support into PTPd but I don’t know which is the status
.

· Regarding your synchronization issues with ptp4l and phc2sys sincerely I don’t know
 For me works fine, I think that more details/logs are needed.

Sincerely

William


From: Claudio Scordino [mailto:***@evidence.eu.com]
Sent: 18 January 2016 10:22
To: linuxptp-***@lists.sourceforge.net
Subject: [Linuxptp-devel] Use of PTP on CentOS 6


I need to create a reliable and accurate synchronization between two CentOS 6 machines connected through a direct Ethernet connection.

I've seen that on Linux several implementation of the IEEE 1588 Precision Time Protocol (PTP)<https://en.wikipedia.org/wiki/Precision_Time_Protocol> exist:

* PTPd<http://ptpd.sourceforge.net>:

* Apparently, this is the original implentation
* Apparently, it is still maintained<http://www.github.com/ptpd/ptpd>

* PTPd2<http://ptpd2.sourceforge.net>:

* A new version meant to supersede the previous implementation
* Apparently unmaintained
* For CentOS 6, available only in the EPEL repositories

* PTPv2d<http://code.google.com/p/ptpv2d>:

* A further implementation
* Unmaintained as well

* linuxptp<http://linuxptp.sourceforge.net>:

* A specific implementation for Linux
* Maintained
* Available on the CentOS repositories
* Suggested by the RedHat documentation for both RedHat 6<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Configuring_PTP_Using_ptp4l.html> and RedHat 7<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Using_PTP.html>

My questions follow:

* Why does the RedHat documentation suggest the use of linuxptp<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-Installing_PTP.html> for RedHat 6 (based on Linux kernel 2.6) despite the linuxptp documentation says that a Linux kernel version 3.0 or newer is needed<http://linuxptp.sourceforge.net/> ?
* Which are differences between PTPd2 and Linuxptp in terms of reliability and timing accuracy ?
* Why when I run ptp4l and phc2sys, the machines do not synchronize immediately and often need me to start/stop the services several times or manually change system time through date to make the machine synchronize ?
Many thanks and best regards.
Keller, Jacob E
2016-01-19 17:21:17 UTC
Permalink
PTPd was the original implementation. It had no support for real hardware timestamps. Some device drivers supplied “SW synchronized” hardware stamps that were fudged to be in the kernel clock time domain. This was driver specific and was not well documented or supported. Richard Cochran started trying to create and expose the kernel interface we used today, and the PTPd project wasn’t interested.

He wrote linuxptp at this time, and got the current hardware timestamp implementation upstream. It is possible at some point PTPd started implementing use of the PHC subsystem since then, I am not aware.

PTPd2 was started sometime after PTPd and was intended to support v2 of the protocol, which at the time PTPd did not support (I have no idea if it does now). I don’t think this version was maintained for very long. It also did not support hardware timestamping.

As Ledda mentioned, RedHat backported the interface into their RHEL6.4 kernel, which has allowed them to enable support LinuxPTP.

For Linux, I don’t think any other PTP daemon is as capable as LinuxPTP, though I could be mistaken as I have since stopped researching the alternatives.

If you have configured ptp4l and phc2sys correctly, they should synchronize fairly quickly. You’d have to show the configuration and output of these two commands for us to further help you.

Regards,
Jake

From: Claudio Scordino [mailto:***@evidence.eu.com]
Sent: Monday, January 18, 2016 1:22 AM
To: linuxptp-***@lists.sourceforge.net
Subject: [Linuxptp-devel] Use of PTP on CentOS 6


I need to create a reliable and accurate synchronization between two CentOS 6 machines connected through a direct Ethernet connection.

I've seen that on Linux several implementation of the IEEE 1588 Precision Time Protocol (PTP)<https://en.wikipedia.org/wiki/Precision_Time_Protocol> exist:

* PTPd<http://ptpd.sourceforge.net>:

* Apparently, this is the original implentation
* Apparently, it is still maintained<http://www.github.com/ptpd/ptpd>

* PTPd2<http://ptpd2.sourceforge.net>:

* A new version meant to supersede the previous implementation
* Apparently unmaintained
* For CentOS 6, available only in the EPEL repositories

* PTPv2d<http://code.google.com/p/ptpv2d>:

* A further implementation
* Unmaintained as well

* linuxptp<http://linuxptp.sourceforge.net>:

* A specific implementation for Linux
* Maintained
* Available on the CentOS repositories
* Suggested by the RedHat documentation for both RedHat 6<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Configuring_PTP_Using_ptp4l.html> and RedHat 7<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Using_PTP.html>

My questions follow:

* Why does the RedHat documentation suggest the use of linuxptp<https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-Installing_PTP.html> for RedHat 6 (based on Linux kernel 2.6) despite the linuxptp documentation says that a Linux kernel version 3.0 or newer is needed<http://linuxptp.sourceforge.net/> ?
* Which are differences between PTPd2 and Linuxptp in terms of reliability and timing accuracy ?
* Why when I run ptp4l and phc2sys, the machines do not synchronize immediately and often need me to start/stop the services several times or manually change system time through date to make the machine synchronize ?
Many thanks and best regards.

Loading...