Each and every configuration file option (see below) may also appear as a “long” style command line argument. For example, the clientOnly option may be set using either of these two forms.
Option values given on the command line override values in the global section of the configuration file.
The configuration file is divided into sections. Each section starts with a line containing its name enclosed in brackets and it follows with settings. Each setting is placed on a separate line, it contains the name of the option and the value separated by whitespace characters. Empty lines and lines starting with # are ignored.
There are three different section types.
delayAsymmetryThe time difference in nanoseconds of the transmit and receive paths. This value should be positive when the server-to-client propagation time is longer and negative when the client-to-server time is longer. The default is 0 nanoseconds.
logAnnounceIntervalThe mean time interval between Announce messages. A shorter interval makes ptp4l react faster to the changes in the client/server hierarchy. The interval should be the same in the whole domain. It’s specified as a power of two in seconds. The default is 1 (2 seconds).
logSyncIntervalThe mean time interval between Sync messages. A shorter interval may improve accuracy of the local clock. It’s specified as a power of two in seconds. The default is 0 (1 second).
operLogSyncIntervalThe Sync message interval to be requested once the clock enters the SERVO_LOCKED_STABLE state. If the msg_interval_request option is set, then the local client port will request the remote server to switch to the given message rate via a signaling message containing a Message interval request TLV. This option is specified as a power of two in seconds, and default value is 0 (1 second).
logMinDelayReqIntervalThe minimum permitted mean time interval between Delay_Req messages. A shorter interval makes ptp4l react faster to the changes in the path delay. It’s specified as a power of two in seconds. The default is 0 (1 second).
logMinPdelayReqIntervalThe minimum permitted mean time interval between Pdelay_Req messages. It’s specified as a power of two in seconds. The default is 0 (1 second).
operLogPdelayReqIntervalThe Pdelay Request messages interval to be used once the clock enters the SERVO_LOCKED_STABLE state. If the msg_interval_request option is set, then the local client port will adopt this rate when the local clock enters the “locked stable” state. This option is specified as a power of two in seconds, and the default value is 0 (1 second).
inhibit_delay_reqDon’t send any delay requests. This will need the asCapable config option to be set to true. This is useful when running as a designated server who does not need to calculate offset from client. The default is 0 (disabled).
announceReceiptTimeoutThe number of missed Announce messages before the last Announce messages expires. The default is 3.
syncReceiptTimeoutThe number of sync/follow up messages that may go missing before triggering a Best Master Clock election. This option is used for running in gPTP mode according to the 802.1AS-2011 standard. Setting this option to zero will disable the sync message timeout. The default is 0 or disabled.
delay_response_timeoutThe number of delay response messages that may go missing before triggering a synchronization fault. Setting this option to zero will disable the delay response timeout. The default is 0 or disabled.
transportSpecificThe transport specific field. Must be in the range 0 to 255. The default is 0.
ignore_transport_specificBy default, incoming messages are dropped if their transportSpecific field does not match the configured value. However, many transports specified in the 1588 standard mandate ignoring this field. Moreover, some equipment is known to set the reserved bits. Configuring this option as 1 causes this field to be ignored completely on receive. The default is 0.
path_trace_enabledEnable the mechanism used to trace the route of the Announce messages. The default is 0 (disabled).
follow_up_infoInclude the 802.1AS data in the Follow_Up messages if enabled. The default is 0 (disabled).
fault_reset_intervalThe time in seconds between the detection of a port’s fault and the fault being reset. This value is expressed as a power of two. Setting this value to -128 or to the special key word ASAP will let the fault be reset immediately. The default is 4 (16 seconds).
fault_badpeernet_intervalThe time in seconds between the detection of a peer network misconfiguration and the fault being reset. The port is disabled for the duration of the interval. The value is in seconds and the special key word ASAP will let the fault be reset immediately. The default is 16 seconds.
delay_mechanismSelect the delay mechanism. Possible values are E2E, P2P, and Auto. The default is E2E.
hybrid_e2eEnables the hybrid delay mechanism from the draft Enterprise Profile. When enabled, ports in the client state send their delay request messages to the unicast address taken from the server’s announce message. Ports in the server state will reply to unicast delay requests using unicast delay responses. This option has no effect if the delay_mechanism is set to P2P. The default is 0 (disabled).
inhibit_multicast_serviceSome unicast mode profiles insist that no multicast message are ever transmitted. Setting this option inhibits multicast transmission. The default is 0 (mutlicast enabled).
net_sync_monitorEnables the NetSync Monitor (NSM) protocol. The NSM protocol allows a station to measure how well another node is synchronized. The monitor sends a unicast delay request to the node, which replies unconditionally with unicast delay response, sync, and follow up messages. If the monitor is synchronized to the GM, it can use the time stamps in the message to estimate the node’s offset. This option requires that the hybrid_e2e option be enabled as well. The default is 0 (disabled).
unicast_listenWhen enabled, this option allows the port to grant unicast message contracts. Incoming requests will be granted, limited only by the amount of memory available. The default is 0 (disabled).
unicast_master_tableWhen set to a positive integer, this option specifies the table id to be used for unicast discovery. Each table lives in its own section and has a unique, positive numerical ID. Entries in the table are a pair of transport type and protocol address. The default is 0 (unicast discovery disabled).
unicast_req_durationThe service time in seconds to be requested during unicast discovery. Note that the remote node is free to grant a different duration. The default is 3600 seconds or one hour.
ptp_dst_macThe MAC address to which PTP messages should be sent. Relevant only with L2 transport. The default is 01:1B:19:00:00:00.
p2p_dst_macThe MAC address to which peer delay messages should be sent. Relevant only with L2 transport. The default is 01:80:C2:00:00:0E.
Select the network transport. Possible values are UDPv4, UDPv6, and L2. The default is UDPv4.
twoStepFlagEnable two-step mode for sync messages. One-step mode can be used only with hardware time stamping. The default is 1 (enabled).
clientOnlyThe local clock is a client-only clock if enabled. The default is 0 (disabled).
slaveOnlyThis option is deprecated and will be removed in a future release. Use clientOnly instead.
socket_priorityConfigure the SO_PRIORITY of sockets. This is to support cases where a user
wants to route ptp4l traffic using Linux qdiscs for the purpose of traffic
shaping. This option is only available with the IEEE 802.3 transport (the -2 option) and is silently ignored when using the UDP IPv4/6 network transports. Must be in the range of 0 to 15, inclusive. The default is 0.
gmCapableIf this option is enabled, then the local clock is able to become grand master. This is only for use with 802.1AS clocks and has no effect on 1588 clocks. The default is 1 (enabled).
priority1The priority1 attribute of the local clock. It is used in the PTP server selection algorithm, lower values take precedence. Must be in the range 0 to 255. The default is 128.
priority2The priority2 attribute of the local clock. It is used in the PTP server selection algorithm, lower values take precedence. Must be in the range 0 to 255. The default is 128.
clockClassThe clockClass attribute of the local clock. It denotes the traceability of the time distributed by the grandmaster clock. The default is 248.
clockAccuracyThe clockAccuracy attribute of the local clock. It is used in the PTP server selection algorithm. The default is 0xFE.
clockIdentityThe clockIdentity attribute of the local clock. The clockIdentity is an 8-octet array and should in this configuration be written in textual form, see default. It should be unique since it is used to identify the specific clock. If default is used or if not set at all, the clockIdentity will be automtically generated. The default is 000000.0000.000000.
offsetScaledLogVarianceThe offsetScaledLogVariance attribute of the local clock. It characterizes the stability of the clock. The default is 0xFFFF.
G.8275.defaultDS.localPriorityThe Telecom Profiles (ITU-T G.8275.1 and G.8275.2) specify an alternate Best Master Clock Algorithm (BMCA) with a unique data set comparison algorithm. The value of this option is associated with the local clock and is used as a tie breaker whenever clockClass, clockAccuracy, offsetScaledLogVariance, and priority2 are equal. This option is only used when dataset_comparison is set to G.8275.x. The default value is 128.
maxStepsRemovedWhen using this option, if the value of stepsRemoved of an Announce message is greater than or equal to the value of maxStepsRemoved, the Announce message is not considered in the operation of the BMCA. The default value is 255.
clock_class_thresholdThe maximum clock class value from master, acceptible to sub-ordinate clock beyond which it moves out of lock state. The default value is 248.
domainNumberThe domain attribute of the local clock. The default is 0.
utc_offsetThe current offset between TAI and UTC. The default is 37.
free_runningDon’t adjust the local clock if enabled. The default is 0 (disabled).
freq_est_intervalThe time interval over which is estimated the ratio of the local and peer clock frequencies. It is specified as a power of two in seconds. The default is 1 (2 seconds).
assume_two_stepTreat one-step responses as two-step if enabled. It is used to work around buggy 802.1AS switches. The default is 0 (disabled).
tc_spanning_treeWhen running as a Transparent Clock, increment the stepsRemoved field of Announce messages that pass through the switch. Enabling this option ensures that PTP message loops never form, provided the switches all implement this option together with the BMCA.
tx_timestamp_timeoutThe number of milliseconds to poll waiting for the tx time stamp from the kernel when a message has recently been sent. The default is 10.
check_fup_syncBecause of packet reordering that can occur in the network, in the hardware, or in the networking stack, a follow up message can appear to arrive in the application before the matching sync message. As this is a normal occurrence, and the sequenceID message field ensures proper matching, the ptp4l program accepts out of order packets. This option adds an additional check using the software time stamps from the networking stack to verify that the sync message did arrive first. This option is only useful if you do not trust the sequence IDs generated by the server. The default is 0 (disabled).
clock_servoThe servo which is used to synchronize the local clock. Valid values are pi for a PI controller, linreg for an adaptive controller using linear regression, ntpshm for the NTP SHM reference clock to allow another process to synchronize the local clock (the SHM segment number is set to the domain number), and nullf for a servo that always dials frequency offset zero (for use in SyncE nodes). The default is pi.
clock_typeSpecifies the kind of PTP clock. Valid values are OC for ordinary clock, BC for boundary clock, P2P_TC for peer to peer transparent clock, and E2E_TC for end to end transparent clock. A multi-port ordinary clock will automatically be configured as a boundary clock. The default is OC.
pi_proportional_constThe proportional constant of the PI controller. When set to 0.0, the proportional constant will be set by the following formula from the current sync interval. The default is 0.0.
pi_proportional_scaleThe kp_scale constant in the formula used to set the proportional constant of the PI controller from the sync interval. When set to 0.0, the value will be selected from 0.7 and 0.1 for the hardware and software time stamping respectively. The default is 0.0.
pi_proportional_exponentThe kp_exponent constant in the formula used to set the proportional constant of the PI controller from the sync interval. The default is -0.3.
pi_proportional_norm_maxThe kp_norm_max constant in the formula used to set the proportional constant of the PI controller from the sync interval. The default is 0.7
pi_integral_scaleThe ki_scale constant in the formula used to set the integral constant of the PI controller from the sync interval. When set to 0.0, the value will be selected from 0.3 and 0.001 for the hardware and software time stamping respectively. The default is 0.0.
pi_integral_exponentThe ki_exponent constant in the formula used to set the integral constant of the PI controller from the sync interval. The default is 0.4.
pi_integral_norm_maxThe ki_norm_max constant in the formula used to set the integral constant of the PI controller from the sync interval. The default is 0.3.
step_thresholdThe maximum offset the servo will correct by changing the clock frequency instead of stepping the clock. When set to 0.0, the servo will never step the clock except on start. It’s specified in seconds. The default is 0.0. This option used to be called pi_offset_const.
first_step_thresholdThe maximum offset the servo will correct by changing the clock frequency instead of stepping the clock. This is only applied on the first update. It’s specified in seconds. When set to 0.0, the servo won’t step the clock on start. The default is 0.00002 (20 microseconds). This option used to be called pi_f_offset_const.
max_frequencyThe maximum allowed frequency adjustment of the clock in parts per billion (ppb). This is an additional limit to the maximum allowed by the hardware. When set to 0, the hardware limit will be used. The default is 900000000 (90%). This option used to be called pi_max_frequency.
sanity_freq_limitThe maximum allowed frequency offset between uncorrected clock and the system monotonic clock in parts per billion (ppb). This is used as a sanity check of the synchronized clock. When a larger offset is measured, a warning message will be printed and the servo will be reset. When set to 0, the sanity check is disabled. The default is 200000000 (20%).
initial_delayThe initial path delay of the clock in nanoseconds used for synchronization of the clock before the delay is measured using the E2E or P2P delay mechanism. If set to 0, the clock will not be updated until the delay is measured. The default is 0.
ntpshm_segmentThe number of the SHM segment used by ntpshm servo. The default is 0.
udp6_scopeSpecifies the desired scope for the IPv6 multicast messages. This will be used as the second byte of the primary address. This option is only relevant with IPv6 transport. See RFC 4291. The default is 0x0E for the global scope.
uds_addressSpecifies the address of the UNIX domain socket for receiving local management messages. The default is /var/run/ptp4l.
uds_ro_addressSpecifies the address of the second UNIX domain socket for receiving local management messages, which is restricted to GET actions and does not forward messages to other ports. Access to this socket can be given to untrusted applications for monitoring purposes. The default is /var/run/ptp4lro.
uds_file_modeFile mode of the UNIX domain socket used for receiving local management messages. The mode should be specified as an octal number, i.e. it should start with a 0 literal. The default mode is 0660.
uds_ro_file_modeFile mode of the second (read-only) UNIX domain socket used for receiving local management messages. The mode should be specified as an octal number, i.e. it should start with a 0 literal. The default mode is 0666.
dscp_eventDefines the Differentiated Services Codepoint (DSCP) to be used for PTP event messages. Must be a value between 0 and 63. There are several media streaming standards out there that require specific values for this option. For example 46 (EF PHB) in AES67 or 48 (CS6 PHB) in RAVENNA. The default is 0.
dscp_generalDefines the Differentiated Services Codepoint (DSCP) to be used for PTP general messages. Must be a value between 0 and 63. There are several media streaming standards out there that recommend specific values for this option. For example 34 (AF41 PHB) in AES67 or 46 (EF PHB) in RAVENNA. The default is 0.
dataset_comparisonSpecifies the method to be used when comparing data sets during the Best Master Clock Algorithm. The possible values are ieee1588 and G.8275.x. The default is ieee1588.
logging_levelThe maximum logging level of messages which should be printed. The default is 6 (LOG_INFO).
message_tagThe tag which is added to all messages printed to the standard output or system log. The default is an empty string (which cannot be set in the configuration file as the option requires an argument).
verbosePrint messages to the standard output if enabled. The default is 0 (disabled).
use_syslogPrint messages to the system log if enabled. The default is 1 (enabled).
summary_intervalThe time interval in which are printed summary statistics of the clock. It is specified as a power of two in seconds. The statistics include offset root mean square (RMS), maximum absolute offset, frequency offset mean and standard deviation, and path delay mean and standard deviation. The units are nanoseconds and parts per billion (ppb). If there is only one clock update in the interval, the sample will be printed instead of the statistics. The messages are printed at the LOG_INFO level. The default is 0 (1 second).
time_stampingThe time stamping method to be used. The allowed values are hardware, software, legacy, onestep, and p2p1step. The default is hardware.
productDescriptionThe product description string. Allowed values must be of the form manufacturerName;modelNumber;instanceIdentifier and contain at most 64 utf8 symbols. The default is ;;.
revisionDataThe revision description string which contains the revisions for node hardware (HW), firmware (FW), and software (SW). Allowed values are of the form HW;FW;SW and contain at most 32 utf8 symbols. The default is ;;.
userDescriptionThe user description string. Allowed values are of the form name;location and contain at most 128 utf8 symbols. The default is an empty string.
manufacturerIdentityThe manufacturer id which should be an OUI owned by the manufacturer. The default is 00:00:00.
kernel_leapWhen a leap second is announced, let the kernel apply it by stepping the clock instead of correcting the one-second offset with servo, which would correct the one-second offset slowly by changing the clock frequency (unless the step_threshold option is set to correct such offset by stepping). Relevant only with software time stamping. The default is 1 (enabled).
step_windowWhen set, indicates the number of Sync events after a clock step that the clock will not do any frequency or step adjustments. This is used in situations where clock stepping is unable to happen instantaneously so there is a lag before the timestamps can settle properly to reflect the clock step. The default is 0 (disabled).
timeSourceThe time source is a single byte code that gives an idea of the kind of local clock in use. The value is purely informational, having no effect on the outcome of the Best Master Clock algorithm, and is advertised when the clock becomes grand master.
hwts_filterSelect the hardware time stamp filter setting mode. Possible values are normal, check, and full. Normal mode sets the filters as needed. Check mode only checks but does not set. Full mode sets the receive filter to mark all packets with hardware time stamp, so all applications can get them. The default is normal.
asCapableIf set to true, all the checks which can unset the asCapable variable (as described in Section 10.2.4.1 of 802.1AS) are skipped. If set to auto, asCapable is initialized to false and will be set to true after the relevant checks have passed. The default value is auto.
BMCAThis option enables use of static roles for server and client devices instead of running the best master clock algorithm (BMCA) described in the 1588 profile. This can be used to speed up the start time for servers and clients when you know the roles of the devices in advance. When set to noop, the traditional BMCA algorithm used by 1588 is skipped. masterOnly and clientOnly will be used to determine the server or client role for the device. In a bridge, clientOnly (which is a global option) can be set to make all ports assume the client role. masterOnly (which is a per-port config option) can then be used to set individual ports to take on the server role. The default value is ptp which runs the BMCA related state machines.
inhibit_announceThis will disable the timer for announce messages (i.e. FD_MANNO_TIMER) and also the announce message timeout timer (i.e. FD_ANNOUNCE_TIMER). This is used by the Automotive profile as part of switching over to a static BMCA. If this option is enabled, ignore_source_id has to be enabled in the client because it has no way to identify the server in the Sync and Follow_Up messages. The default is 0 (disabled).
ignore_source_idThis will disable source port identity checking for Sync and Follow_Up messages. This is useful when the announce messages are disabled in the server and the client does not have any way to know the server’s identity. The default is 0 (disabled).
msg_interval_requestThis option, when set, will trigger an adjustment to the Sync and peer delay request message intervals when the clock servo transitions into the SERVO_LOCKED_STABLE state. The Sync interval will be adjusted via the signaling mechanism while the pdelay request interval is simply adjusted locally. The values to use for the new Sync and peer delay request intervals are specified by the operLogSyncInterval and operLogPdelayReqInterval options, respectively.
The default value of msg_interval_request is 0 (disabled).
servo_num_offset_valuesThe number of offset values considered in order to transition from the SERVO_LOCKED to the SERVO_LOCKED_STABLE state. The transition occurs once the last servo_num_offset_values offsets are all below the servo_offset_threshold value. The default value is 10.
servo_offset_thresholdThe offset threshold used in order to transition from the SERVO_LOCKED to the SERVO_LOCKED_STABLE state. The transition occurs once the last servo_num_offset_values offsets are all below the threshold value. The default value of offset_threshold is 0 (disabled).
slave_event_monitorSpecifies the address of a UNIX domain socket for event monitoring. A local monitoring client bound to this address will receive SLAVE_RX_SYNC_TIMING_DATA and SLAVE_DELAY_TIMING_DATA_NP TLVs. The default is the empty string (disabled).
write_phase_modeThis option enables using the “write phase” feature of a PTP Hardware Clock. If supported by the device, this mode uses the hardware’s built in phase offset control instead of frequency offset control. The default value is 0 (disabled).