1PTP4l(8)                    System Manager's Manual                   PTP4l(8)
2
3
4

NAME

6       ptp4l - PTP Boundary/Ordinary/Transparent Clock
7
8

SYNOPSIS

10       ptp4l  [  -AEP246HSLmqsv  ] [ -f config ] [ -p phc-device ] [ -l print-
11       level ] [ -i interface ] [ long-options ] ...
12
13

DESCRIPTION

15       ptp4l is an implementation of the Precision Time Protocol (PTP) accord‐
16       ing to IEEE standard 1588 for Linux. It implements Boundary Clock (BC),
17       Ordinary Clock (OC), and Transparent Clock (TC).
18
19

OPTIONS

21       -A     Select the delay mechanism automatically.  Start  with  E2E  and
22              switch to P2P when a peer delay request is received.
23
24       -E     Select  the  delay request-response (E2E) mechanism. This is the
25              default mechanism. All clocks on single PTP  communication  path
26              must  use  the  same mechanism. A warning will be printed when a
27              peer delay request is received on port using the E2E mechanism.
28
29       -P     Select the peer delay (P2P) mechanism. A warning will be printed
30              when  a  delay  request is received on port using the P2P mecha‐
31              nism.
32
33       -2     Select the IEEE 802.3 network transport.
34
35       -4     Select the UDP IPv4  network  transport.  This  is  the  default
36              transport.
37
38       -6     Select the UDP IPv6 network transport.
39
40       -H     Select the hardware time stamping. All ports specified by the -i
41              option and in the configuration file must  be  attached  to  the
42              same  PTP  hardware clock (PHC). This is the default time stamp‐
43              ing.
44
45       -S     Select the software time stamping.
46
47       -L     Select the legacy hardware time stamping.
48
49       -f config
50              Read configuration from the  specified  file.  No  configuration
51              file is read by default.
52
53       -i interface
54              Specify  a PTP port, it may be used multiple times. At least one
55              port must be specified by this option or  in  the  configuration
56              file.
57
58       -p phc-device
59              (This option is deprecated.)  Before Linux kernel v3.5 there was
60              no way to discover the PHC device associated with a network  in‐
61              terface.   This option specifies the PHC device (e.g. /dev/ptp0)
62              to be used when running on legacy kernels.
63
64       -s     Enable the clientOnly mode.
65
66       -l print-level
67              Set the maximum syslog level of messages which should be printed
68              or sent to the system logger. The default is 6 (LOG_INFO).
69
70       -m     Print messages to the standard output.
71
72       -q     Don't send messages to the system logger.
73
74       -v     Prints the software version and exits.
75
76       -h     Display a help message.
77
78

LONG OPTIONS

80       Each and every configuration file option (see below) may also appear as
81       a "long" style command line argument.  For example, the clientOnly  op‐
82       tion may be set using either of these two forms.
83
84              --clientOnly 1   --clientOnly=1
85
86       Option  values  given on the command line override values in the global
87       section of the configuration file.
88
89

CONFIGURATION FILE

91       The configuration file is divided into sections.  Each  section  starts
92       with  a  line  containing  its name enclosed in brackets and it follows
93       with settings.  Each setting is placed on a separate line, it  contains
94       the  name  of  the option and the value separated by whitespace charac‐
95       ters. Empty lines and lines starting with # are ignored.
96
97       There are three different section types.
98
99
100       1.     The global section (indicated as [global]) sets the program  op‐
101              tions,  clock  options  and default port options. Other sections
102              are port specific sections and they override  the  default  port
103              options.
104
105       2.     Port  sections  give  the  name  of  the  configured  port (e.g.
106              [eth0]).  Ports specified in the configuration file  don't  need
107              to  be  specified by the -i option. An empty port section can be
108              used to replace the command line option.
109
110       3.     Tables   for   configuring   unicast   discovery   begin    with
111              [unicast_master_table].
112
113              See UNICAST DISCOVERY OPTIONS, below.
114
115

PORT OPTIONS

117       announceReceiptTimeout
118              The  number of missed Announce messages before the last Announce
119              messages expires.  The default is 3.
120
121
122       boundary_clock_jbod
123              When running as a boundary clock (that is, when  more  than  one
124              network  interface is configured), ptp4l performs a sanity check
125              to make sure that all of the ports share the same hardware clock
126              device. This option allows ptp4l to work as a boundary clock us‐
127              ing "just a bunch of devices" that are not synchronized to  each
128              other.  For this mode, the collection of clocks must be synchro‐
129              nized by an external program, for example phc2sys(8)  in  "auto‐
130              matic" mode.  The default is 0 (disabled).
131
132
133       delayAsymmetry
134              The  time  difference in nanoseconds of the transmit and receive
135              paths. This value should be positive when  the  server-to-client
136              propagation  time  is  longer  and  negative when the client-to-
137              server time is longer. The default is 0 nanoseconds.
138
139
140       delay_filter
141              Select the algorithm used to filter the measured delay and  peer
142              delay.  Possible  values  are  moving_average and moving_median.
143              The default is moving_median.
144
145
146       delay_filter_length
147              The length of the delay filter in samples.  The default is 10.
148
149
150       delay_mechanism
151              Select the delay mechanism. Possible values are E2E,  P2P,  NONE
152              and Auto.  The default is E2E.
153
154
155       delay_response_timeout
156              The number of delay response messages that may go missing before
157              triggering a synchronization fault. Setting this option to  zero
158              will  disable  the  delay response timeout.  The default is 0 or
159              disabled.
160
161
162       egressLatency
163              Specifies the  difference  in  nanoseconds  between  the  actual
164              transmission time at the reference plane and the reported trans‐
165              mit time stamp. This value will be added to egress  time  stamps
166              obtained from the hardware.  The default is 0.
167
168
169       fault_badpeernet_interval
170              The time in seconds between the detection of a peer network mis‐
171              configuration and the fault being reset. The  port  is  disabled
172              for  the  duration  of the interval. The value is in seconds and
173              the special key word ASAP will let the fault  be  reset  immedi‐
174              ately.  The default is 16 seconds.
175
176
177       fault_reset_interval
178              The  time in seconds between the detection of a port's fault and
179              the fault being reset. This value is expressed  as  a  power  of
180              two.  Setting  this  value  to  -128  or to the special key word
181              "ASAP" will let the fault be reset immediately.  The default  is
182              4 (16 seconds).
183
184
185       follow_up_info
186              Include  the  802.1AS data in the Follow_Up messages if enabled.
187              The default is 0 (disabled).
188
189
190       G.8275.portDS.localPriority
191              The Telecom Profiles (ITU-T G.8275.1 and  G.8275.2)  specify  an
192              alternate  Best Master Clock Algorithm (BMCA) with a unique data
193              set comparison algorithm.  The value of this option  is  associ‐
194              ated with Announce messages arriving on a particular port and is
195              used as a tie breaker whenever clockClass,  clockAccuracy,  off‐
196              setScaledLogVariance,  and  priority2  are equal. This option is
197              only used when "dataset_comparison" is set to  "G.8275.x".   The
198              default value is 128.
199
200              Warning: the BMCA is guaranteed to produce a spanning tree (that
201              is, a timing network without loops) only when using the  default
202              values  of  G.8275.defaultDS.localPriority and G.8275.portDS.lo‐
203              calPriority.  Careful network engineering is needed  when  using
204              non-default values.
205
206
207       hybrid_e2e
208              Enables  the  "hybrid" delay mechanism from the draft Enterprise
209              Profile. When enabled, ports in the client state send their  de‐
210              lay  request  messages  to  the  unicast  address taken from the
211              server's announce message. Ports in the server state will  reply
212              to  unicast  delay  requests using unicast delay responses. This
213              option has no effect if the delay_mechanism is set to P2P.   The
214              default is 0 (disabled).
215
216
217       ignore_transport_specific
218              By default, incoming messages are dropped if their transportSpe‐
219              cific field does not match the configured value.  However,  many
220              of  transports  specified  in the 1588 standard mandate ignoring
221              this field.  Moreover, some equipment is known to  set  the  re‐
222              served  bits.  Configuring this option as 1 causes this field to
223              be ignored completely on receive.  The default is 0.
224
225
226       ingressLatency
227              Specifies the difference in nanoseconds between the reported re‐
228              ceive  time  stamp  and  the  actual reception time at reference
229              plane. This value will be subtracted from  ingress  time  stamps
230              obtained from the hardware.  The default is 0.
231
232
233       inhibit_delay_req
234              Don't send any delay requests. This will need the asCapable con‐
235              fig option to be set to 'true'. This is useful when running as a
236              designated  server  who  does  not need to calculate offset from
237              client. The default is 0 (disabled).
238
239
240       inhibit_multicast_service
241              Some unicast mode profiles insist that no multicast message  are
242              ever transmitted.  Setting this option inhibits multicast trans‐
243              mission.  The default is 0 (mutlicast enabled).
244
245
246       logAnnounceInterval
247              The mean time interval between Announce messages. A shorter  in‐
248              terval   makes   ptp4l  react  faster  to  the  changes  in  the
249              client/server hierarchy. The interval should be the same in  the
250              whole  domain. It's specified as a power of two in seconds.  The
251              default is 1 (2 seconds).
252
253
254       logMinDelayReqInterval
255              The minimum permitted mean time interval between Delay_Req  mes‐
256              sages.  A  shorter  interval  makes  ptp4l  react  faster to the
257              changes in the path delay. It's specified as a power of  two  in
258              seconds.  The default is 0 (1 second).
259
260
261       logMinPdelayReqInterval
262              The minimum permitted mean time interval between Pdelay_Req mes‐
263              sages. It's specified as a power of two in seconds.  The default
264              is 0 (1 second).
265
266
267       logSyncInterval
268              The mean time interval between Sync messages. A shorter interval
269              may improve accuracy of the local clock.  It's  specified  as  a
270              power of two in seconds.  The default is 0 (1 second).
271
272
273       masterOnly
274              This  option  is  deprecated and will be removed in a future re‐
275              lease.  Use "serverOnly" instead.
276
277
278       min_neighbor_prop_delay
279              Lower limit for peer delay in nanoseconds. If the estimated peer
280              delay  is  smaller  than  this  value  the port is marked as not
281              802.1AS capable.
282
283
284       neighborPropDelayThresh
285              Upper limit for peer delay in nanoseconds. If the estimated peer
286              delay  is  greater  than  this  value  the port is marked as not
287              802.1AS capable.
288
289
290       network_transport
291              Select the network transport. Possible values are  UDPv4,  UDPv6
292              and L2.  The default is UDPv4.
293
294
295       net_sync_monitor
296              Enables the NetSync Monitor (NSM) protocol. The NSM protocol al‐
297              lows a station to measure how well another node is synchronized.
298              The  monitor  sends  a  unicast delay request to the node, which
299              replies unconditionally with unicast delay response,  sync,  and
300              follow up messages. If the monitor is synchronized to the GM, it
301              can use the time stamps in the message to  estimate  the  node's
302              offset.   This  option  requires that the 'hybrid_e2e' option be
303              enabled as well.  The default is 0 (disabled).
304
305
306       operLogPdelayReqInterval
307              The Pdelay Request messages interval to be used once  the  clock
308              enters  the SERVO_LOCKED_STABLE state.  If the 'msg_interval_re‐
309              quest' option is set, then the local client port will adopt this
310              rate  when  the  local  clock  enters the "locked stable" state.
311              This option is specified as a power of two in seconds,  and  the
312              default value is 0 (1 second).
313
314
315       operLogSyncInterval
316              The  Sync message interval to be requested once the clock enters
317              the SERVO_LOCKED_STABLE state.   If  the  'msg_interval_request'
318              option  is  set, then the local client port will request the re‐
319              mote server to switch to the given message rate via a  signaling
320              message  containing a Message interval request TLV.  This option
321              is specified as a power of two in seconds, and default value  is
322              0 (1 second).
323
324
325       path_trace_enabled
326              Enable  the  mechanism  used  to trace the route of the Announce
327              messages.  The default is 0 (disabled).
328
329
330       phc_index
331              Specifies the index of the PHC to be  used  for  synchronization
332              with  hardware  timestamping. This option is useful with virtual
333              clocks running on top of a free-running physical clock  (created
334              by  writing  to  /sys/class/ptp/ptp*/n_vclocks).  The default is
335              -1, which means the index will be set to the PHC associated with
336              the interface, or the device specified by the -p option.
337
338
339       power_profile.2011.grandmasterTimeInaccuracy
340              Specifies  the  time inaccuracy of the GM in nanoseconds.  Rele‐
341              vant only when power_profile.version is 2011.  This value may be
342              changed  dynamically using the POWER_PROFILE_SETTINGS_NP manage‐
343              ment message.  The default is -1 meaning unknown inaccuracy.
344
345
346       power_profile.2011.networkTimeInaccuracy
347              Specifies the time inaccuracy of  the  network  in  nanoseconds.
348              Relevant  only  when  power_profile.version is 2011.  This value
349              may be changed dynamically using  the  POWER_PROFILE_SETTINGS_NP
350              management  message.   The default is -1 meaning unknown inaccu‐
351              racy.
352
353
354       power_profile.2017.totalTimeInaccuracy
355              Specifies the sum of the GM, network, and local  node  inaccura‐
356              cies  in  nanoseconds.  Relevant only when power_profile.version
357              is 2017.  This  value  may  be  changed  dynamically  using  the
358              POWER_PROFILE_SETTINGS_NP management message.  The default is -1
359              meaning unknown inaccuracy.
360
361
362       power_profile.grandmasterID
363              Specifies an optional, non-zero identification code for the  GM.
364              Note that the code is an arbitrary, power profile specific inte‐
365              ger, not necessarily related to the clockIdentity  in  any  way.
366              This  value  may  be  changed  dynamically  using the POWER_PRO‐
367              FILE_SETTINGS_NP management message.  The default is  0  meaning
368              unused.
369
370
371       power_profile.version
372              Specifies  the  power  profile version to be used.  Valid values
373              are "none", "2011", or "2017".  This value may be changed dynam‐
374              ically  using  the POWER_PROFILE_SETTINGS_NP management message.
375              The default is "none".
376
377
378       ptp_dst_mac
379              The MAC address to which PTP messages should be sent.   Relevant
380              only with L2 transport. The default is 01:1B:19:00:00:00.
381
382
383       p2p_dst_mac
384              The  MAC  address  to  which peer delay messages should be sent.
385              Relevant   only   with   L2   transport.    The    default    is
386              01:80:C2:00:00:0E.
387
388
389       serverOnly
390              Setting  this  option to one (1) prevents the port from entering
391              the client state. In addition, the local clock will  ignore  An‐
392              nounce  messages  received  on this port. This option's intended
393              use is to  support  the  Telecom  Profiles  according  to  ITU-T
394              G.8265.1,  G.8275.1,  and G.8275.2. The default value is zero or
395              false.
396
397
398       syncReceiptTimeout
399              The number of sync/follow up messages that may go missing before
400              triggering a Best Master Clock election. This option is used for
401              running in gPTP mode according  to  the  802.1AS-2011  standard.
402              Setting  this option to zero will disable the sync message time‐
403              out.  The default is 0 or disabled.
404
405
406       transportSpecific
407              The transport specific field. Must be in the  range  0  to  255.
408              The default is 0.
409
410
411       tsproc_mode
412              Select  the  time stamp processing mode used to calculate offset
413              and delay.  Possible  values  are  filter,  raw,  filter_weight,
414              raw_weight.  Raw  modes  perform well when the rate of sync mes‐
415              sages (logSyncInterval) is similar to the rate of delay messages
416              (logMinDelayReqInterval  or  logMinPdelayReqInterval). Weighting
417              is useful with larger network jitters (e.g. software time stamp‐
418              ing).  The default is filter.
419
420
421       udp_ttl
422              Specifies  the  Time to live (TTL) value for IPv4 multicast mes‐
423              sages and the hop limit for IPv6 multicast messages. This option
424              is  only relevant with the IPv4 and IPv6 UDP transports. The de‐
425              fault is 1 to restrict the messages sent by ptp4l  to  the  same
426              subnet.
427
428
429       unicast_listen
430              When  enabled, this option allows the port to grant unicast mes‐
431              sage contracts.  Incoming requests for will be  granted  limited
432              only  by the amount of memory available.  The default is 0 (dis‐
433              abled).
434
435
436       unicast_master_table
437              When set to a positive integer, this option specifies the  table
438              id  to  be  used for unicast discovery.  Each table lives in its
439              own section and has a unique, positive numerical ID.  Entries in
440              the  table  are  a  pair of transport type and protocol address.
441              The default is 0 (unicast discovery disabled).
442
443
444       unicast_req_duration
445              The service time in seconds to be requested during unicast  dis‐
446              covery.   Note that the remote node is free to grant a different
447              duration.  The default is 3600 seconds or one hour.
448
449

PROGRAM AND CLOCK OPTIONS

451       asCapable
452              If set to 'true', all the checks which can unset asCapable vari‐
453              able  (as described in Section 10.2.4.1 of 802.1AS) are skipped.
454              If set to 'auto', asCapable is initialized to 'false'  and  will
455              be  set to 'true' after the relevant checks have passed. The de‐
456              fault value is 'auto'.
457
458
459       assume_two_step
460              Treat one-step responses as two-step if enabled. It is  used  to
461              work  around  buggy  802.1AS  switches.   The default is 0 (dis‐
462              abled).
463
464
465       BMCA   This option enables use of static roles for  server  and  client
466              devices  instead  of  running  the  best  master clock algorithm
467              (BMCA) described in 1588 profile. This can be used to  speed  up
468              the  start  time for servers and clients when you know the roles
469              of the devices in advance.  When set to ´noop', the  traditional
470              BMCA  algorithm  used  by 1588 is skipped. masterOnly and clien‐
471              tOnly will be used to determine the server or  client  role  for
472              the  device.  In a bridge, clientOnly (which is a global option)
473              can be set to make all ports assume the client role.  masterOnly
474              (which  is a per-port config option) can then be used to set in‐
475              dividual ports to take on the server role.  The default value is
476              'ptp' which runs the BMCA related state machines.
477
478
479       check_fup_sync
480              Because  of  packet reordering that can occur in the network, in
481              the hardware, or in the networking stack, a  follow  up  message
482              can appear to arrive in the application before the matching sync
483              message. As this is a normal occurrence, and the sequenceID mes‐
484              sage  field  ensures  proper matching, the ptp4l program accepts
485              out of order packets. This option adds an additional check using
486              the  software  time  stamps  from the networking stack to verify
487              that the sync message did arrive first. This option is only use‐
488              ful  if  you  do  not  trust  the  sequence IDs generated by the
489              server.  The default is 0 (disabled).
490
491
492       clientOnly
493              The local clock is a client-only clock if enabled.  The  default
494              is 0 (disabled).
495
496
497       clockAccuracy
498              The  clockAccuracy  attribute  of the local clock. It is used in
499              the PTP server selection algorithm.  The default is 0xFE.
500
501
502       clockClass
503              The clockClass attribute of the  local  clock.  It  denotes  the
504              traceability  of  the time distributed by the grandmaster clock.
505              The default is 248.
506
507
508       clock_class_threshold
509              The maximum clock class value from master, acceptible to sub-or‐
510              dinate  clock  beyond which it moves out of lock state.  The de‐
511              fault value is 248.
512
513
514       clockIdentity
515              The clockIdentity attribute of the local clock.  The  clockIden‐
516              tity  is  an  8-octet  array and should in this configuration be
517              written in textual form, see default. It should be unique  since
518              it  is  used to identify the specific clock.  If default is used
519              or if not set at all, the  clockIdentity  will  be  automtically
520              generated.  The default is "000000.0000.000000"
521
522
523       clock_servo
524              The  servo  which  is used to synchronize the local clock. Valid
525              values are "pi" for a PI controller, "linreg"  for  an  adaptive
526              controller using linear regression, "ntpshm" and "refclock_sock"
527              for the NTP SHM and chrony SOCK reference clocks respectively to
528              allow  another  process  to  synchronize  the  local  clock, and
529              "nullf" for a servo that always dials frequency offset zero (for
530              use in SyncE nodes).  The default is "pi."
531
532
533       clock_type
534              Specifies  the kind of PTP clock.  Valid values are "OC" for or‐
535              dinary clock, "BC" for boundary clock, "P2P_TC" for peer to peer
536              transparent  clock,  and  "E2E_TC"  for  end  to end transparent
537              clock.  An multi-port ordinary clock will automatically be  con‐
538              figured as a boundary clock.  The default is "OC".
539
540
541       dataset_comparison
542              Specifies  the method to be used when comparing data sets during
543              the Best  Master  Clock  Algorithm.   The  possible  values  are
544              "ieee1588" and "G.8275.x".  The default is "ieee1588".
545
546
547       domainNumber
548              The domain attribute of the local clock.  The default is 0.
549
550
551       dscp_event
552              Defines  the Differentiated Services Codepoint (DSCP) to be used
553              for PTP event messages. Must be a value between 0 and 63.  There
554              are  several  media  streaming  standards out there that require
555              specific values for this option.  For example  46  (EF  PHB)  in
556              AES67 or 48 (CS6 PHB) in RAVENNA. The default is 0.
557
558
559       dscp_general
560              Defines  the Differentiated Services Codepoint (DSCP) to be used
561              for PTP general messages. Must be a  value  between  0  and  63.
562              There  are several media streaming standards out there that rec‐
563              ommend specific values for this option.  For  example  34  (AF41
564              PHB) in AES67 or 46 (EF PHB) in RAVENNA. The default is 0.
565
566
567       first_step_threshold
568              The  maximum offset the servo will correct by changing the clock
569              frequency (phase when using nullf servo) instead of stepping the
570              clock.  This is only applied on the first update. It's specified
571              in seconds. When set to 0.0, the servo won't step the  clock  on
572              start.   The  default is 0.00002 (20 microseconds).  This option
573              used to be called pi_f_offset_const.
574
575
576       free_running
577              Don't adjust the local clock if enabled.  The default is 0 (dis‐
578              abled).
579
580
581       freq_est_interval
582              The time interval over which is estimated the ratio of the local
583              and peer clock frequencies. It is specified as a power of two in
584              seconds.  The default is 1 (2 seconds).
585
586
587       G.8275.defaultDS.localPriority
588              The  Telecom  Profiles  (ITU-T G.8275.1 and G.8275.2) specify an
589              alternate Best Master Clock Algorithm (BMCA) with a unique  data
590              set  comparison  algorithm.  The value of this option is associ‐
591              ated with the local clock and is used as a tie breaker  whenever
592              clockClass,  clockAccuracy,  offsetScaledLogVariance, and prior‐
593              ity2 are equal. This option is only used when  "dataset_compari‐
594              son" is set to "G.8275.x".  The default value is 128.
595
596              Warning: the BMCA is guaranteed to produce a spanning tree (that
597              is, a timing network without loops) only when using the  default
598              values  of  G.8275.defaultDS.localPriority and G.8275.portDS.lo‐
599              calPriority.  Careful network engineering is needed  when  using
600              non-default values.
601
602
603       gmCapable
604              If  this  option is enabled, then the local clock is able to be‐
605              come grand master.  This is only for use with 802.1AS clocks and
606              has no effect on 1588 clocks.  The default is 1 (enabled).
607
608
609       ignore_source_id
610              This  will  disable  source  port identity checking for Sync and
611              Follow_Up messages. This is useful when  the  announce  messages
612              are  disabled in the server and the client does not have any way
613              to know the server's identity.  The default is 0 (disabled).
614
615
616       inhibit_announce
617              This  will  disable  the  timer  for  announce  messages   (i.e.
618              FD_MANNO_TIMER)  and  also  the  announce  message timeout timer
619              (i.e. FD_ANNOUNCE_TIMER). This is used by the Automotive profile
620              as  part  of switching over to a static BMCA.  If this option is
621              enabled, ignore_source_id has to be enabled in  the  client  be‐
622              cause  it has no way to identify the server in the Sync and Fol‐
623              low_Up messages. The default is 0 (disabled).
624
625
626       initial_delay
627              The initial path delay of the clock in nanoseconds used for syn‐
628              chronization of the clock before the delay is measured using the
629              E2E or P2P delay mechanism. If set to 0, the clock will  not  be
630              updated until the delay is measured.  The default is 0.
631
632
633       interface_rate_tlv
634              When  the  client and server are operating are operating at dif‐
635              ferent interface rate, delay asymmetry caused due  to  different
636              interface  rate  needs  to be compensated.  The server sends its
637              interface rate using interface rate TLV as per G.8275.2 Annex D.
638              The default is 0 (does not support interface rate tlv).
639
640
641       hwts_filter
642              Select  the  hardware  time stamp filter setting mode.  Possible
643              values are normal, check, full.  Normal mode set the filters  as
644              needed.   Check  mode  only check but do not set.  Full mode set
645              the receive filter to mark all packets with hardware time stamp,
646               so all applications can get them.  The default is normal.
647
648
649       kernel_leap
650              When a leap second is announced, let  the  kernel  apply  it  by
651              stepping  the  clock instead of correcting the one-second offset
652              with servo, which would correct the one-second offset slowly  by
653              changing  the  clock frequency (unless the step_threshold option
654              is set to correct such offset by stepping).  Relevant only  with
655              software time stamping. The default is 1 (enabled).
656
657
658       logging_level
659              The  maximum  logging level of messages which should be printed.
660              The default is 6 (LOG_INFO).
661
662
663       manufacturerIdentity
664              The manufacturer id which should be an OUI owned by the manufac‐
665              turer.  The default is 00:00:00.
666
667
668       max_frequency
669              The  maximum  allowed frequency adjustment of the clock in parts
670              per billion (ppb). This is an additional limit  to  the  maximum
671              allowed  by the hardware. When set to 0, the hardware limit will
672              be used.  The default is 900000000 (90%).  This option  used  to
673              be called pi_max_frequency.
674
675
676       maxStepsRemoved
677              When  using  this option, if the value of stepsRemoved of an An‐
678              nounce message is greater than or equal to the value of maxStep‐
679              sRemoved the Announce message is not considered in the operation
680              of the BMCA.  The default value is 255.
681
682
683       message_tag
684              The tag which is added to all messages printed to  the  standard
685              output  or  system  log.   The default is an empty string (which
686              cannot be set in the configuration file as the  option  requires
687              an argument).
688
689
690       msg_interval_request
691              This  option,  when  set, will trigger an adjustment to the Sync
692              and peer delay request message intervals when  the  clock  servo
693              transitions into the SERVO_LOCKED_STABLE state.  The Sync inter‐
694              val will be adjusted via the signaling mechanism while the  pde‐
695              lay  request interval is simply adjusted locally.  The values to
696              use for the new Sync and peer delay request intervals are speci‐
697              fied by the operLogSyncInterval and operLogPdelayReqInterval op‐
698              tions, respectively.  The default value of  msg_interval_request
699              is 0 (disabled).
700
701
702       ntpshm_segment
703              The number of the SHM segment used by ntpshm servo.  The default
704              is 0.
705
706
707       offsetScaledLogVariance
708              The offsetScaledLogVariance attribute of  the  local  clock.  It
709              characterizes  the  stability  of  the  clock.   The  default is
710              0xFFFF.
711
712
713       pi_integral_const
714              The integral constant of the PI controller. When set to 0.0, the
715              integral  constant will be set by the following formula from the
716              current sync interval.  The default is 0.0.
717
718              ki = min(ki_scale * sync^ki_exponent, ki_norm_max / sync)
719
720
721       pi_integral_exponent
722              The ki_exponent constant in the formula used to set the integral
723              constant  of  the PI controller from the sync interval.  The de‐
724              fault is 0.4.
725
726
727       pi_integral_norm_max
728              The ki_norm_max constant in the formula used to set the integral
729              constant  of  the PI controller from the sync interval.  The de‐
730              fault is 0.3.
731
732
733       pi_integral_scale
734              The ki_scale constant in the formula used to  set  the  integral
735              constant  of  the PI controller from the sync interval. When set
736              to 0.0, the value will be selected from 0.3 and  0.001  for  the
737              hardware  and  software time stamping respectively.  The default
738              is 0.0.
739
740
741       pi_proportional_const
742              The proportional constant of the PI controller. When set to 0.0,
743              the  proportional  constant will be set by the following formula
744              from the current sync interval.  The default is 0.0.
745
746              kp = min(kp_scale * sync^kp_exponent, kp_norm_max / sync)
747
748
749       pi_proportional_exponent
750              The kp_exponent constant in the formula used to set the  propor‐
751              tional  constant  of  the  PI controller from the sync interval.
752              The default is -0.3.
753
754
755       pi_proportional_norm_max
756              The kp_norm_max constant in the formula used to set the  propor‐
757              tional  constant  of  the  PI controller from the sync interval.
758              The default is 0.7
759
760
761       pi_proportional_scale
762              The kp_scale constant in the formula used  to  set  the  propor‐
763              tional  constant  of  the  PI controller from the sync interval.
764              When set to 0.0, the value will be selected from 0.7 and 0.1 for
765              the  hardware  and software time stamping respectively.  The de‐
766              fault is 0.0.
767
768
769       productDescription
770              The product description string. Allowed values must  be  of  the
771              form manufacturerName;modelNumber;instanceIdentifier and contain
772              at most 64 utf8 symbols. The default is ";;".
773
774
775       priority1
776              The priority1 attribute of the local clock. It is  used  in  the
777              PTP  server  selection  algorithm, lower values take precedence.
778              Must be in the range 0 to 255.  The default is 128.
779
780
781       priority2
782              The priority2 attribute of the local clock. It is  used  in  the
783              PTP  server  selection  algorithm, lower values take precedence.
784              Must be in the range 0 to 255.  The default is 128.
785
786
787       refclock_sock_address
788              The address of the UNIX domain socket to be  used  by  the  ref‐
789              clock_sock servo.  The default is /var/run/refclock.ptp.sock.
790
791
792       revisionData
793              The revision description string which contains the revisions for
794              node hardware (HW), firmware (FW), and  software  (SW).  Allowed
795              values are of the form HW;FW;SW and contain at most 32 utf8 sym‐
796              bols. The default is an ";;".
797
798
799       sanity_freq_limit
800              The maximum allowed frequency offset between  uncorrected  clock
801              and  the system monotonic clock in parts per billion (ppb). This
802              is used as a sanity check of  the  synchronized  clock.  When  a
803              larger offset is measured, a warning message will be printed and
804              the servo will be reset. If  the  frequency  correction  set  by
805              ptp4l  changes  unexpectedly  between updates of the clock (e.g.
806              due to another process trying to control the clock),  a  warning
807              message will be printed. When set to 0, the sanity check is dis‐
808              abled. The default is 200000000 (20%).
809
810
811       servo_num_offset_values
812              The number of offset values considered in  order  to  transition
813              from  the  SERVO_LOCKED  to  the SERVO_LOCKED_STABLE state.  The
814              transition occurs once the last  'servo_num_offset_values'  off‐
815              sets  are all below the 'servo_offset_threshold' value.  The de‐
816              fault value is 10.
817
818
819       servo_offset_threshold
820              The offset threshold  used  in  order  to  transition  from  the
821              SERVO_LOCKED  to  the SERVO_LOCKED_STABLE state.  The transition
822              occurs once the last 'servo_num_offset_values' offsets  are  all
823              below  the threshold value.  The default value of offset_thresh‐
824              old is 0 (disabled).
825
826
827       slave_event_monitor
828              Specifies the address of a UNIX domain socket for event monitor‐
829              ing.   A  local monitoring client bound to this address will re‐
830              ceive SLAVE_RX_SYNC_TIMING_DATA  and  SLAVE_DELAY_TIMING_DATA_NP
831              TLVs.  The default is the empty string (disabled).
832
833
834       slaveOnly
835              This  option  is  deprecated and will be removed in a future re‐
836              lease.  Use "clientOnly" instead.
837
838
839       socket_priority
840              Configure the SO_PRIORITY of sockets. This is to  support  cases
841              where a user wants to route ptp4l traffic using Linux qdiscs for
842              the purpose of traffic shaping. This option  is  only  available
843              with  the  IEEE  802.3 transport (the -2 option) and is silently
844              ignored when using the UDP IPv4/6 network transports. Must be in
845              the range of 0 to 15, inclusive. The default is 0.
846
847
848       step_threshold
849              The  maximum offset the servo will correct by changing the clock
850              frequency (phase when using nullf servo) instead of stepping the
851              clock.  When set to 0.0, the servo will never step the clock ex‐
852              cept on start. It's specified in seconds.  The default  is  0.0.
853              This option used to be called pi_offset_const.
854
855
856       step_window
857              When set, indicates the number of Sync events after a clock step
858              that the clock will not do any frequency  or  step  adjustments.
859              This  is  used  in  situations where clock stepping is unable to
860              happen instantaneously so there is a lag before  the  timestamps
861              can settle properly to reflect the clock step.  The default is 0
862              (disabled).
863
864
865       summary_interval
866              The time interval in which are printed summary statistics of the
867              clock. It is specified as a power of two in seconds. The statis‐
868              tics include offset root mean  square  (RMS),  maximum  absolute
869              offset,  frequency  offset mean and standard deviation, and path
870              delay mean and standard deviation. The units are nanoseconds and
871              parts  per  billion  (ppb). If there is only one clock update in
872              the interval, the sample will be printed instead of the  statis‐
873              tics.  The  messages are printed at the LOG_INFO level.  The de‐
874              fault is 0 (1 second).
875
876
877       tc_spanning_tree
878              When running as a Transparent  Clock,  increment  the  "stepsRe‐
879              moved"  field of Announce messages that pass through the switch.
880              Enabling this option ensures that PTP message loops never  form,
881              provided  the  switches  all implement this option together with
882              the BMCA.
883
884
885       timeSource
886              The time source is a single byte code that gives an idea of  the
887              kind  of  local clock in use. The value is purely informational,
888              having no effect on the outcome of the Best Master  Clock  algo‐
889              rithm, and is advertised when the clock becomes grand master.
890
891
892       time_stamping
893              The  time  stamping  method  to be used.  The allowed values are
894              hardware, software, legacy, onestep, and p2p1step.  The  default
895              is hardware.
896
897
898       twoStepFlag
899              Enable  two-step  mode  for  sync messages. One-step mode can be
900              used only with hardware time stamping.  The default  is  1  (en‐
901              abled).
902
903
904       tx_timestamp_timeout
905              The number of milliseconds to poll waiting for the tx time stamp
906              from the kernel when a message has recently been sent.  The  de‐
907              fault is 10.
908
909
910       udp6_scope
911              Specifies  the  desired  scope  for the IPv6 multicast messages.
912              This will be used as the second byte  of  the  primary  address.
913              This option is only relevant with IPv6 transport.  See RFC 4291.
914              The default is 0x0E for the global scope.
915
916
917       uds_address
918              Specifies the address of the UNIX domain  socket  for  receiving
919              local management messages. The default is /var/run/ptp4l.
920
921
922       uds_file_mode
923              File  mode  of  the  UNIX domain socket used for receiving local
924              management messages. The mode should be specified  as  an  octal
925              number,  i.e. it should start with a 0 literal. The default mode
926              is 0660.
927
928
929       uds_ro_address
930              Specifies the address of the second UNIX domain socket  for  re‐
931              ceiving  local  management  messages, which is restricted to GET
932              actions and does not forward messages to other ports. Access  to
933              this  socket can be given to untrusted applications for monitor‐
934              ing purposes. The default is /var/run/ptp4lro.
935
936
937       uds_ro_file_mode
938              File mode of the second (read-only) UNIX domain socket used  for
939              receiving  local  management messages. The mode should be speci‐
940              fied as an octal number, i.e. it should start with a 0  literal.
941              The default mode is 0666.
942
943
944       use_syslog
945              Print  messages  to the system log if enabled.  The default is 1
946              (enabled).
947
948
949       userDescription
950              The user description string. Allowed  values  are  of  the  form
951              name;location  and contain at most 128 utf8 symbols. The default
952              is an empty string.
953
954
955       utc_offset
956              The current offset between TAI and UTC.  The default is 37.
957
958
959       verbose
960              Print messages to the standard output if enabled.   The  default
961              is 0 (disabled).
962
963
964       write_phase_mode
965              This  option  enables  using  the "write phase" feature of a PTP
966              Hardware Clock.  If supported by the device, this mode uses  the
967              hardware's  built  in  phase offset control instead of frequency
968              offset control.  The default value is 0 (disabled).
969
970

UNICAST DISCOVERY OPTIONS

972       L2|UDPv4|UDPv6
973              Each table entry specifies the transport type  and  network  ad‐
974              dress  of  a  potential  remote server.  If multiple servers are
975              specified, then unicast negotiation will be performed with  each
976              if them.
977
978
979       logQueryInterval
980              This option configures the time to wait between unicast negotia‐
981              tion attempts.  It is specified as a power of  two  in  seconds.
982              The default is 0 (1 second).
983
984
985       peer_address
986              This  option  specifies  the unicast address of the peer for use
987              with the peer to peer delay mechanism.  If specified,  the  port
988              owning  the  table  will  negotiate unicast peer delay responses
989              from the machine at the given remote address, otherwise the port
990              will send multicast peer delay requests.
991
992
993       table_id
994              Each  table  must  begin  with a unique, positive table ID.  The
995              port that claims a given table does so by including  the  ID  as
996              the value of its 'unicast_master_table' option.
997
998

TIME SCALE USAGE

1000       When ptp4l acts as the domain server, it either uses the PTP or the UTC
1001       time scale depending on time stamping mode.   In  software  and  legacy
1002       time  stamping  modes  it announces Arbitrary time scale mode, which is
1003       effectively UTC here.  In hardware time stamping mode it announces  use
1004       of PTP time scale.
1005
1006       When  ptp4l is the domain server using hardware time stamping, it is up
1007       to phc2sys to maintain the correct offset between UTC  and  PTP  times.
1008       See phc2sys(8) manual page for more details.
1009
1010

SEE ALSO

1012       pmc(8), phc2sys(8)
1013
1014
1015
1016linuxptp                         February 2023                        PTP4l(8)
Impressum