The Simple Network Time Protocol (SNTP) port

Revised for CPX 4.1.0.
Configuration of the SNTP port
Statistics of the SNTP ports
SNMP TRAPS generated for the SNTP ports


The SNTP port is used within the Abilis CPX to implement the homonymous synchronization protocol for TCP/IP networks.

The Simple Network Time Protocol (SNTP) is an adaptation of the Network Time Protocol (NTP) used to synchronize computer clocks in the Internet.

The NTP, specified in RFC-1305, is used to synchronize computer clocks in the global Internet. It provides comprehensive mechanisms to access national time and frequency dissemination services, organizes the time-synchronization subnet and adjust the local clock in each participating subnet peer.

In most places of the Internet of today, NTP provides accuracies of 1-50 ms, depending on the characteristics of the synchronization source and network paths.

The SNTP protocol can be used when the ultimate performance of the full NTP implementation is not needed or justified. It allows the automatic management of clock synchronization of any equipment by recovering information about date and current time from one or more SNTP server stations available in the Internet.

The SNTP has got a client/server implementation. The Abilis CPX SNTP port, by using the Connection-Less transport service provided by the UDP protocol, is able to:

SNTP port

Configuration of the SNTP port top

The SNTP port is labelled within the Abilis CPX with the acronym "SNTP" and it is provided with the parameters described in this section.

Here is an example on how to show the SNTP port parameters. Shown values are only examples:

[18:17:18] ABILIS_CPX: D P PO:SNTP

PO:909 - Udp_protocol_entry_point ---------------------------------------------
SNTP   LOG:NO       lowpo:902    udpport:123   
       --Server----------------------------------------------------------------
       SERVACT:NO   IPSRC:*                IPSRCLIST:#   
       --Client----------------------------------------------------------------
       CLIACT:YES   SNTPHOST:192.168.000.253  SRCADD:R-ID (192.168.000.207)
                    POLLP:60     NRTY:3       TBW:30     TBD:30   

To activate changes made on the parameters displayed by low case characters, it is needed to restart the system; on the contrary for activating changes made on high case parameters it is enough to execute the initialisation command INIT PO:.

Changes made on the parameter LOG: are immediately active.

Detail of the SNTP port parameter


LOG: Events logging activation and generation of alarm signals
DS NO, D, S, A, L, T, ALL, +E

Usually this parameter makes possible to activate/deactivate logging functionalities of meaningful events of the port as well as the detection and signalling of alarms in case of critical events.

The following table shows the available options and the related functionalities usable by the parameter:

Option Meaning
D Recording of the driver state changes and/or the meaningful events in Debug Log
S Recording of the driver state changes and/or the meaningful events in the System Log
A Periodic detection of possible alarms. The detected alarms can be displayed the command ALARM VIEW or by the analogous command available on the UTILITY of the LCD display on the front panel
L On alarm detection, acoustic signal generation plus a message on the LCD display. This function depends on activation of alarms detection by the "A" option
T Generation by the Agent SNMP of Abilis CPX of SNMP traps corresponding to any change of the driver state and/or occurring of meaningful events

Beside the already described options the following values are also allowed:

Option Meaning
NO It means that all the logging functionalities, alarms detection and generation, above mentioned, are disabled.
ALL It means that all the logging functionalities, alarms detection and generation, above mentioned, are enabled.
+E This option added to one or more of the previous ones, extends its (their) set of meaningful events.
The value "ALL+E" activates all the options and extends the set of meaningful events.
The value "NO+E" is meaningless so it is ignored.

Options can be combined together.

Some examples:

By using the characters "+" and "-" as prefix of one or more options is possible to add or delete one or more functionalities without setting from the scratch the value of the parameters.

Some examples:

warning! The changes made on this parameter are immediately activated, without the need of initialization commands.


LOWPO: Identifier of the Abilis CPX lower level port
NONE 1 - 999, NONE

It sets the Abilis CPX lower level port. It can only be an UDP port.

Value "NONE" isolates the SNTP port.


UDPPORT: Identifier of the used UDP port
123 123

It sets the local UDP port that is used by the SNTP port. According to recommendations, the UDP port number assigned to both NTP and SNTP protocols is 123, which should be used in both the Source Port and Destination Port fields in the UDP datagram header.

This parameter has got only informative value and cannot be modified.


SERVACT: SNTP Server activation
NO NO, YES

It activates/deactivates the SNTP Server functionality above mentioned. If the parameter is set to "NO", even if the SNTP port is configured and active, it won't carry out the Server function.

When the Client process of the SNTP port is not activated (CLIACT: set to "NO"), the Server process will operate as a primary reference source of synchronization. I.e. it will provide the clock synchronization, using the uncalibrated local Abilis CPX clock and without external means of synchronization.

When the Client process of the SNTP port is also activated (CLIACT: set to "YES"), the Server process will operate as a secondary reference source of synchronization. I.e. it will provide the clock synchronization, retrived by the Client process, to any requesting SNTP Client.


IPSRC: IP address of the SNTP Client enabled to query the Server process of Abilis CPX
* *, see table

The parameter sets the IP address of the SNTP Client enabled to query the Server process of Abilis CPX. Allowed values are shown in the following table:

HEX: 01000000 - 7EFFFFFF 80000000 - DFFFFFFF
DDN: 1.0.0.0 - 126.255.255.255 128.0.0.0 - 223.255.255.255

IP addresses of class D and E are not currently supported.

Synchronization requests coming from SNTP Client, whose IP address doesn't match either the value configured in this parameter or the list of values configured in IPSRCLIST: parameter, are discarded by the Server process of Abilis CPX.

The character '*' stands for "any IP source address": any SNTP Client can query the Server process of Abilis CPX.


IPSRCLIST: List of SNTP Clients enabled to query the Server process of Abilis CPX
# ListName, #

The parameter sets the list of SNTP Client systems enabled to query the Server process of Abilis CPX.

The accepted types of element list are: IP addresses (IP), rangess of IP addresses (IR), Rules (RU), Master Rules (MR).

Synchronization requests coming from SNTP Client, whose IP address doesn't match either the list of values configured in this parameter or the value configured in IPSRC: parameter, are discarded by the Server process of Abilis CPX.

The value '#' means "no list".


CLIACT: SNTP Client activation
NO NO, YES

It activates/deactivates the SNTP Client functionality above mentioned. If the parameter is set to "NO", even if the SNTP port is configured and active, it won't carry out the Client function.

When the Server process of the SNTP port is also activated (SERVACT: set to "YES"), the Client process activation/deactivation effects the Server process operational mode.
If the Client process is not active the Server process operates as a primary reference source of synchronization; if the Client process is active the Server process operates as a secondary reference source of synchronization.


SNTPHOST: IP address of the SNTP Server host
* see table, #

It sets the IP address of the SNTP Server host to which the Client process of the Abilis CPX will send its synchronization requests. The allowed values are:

HEX: 00000000 01000000 - 7EFFFFFF 80000000 - DFFFFFFF
DDN: 0.0.0.0 1.0.0.0 - 126.255.255.255 128.0.0.0 - 223.255.255.255

IP addresses of class D and E are not currently supported.

The character '#' stands for "no IP address": it can be used to disable the SNTP Client of Abilis CPX even if the parameter CLIACT: is set to "YES".


SRCADD: Source IP address for Client requests
R-ID R-ID, OUT-IPP, see table

It sets the IP address to be set in outgoing Client synchronization requests.

The "R-ID" value makes possible to use the Router-ID IP address.

The "OUT-IPP" value makes possible to use the IP address of the IP port through which the request is sent.

The specification of an IP address, in Dotted Decimal Notation, is also allowed. The available values of IP address are shown in the following table:

HEX: 01000000 - 7EFFFFFF 80000000 - DFFFFFFF
DDN: 1.0.0.0 - 126.255.255.255 128.0.0.0 - 223.255.255.255

D and E class of IP addresses are not, at the moment, supported.


POLLP: Synchronization interval
60 1 - 65535 (minutes)

It sets the time interval (in minutes) after which has to start the synchronization procedure of the SNTP Client of Abilis CPX toward the SNTP Sever whose IP address is set in the parameter SNTPHOST:.


NRTY: Maximum number of repetition for each synchronization attempt
3 0 - 255

It sets how many times the synchronization request can be repeated, once this value is over taken the request will be considered failed. According to the SNTP protocol, a single synchronization request can fail because of several reasons: missing answer from the queried Sever, bad format/bad content of the received synchronization message.


TBW: Time interval to be waited for getting an answer to the synchronization request
30 1 - 65535 (in seconds)

The parameter sets the time interval (in seconds) after which, if no answer from the SNTP Serve is received, the request, sent by the SNTP Client of the Abilis CPX, will be considered failed.


TBD: Time interval between two successive synchronization requests
30 1 - 65535 (in seconds)

This parameter sets the time interval (in seconds) between a failed synchronization request and its successive one. If the request, sent by the Client process of the Abilis CPX, has not be responded, the next one can be send only after "TBD:" seconds. As consequence, in case of no answer, the overall time interval between one request and its successive one will be obtained from the sum of "TBD:" and TBW: paramter's values.

Statistics of the SNTP ports top

How to check state and statistics of the SNTP ports by the command D S.

[18:17:22] ABILIS_CPX: D S PO:909 .

PO:909 ------------------------------------------------------------------------
SNTP   Local Clock Synchronized: External Clock Reference 192.168.000.253
       Clock last synchronized on 09/04/2002 at 16:57:58 Delta:-1 sec.
       Server-State:INACTIVE   
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SER-PCK    |          0|          0|SER-BADPCK |          0|           |
       SER-BADSRC |          0|           |
       ------------------------------------------------------------------------
       Client-State:READY   
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CLI-PCK    |         94|         94|CLI-BADPCK |          0|           |
       CLI-BADSRC |          0|           |CLI-TOUT   |          0|           |
       SUCC-SYNC  |         94|           |FAIL-SYNC  |          0|           |
       ------------------------------------------------------------------------

The string "Local Clock Synchronized" means that the internal clock of the Abilis CPX is correctly synchronized.

The eventual message "Local Clock Unsynchronised" means that the synchronization is not guaranteed.

On the same row, it is also shown whether the internal clock of Abilis CPX has been synchronized using an external clock source (through the SNTP Client process): "External Clock Reference 192.168.000.253" or using an internal clock source (SNTP Sever process) "Internal Clock Reference".

If the Server, whose address is set in the parameter SNTPHOST: is, for any reason, not reachable the following message will be shown: "Unavailable Clock Reference".

Information "Clock last synchronized on 09/04/2002 at 16:57:58 Delta:-1 sec." shows date, time of the last successful synchronization and the difference, in seconds, between date and time of the internal clock with the ones received from the queried SNTP Server.

If this information won't be available the following message will be shown: "Clock last synchronization unavailable".

For a more detailed description of these counters, please refer to the next section.

The SNTP ports have extended statistics and they can be displayed through the execution of the command D SE, shown values are the same to the ones obtained by the D S execution:

[18:17:22] ABILIS_CPX: D SE PO:909 .

PO:909 ------------------------------------------------------------------------
SNTP   --- Cleared 003:20:39:33 ago, on 05/04/2002 at 20:51:19 ----------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SER-PCK    |          0|          0|SER-BADPCK |          0|           |
       SER-BADSRC |          0|           |
       ------------------------------------------------------------------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CLI-PCK    |         94|         94|CLI-BADPCK |          0|           |
       CLI-BADSRC |          0|           |CLI-TOUT   |          0|           |
       SUCC-SYNC  |         94|           |FAIL-SYNC  |          0|           |
       ------------------------------------------------------------------------

The information "Cleared DDD:HH:MM:SS ago, at DD/MM/YYYY HH:MM:SS", referred by the extended statistics, shows the time interval elapsed from the last reset of statistics (by the format "days:hours:minutes:seconds") and date/time of its execution (by the format "day:month:year" and "hours:minutes:seconds").

Detail of the state fields and statistics of the SNTP ports


Server-State: Current state of the Server process of the SNTP port
INACTIVE, ACTIVE, READY, DISCONNECTING, HALTED, ERR

It shows the current state of the SNTP Server process.

Driver States Meaning Values shown in:
System Log Debug Log Display LCD
SNTP INACTIVE The configuration parameter SERVACT: is set to "NO" so that the driver is active, but it is not working. By setting the parameter to "YES" and executing the command INIT PO: on this port, it will be possible to activate the driver.     IN
DOWN The configuration parameter SERVACT: is set to "YES"; but the driver is not connected to the UDP port or the parameter LOWPO: is set to "NONE"     DN
READY The configuration parameter SERVACT: is set to "YES"; the driver is successfully connected to the port and working     RD
DISCONNECTING The driver is disconnecting from the UDP port     DG
HALTED Owing to an error the driver is halted     HL
ERR Software error. Contact Abilis assistance.     NA


SER-PCK: Number of packets sent/received by the SNTP Server
0 - 4.294.967.295

The counter SER-PCK (INPUT) is incremented every time the Server receives a SNTP synchronization request, while the counter SER-PCK (OUTPUT) every time it sends a SNTP response frame to a received synchronization request.


SER-BADPCK: Number of not valid packets received by the SNTP Server
0 - 4.294.967.295

The counter SER-BADPCK (INPUT) is incremented every time the SNTP Server receives a frame whose content or format is not valid.


SER-BADSRC: Number of packets received by the SNTP Server from a not enabled SNTP Client
0 - 4.294.967.295

The counter SER-BADSRC (INPUT) is incremented every time the Server receives a SNTP synchronization request from a SNTP Client with an IP address either not matching the one set in the parameter IPSRC: or not contained in the list of SNTP Clients set in the parameter IPSRCLIST:.


Client-State: Current state of the Client process of the SNTP port
INACTIVE, ACTIVE, READY, DISCONNECTING, HALTED, ERR

It shows the current state of the Client process of the SNTP port.

Driver States Meaning Values shown in:
System Log Debug Log Display LCD
SNTP INACTIVE The configuration parameter CLIACT: is set to "NO" so that the driver is active, but it is not working. By setting the parameter to "YES" and executing the command INIT PO: on this port, it will be possible to activate the driver     IN
DOWN The configuration parameter CLIACT: is set to "YES"; but the driver is not connected to the UDP port or the parameter LOWPO: is set to "NONE"     DN
READY The configuration parameter CLIACT: is set to "YES"; the driver is successfully connected to the port and working     RD
DISCONNECTING The driver is disconnecting from the UDP port     DG
HALTED Owing to an error the driver is halted     HL
ERR Software error. Contact Abilis assistance.     NA


CLI-PCK: Number of packets sent/received from the SNTP Client
0 - 4.294.967.295

The counter CLI-PCK (INPUT) is incremented every time the Client receives a SNTP response frame to a sent synchronization request, while the counter CLI-PCK (OUTPUT) every time it sends a SNTP synchronization request frame.


CLI-BADPCK: Number of not valid packets received by the SNTP Client
0 - 4.294.967.295

The counter CLI-BADPCK (INPUT) is incremented every time the SNTP Client receives a response SNTP frame whose content or format is not valid.


CLI-BADSRC: Number of packets received with a IP address not valid
0 - 4.294.967.295

The counter CLI-BADSRC (INPUT) is increments every time the SNTP Client receives a SNTP response frame with a IP address different from the one of the configured Server (parameter SNTPHOST:).


CLI-TOUT: Number of times the time out TBW: ran over
0 - 4.294.967.295

The counter CLI-TOUT (INPUT) is incremented every time the Client, after sending a synchronization request, doesn't receive the response within the time interval set in the parameter TBW:.


SUCC-SYNC: Number of successful synchronizations
0 - 4.294.967.295

The counter SUCC-SYNC (INPUT) is incremented every time a synchronization is successfully completed.


FAIL-SYNC: Number of failed synchronizations
0 - 4.294.967.295

The counter FAIL-SYNC (INPUT) is incremented every time a synchronization fails. According to the SNTP protocol, a single synchronization request can fail because of several reasons: missing answer from the queried Sever, bad format/bad content of the received synchronization message.

SNMP traps generated for the SNTP ports top

The traps listed below are generated when the "T" option is set in the LOG: parameter.

Trap own code Trap mnemonic SNMP variables shown in the trap Description
35 cxTrapSntpUnsynchronised cxSntpDiagServIpAddr,
sysUpTime
The SNMP Agent of the Abilis CPX generates this kind of trap every time the SNTP Client doesn't get synchronized for 24 hours.
36 cxTrapSntpSynchronised cxSntpDiagServIpAddr,
sysUpTime
The SNMP Agent of the Abilis CPX generates this kind of trap every time the SNTP Client leaves the un-synchronized condition, signalled by the cxTrapSntpUnsynchronised trap.

Detail of the SNMP variables shown in the SNTP port traps


cxSntpDiagServIpAddr IP address of the SNTP Server host
(see parameter SNTPHOST:)

This variable shows the IP address of the SNTP Server host to which the SNTP Client process of Abilis CPX sends its synchronization requests.


sysUpTime Elapsed time from the system start to the event occurrence
0 - 4.294.967.295 or "ddd:hh:mm:ss"

This variable stores the elapsed time (in cent of second) from the system start to the SNMP trap event occurrence.

This value is usually shown by the format days:hours:minutes:seconds.

printPrint this page