SNTP: Selecting and configuring

SNTP parameters shows the SNTP parameters and their operations.

SNTP parameters

SNTP parameter

Operation

Time Sync Method

Used to select either SNTP, TIMEP, or None as the time synchronization method.

SNTP Mode

   Disabled

The Default. SNTP does not operate, even if specified by the Menu interface Time Sync Method parameter or the CLI timesync command.

   Unicast

Directs the switch to poll a specific server for SNTP time synchronization. Requires at least one server address.

   Broadcast

Directs the switch to acquire its time synchronization from data broadcast by any SNTP server to the network broadcast address. The switch uses the first server detected and ignores any others. However, if the Poll Interval expires three times without the switch detecting a time update from the original server, the switch accepts a broadcast time update from the next server it detects.

Poll Interval (seconds)

In Unicast Mode: Specifies how often the switch polls the designated SNTP server for a time update.

In Broadcast Mode: Specifies how often the switch polls the network broadcast address for a time update.

Value is between 30 to 720 seconds.

Server Address

Used only when the SNTP Mode is set to Unicast. Specifies the IP address of the SNTP server that the switch accesses for time synchronization updates. You can configure up to three servers; one using the menu or CLI, and two more using the CLI.

Server Version

Specifies the SNTP software version to use and is assigned on a per-server basis. The version setting is backwards-compatible. For example, using version 3 means that the switch accepts versions 1 through 3. Default: 3; range: 1 to 7.

Priority

Specifies the order in which the configured servers are polled for getting the time.

Value is between 1 and 3.

Viewing and configuring SNTP (Menu)

  1. From the Main Menu, select:

    2. Switch Configuration…

    1. System Information

    System Information screen (default values)

  2. Press [E] (for Edit).

    Move the cursor to the System Name field.

  3. Use the Space bar to move the cursor to the Time Sync Method field.

  4. Use the Space bar to select SNTP, then move to the SNTP Mode field.

  5. Complete one of the following options.

    Option 1

    1. Use the Space bar to select the Broadcast mode.

    2. Move the cursor to the Poll Interval field.

    3. Go to step Step 6. (For Broadcast mode details, see SNTP time synchronization)

      Time configuration fields for SNTP with broadcast mode

      Option 2

    4. Use the Space bar to select the Unicast mode.

    5. Move the cursor to the Server Address field.

    6. Enter the IP address of the SNTP server you want the switch to use for time synchronization.


      [NOTE: ]

      NOTE: This step replaces any previously configured server IP address. If you will be using backup SNTP servers (requires use of the CLI), see SNTP unicast time polling with multiple SNTP servers.


    7. Move the cursor to the Server Version field. Enter the value that matches the SNTP server version running on the device you specified in the preceding step .

      If you are unsure which version to use, Hewlett Packard Enterprise recommends leaving this value at the default setting of 3 and testing SNTP operation to determine whether any change is necessary.


      [NOTE: ]

      NOTE: Using the menu to enter the IP address for an SNTP server when the switch already has one or more SNTP servers configured, the switch deletes the primary SNTP server from the server list. The switch then selects a new primary SNTP server from the IP addresses in the updated list. For more on this topic, see SNTP unicast time polling with multiple SNTP servers.


    8. Move the cursor to the Poll Interval field, then go to step 6.

    SNTP configuration fields for SNTP configured with unicast mode

  6. In the Poll Interval field, enter the time in seconds that you want for a Poll Interval.

    (For Poll Interval operation, see SNTP parameters)

  7. Press Enter to return to the Actions line, then S (for Save) to enter the new time protocol configuration in both the startup-config and running-config files.

Viewing and configuring SNTP (CLI)

Syntax:

show sntp

Lists both the time synchronization method (TimeP, SNTP, or None) and the SNTP configuration, even if SNTP is not the selected time protocol.

If you configure the switch with SNTP as the time synchronization method, then enable SNTP in broadcast mode with the default poll interval, show sntp lists the following:

SNTP configuration when SNTP is the selected time synchronization method

HP Switch(config)# show sntp

 SNTP Configuration

  Time Sync Mode: Sntp
  SNTP Mode : Unicast
  Poll Interval (sec) [720] : 719


  Priority SNTP Server Address            Protocol Version
  -------- ------------------------------ ----------------
  1        2001:db8::215:60ff:fe79:8980   7
  2        10.255.5.24                    3
  3        fe80::123%vlan10               3

In the factory-default configuration (where TimeP is the selected time synchronization method), show sntp still lists the SNTP configuration, even though it is not currently in use. In SNTP configuration when SNTP is not the selected time synchronization method, even though TimeP is the current time synchronous method, the switch maintains the SNTP configuration.

SNTP configuration when SNTP is not the selected time synchronization method

HP Switch(config)# show sntp

 SNTP Configuration

  Time Sync Mode: Timep
  SNTP Mode : Unicast
  Poll Interval (sec) [720] : 719


  Priority SNTP Server Address            Protocol Version
  -------- ------------------------------ ----------------
  1        2001:db8::215:60ff:fe79:8980   7
  2        10.255.5.24                    3
  3        fe80::123%vlan10               3

Syntax:

show management

This command can help you to easily examine and compare the IP addressing on the switch. It lists the IP addresses for all time servers configured on the switch, plus the IP addresses and default gateway for all VLANs configured on the switch.

Display showing IP addressing for all configured time servers and VLANs

HP Switch(config)# show management

 Status and Counters - Management Address Information

  Time Server Address : fe80::215:60ff:fe7a:adc0%vlan10

  Priority  SNTP Server Address            Protocol Version
  --------- ------------------------------ ----------------
  1         2001:db8::215:60ff:fe79:8980   7
  2         10.255.5.24                    3
  3         fe80::123%vlan10               3


  Default Gateway   :10.0.9.80

  VLAN Name    MAC Address     | IP address
  ------------ --------------- + ---------------
  DEFAULT_VLAN 001279-88a100   | Disabled
  VLAN10       001279-88a100   | 10.0.10.17

Configuring (enabling or disabling) the SNTP mode

Enabling the SNTP mode means to configure it for either broadcast or unicast mode. Remember that to run SNTP as the switch's time synchronization protocol, you must also select SNTP as the time synchronization method by using the CLI timesync command (or the menu interface Time Sync Method parameter.)

Syntax:

timesync sntp

Selects SNTP as the time protocol.

sntp <broadcast | unicast>

Enables the SNTP mode.

Syntax:

sntp server <ip-addr>

Required only for unicast mode.

Syntax:

sntp server priority <1-3>

Specifies the order in which the configured servers are polled for getting the time. Value is between 1 and 3.

Syntax:

sntp <30-720>

Configures the amount of time between updates of the system clock via SNTP.

Default: 720 seconds

Enabling SNTP in Broadcast Mode

Because the switch provides an SNTP polling interval (default: 720 seconds), you need only these two commands for minimal SNTP broadcast configuration:

Syntax:

timesync sntp

Selects SNTP as the time synchronization method.

Syntax:

sntp broadcast

Configures broadcast as the SNTP mode.

Example:

Suppose that time synchronization is in the factory-default configuration (TimeP is the currently selected time synchronization method.) Complete the following:

  1. View the current time synchronization.

  2. Select SNTP as the time synchronization mode.

  3. Enable SNTP for Broadcast mode.

  4. View the SNTP configuration again to verify the configuration.

The commands and output would appear as follows:

Enabling SNTP operation in Broadcast Mode

switch(config)# show sntp 1
 SNTP Configuration
  Time Sync Mode: Timep
  SNTP Mode : disabled
  Poll Interval (sec) [720] :720

switch(config)# timesync sntp

switch(config)# sntp broadcast

switch(config)# show sntp 2
 SNTP Configuration
  Time Sync Mode: Sntp
  SNTP Mode : Broadcast
  Poll Interval (sec) [720] :720

1

show sntp displays the SNTP configuration and also shows that TimeP is the currently active time synchronization mode.

2

show sntp again displays the SNTP configuration and shows that SNTP is now the currently active time synchronization mode and is configured for broadcast operation.

Enabling SNTP in unicast mode (CLI)

Like broadcast mode, configuring SNTP for unicast mode enables SNTP. However, for unicast operation, you must also specify the IP address of at least one SNTP server. The switch allows up to three unicast servers. You can use the Menu interface or the CLI to configure one server or to replace an existing unicast server with another. To add a second or third server, you must use the CLI. For more on SNTP operation with multiple servers, see SNTP unicast time polling with multiple SNTP servers

Syntax:

timesync sntp

Selects SNTP as the time synchronization method.

Syntax:

sntp unicast

Configures the SNTP mode for unicast operation.

Syntax:

[no] sntp server priority <1-3> <ip-address> [ version ]

Use the no version of the command to disable SNTP.

priority

Specifies the order in which the configured SNTP servers are polled for the time.

ip-address

An IPv4 or IPv6 address of an SNTP server.

version

The protocol version of the SNTP server. Allowable values are 1 through 7; default is 3.

Syntax:

no sntp server <ip-addr>

Deletes the specified SNTP server.


[NOTE: ]

NOTE: Deleting an SNTP server when only one is configured disables SNTP unicast operation.


Example:

To select SNTP and configure it with unicast mode and an SNTP server at 10.28.227.141 with the default server version (3) and default poll interval (720 seconds):

HP Switch(config)# timesync sntp

Selects SNTP.

HP Switch(config)# sntp unicast

Activates SNTP in unicast mode.

HP Switch(config)# sntp server priority 1 10.28.227.141

Specifies the SNTP server and accepts the current SNTP server version (default: 3).

Configuring SNTP for unicast operation

HP Switch(config)# show sntp

 SNTP Configuration

  Time Sync Mode: Sntp
  SNTP Mode : Unicast
  Poll Interval (sec) [720] : 720


  Priority SNTP Server Address                            Protocol Version
  -------- ---------------------------------------------- ----------------
  1        2001:db8::215:60ff:fe79:8980 7
  2        10.255.5.24 3
  3        fe80::123%vlan10 3

In this Example:, the Poll Interval and the Protocol Version appear at their default settings.

Both IPv4 and IPv6 addresses are displayed.

Note: Protocol Version appears only when there is an IP address configured for an SNTP server.

If the SNTP server you specify uses SNTP v4 or later, use the sntp server command to specify the correct version number. For example, suppose you learned that SNTP v4 was in use on the server you specified above (IP address 10.28.227.141). You would use the following commands to delete the server IP address , re-enter it with the correct version number for that server.

Specifying the SNTP protocol version number

HP Switch(config)# no sntp server 10.28.227.141 1
HP Switch(config)# sntp server 10.28.227.141 4 2
HP Switch(config)# show sntp
 
 SNTP Configuration

  Time Sync Mode: Sntp
  SNTP Mode : Broadcast
  Poll Interval (sec) [720] : 600

  IP Address     Protocol Version
  -------------  -----------------
  10.28.227.141  4 3

1

Deletes unicast SNTP server entry.

2

Re-enters the unicast server with a non-default protocol version.

3

show sntp displays the result.

Changing the SNTP poll interval (CLI)

Syntax:

sntp <30..720>

Specifies the amount of time between updates of the system clock via SNTP. The default is 720 seconds and the range is 30 to 720 seconds. (This parameter is separate from the poll interval parameter used for Timep operation.)

Example:

To change the poll interval to 300 seconds:

HP Switch(config)# sntp 300

Changing the SNTP server priority (CLI)

You can choose the order in which configured servers are polled for getting the time by setting the server priority.

Syntax:

sntp server priority <1-3> <ip-address>

Specifies the order in which the configured servers are polled for getting the time Value is between 1 and 3.


[NOTE: ]

NOTE: You can enter both IPv4 and IPv6 addresses. For more information about IPv6 addresses, see the IPv6 configuration guide for your switch.


Example:

To set one server to priority 1 and another to priority 2:

HP Switch(config)# sntp server priority 1 10.28.22.141

HP Switch(config)# sntp server priority 2
                    2001:db8::215:60ff:fe79:8980

Disabling time synchronization without changing the SNTP configuration (CLI)

The recommended method for disabling time synchronization is to use the timesync command.

Syntax:

no timesync

Halts time synchronization without changing your SNTP configuration.

Example:

Suppose SNTP is running as the switch's time synchronization protocol, with broadcast as the SNTP mode and the factory-default polling interval. You would halt time synchronization with this command:

HP Switch(config)# no timesync

If you then viewed the SNTP configuration, you would see the following:

SNTP with time synchronization disabled

HP Switch(config)# show sntp
 SNTP Configuration
  Time Sync Mode: Disabled
  SNTP Mode : Broadcast
  Poll Interval (sec) [720] : 720

Disabling the SNTP Mode

If you want to prevent SNTP from being used even if it is selected by timesync (or the Menu interface's Time Sync Method parameter), configure the SNTP mode as disabled.

Syntax:

no sntp

Disables SNTP by changing the SNTP mode configuration to Disabled.

Example:

If the switch is running SNTP in unicast mode with an SNTP server at 10.28.227.141 and a server version of 3 (the default), no sntp changes the SNTP configuration as shown below and disables time synchronization on the switch.

Disabling time synchronization by disabling the SNTP mode

HP Switch(config)# no sntp
HP Switch(config)# show sntp

 SNTP Configuration

  Time Sync Mode: Sntp
  SNTP Mode : disabled
  Poll Interval (sec) [720] : 600

  IP Address     Protocol Version
  -------------  -----------------
  10.28.227.141  3

Note that even though the Time Sync Mode is set to Sntp, time synchronization is disabled because no sntp has disabled the SNTP Mode parameter.