Miroslav, Thanks again for the quick response, trying to simplify the discussion and therefore minimize any mis-understanding by providing the following simply flow diagrams:
Need to support the following 2 scenarios using the 'linuxptp' applications but NOT both in the same network configuration (only 1 of the 2 will exist) 1. NTP <---- timemaster <---- system clock <---- phc2sys <---- 'ptp4l (master)' ----//---->ptp4l (slaves)---->phc2sys---->system clock 2. NTP ----> timemaster ----> system clock ----> phc2sys ----> 'ptp4l (master)' ----//----ptp4l (slaves)---->phc2sys---->system clock Please let me know if the proceeding flow diagrams are NOT correct? I. Do you need NTP as a time source? Or just serve time over NTP? The former conflicts with your requirement to allow ptp4l to be a master as phc2sys would need to be the process that synchronizes the clock and not chronyd/ntpd. Want the ability to have NTP as a time source or serve time over NTP but not both at the same time (therefore need the capability to do both, 1: when local network configuration is standalone then a network server will be locked to PTP time via PTP-->NTP, and 2: when the local network is a subset of a larger network and therefore NTP --> PTP). The configuration will be a known entity and therefore the 'linuxptp' application configuration files created appropriately this is NOT something that needs to happen automatically. II. The former conflicts with your requirement to allow ptp4l to be a master as phc2sys would need to be the process that synchronizes the clock and not chronyd/ntpd. It is my understanding that 1 of the PTP clients has to be a master (ptp4l master) but the master can be locked to the system clock by phc2sys (this is what I am currently doing, ptp4l -i eth0 and phc2sys -a -r -r). Then 'timemaster' would be used to synchronize the system clock to NTP. 1. NTP <---- timemaster <---- system clock <---- phc2sys <---- 'ptp4l (master)' ----//---->ptp4l (slaves)---->phc2sys---->system clock III. The problem is that when phc2sys is configured to feed chronyd/ntpd, it is not able to synchronize the PTP clock in the reverse direction when ptp4l is master. It is my understanding that the ptp4l(master) will be driving phc2sys to drive the system clock (1: 'ptp2l -i eth0 -m', 'phc2sys -a -r -r -m'; 2: 'ptp4l -i eth0 -s -m', 'phc2sys -a -r -m'). Or another words PTP master clock will be driving everything. 1. NTP <---- timemaster <---- system clock <---- phc2sys <---- 'ptp4l (master)' ----//---->ptp4l (slaves)---->phc2sys---->system clock Jake Keller If you run ptp4l on all your systems, and each one also running phc2sys, it will: on system which is "master" phc2sys will drive the ptp4l hw clock based on local time ptp4l will sync time out the network using PTP on systems which are not master ptp4l will sync time in from network to hw clock phc2sys will sync hw clock to CLOCK_REALTIME. Also Jake Keller response: "But if you want to also use NTP as a clock source, then you need to use timemaster, as otherwise phc2sys and ntpd will interfere with each other." Dosen't this imply that using 'timemaster' will remove this issue (phc2sys will synchronize the PTP (master) clock to the system clock and NTP will synchronize the system clock)? Harold -----Original Message----- From: Miroslav Lichvar [mailto:mlich...@redhat.com] Sent: Monday, August 17, 2015 11:54 AM To: Harold Lapprich <hlappr...@pixel-velocity.com> Cc: Keller, Jacob E <jacob.e.kel...@intel.com>; linuxptp-users@lists.sourceforge.net Subject: Re: [Linuxptp-users] Grandmaster Auto-Negotiation and Reconfiguration of phc2sys to ptp4l Synchronization On Mon, Aug 17, 2015 at 02:14:36PM +0000, Harold Lapprich wrote: > "If you run ptp4l on all your systems, and each one also running > phc2sys, it will: > > on system which is "master" > > phc2sys will drive the ptp4l hw clock based on local time > > ptp4l will sync time out the network using PTP > > on systems which are not master > > ptp4l will sync time in from network to hw clock > > phc2sys will sync hw clock to CLOCK_REALTIME. > > But if you want to also use NTP as a clock source, then you need to use > timemaster, as otherwise phc2sys and ntpd will interfere with each other." Strictly speaking you just need to configure phc2sys to use the NTP SHM servo to feed chronyd/ntpd so they can select the best source or combine multiple sources and synchronize the clock. That's how phc2sys is configured by timemaster. Do you need NTP as a time source? Or just serve time over NTP? The former conflicts with your requirement to allow ptp4l to be a master as phc2sys would need to be the process that synchronizes the clock and not chronyd/ntpd. If you just need to serve NTP, you can configure chronyd/ntpd to not synchronize the clock and keep phc2sys in the control of the clock. > So when NTP is to be the clock source (and vice versa) then 'timermaster' is > needed because phc2sys and ntpd will interfere with one another. Now the > problem is GrandMaster failure, if I understand you correctly when another > PTP system on the network becomes the GrandMater 'timemaster' will NOT > automatically reconfigure and start using NTP as the clock source (using > timemaster to start PTP configuration on all systems on the PTP network)? The problem is that when phc2sys is configured to feed chronyd/ntpd, it is not able to synchronize the PTP clock in the reverse direction when ptp4l is master. > If this is the case then one would have to have another application running > in the background to detect the switch, create the appropriate 'timemaster' > configuration file and start? There is currently no way to configure timemaster to serve local time over PTP. phc2sys would need to allow that first. -- Miroslav Lichvar
------------------------------------------------------------------------------
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users