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 | |
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 | |
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)
From the Main Menu, select:
2. Switch Configuration…
1. System Information
Press [E] (for Edit).
Move the cursor to the System Name field.
Use the Space bar to move the cursor to the Time Sync Method field.
Use the Space bar to select SNTP, then move to the SNTP Mode field.
Complete one of the following options.
Option 1
Use the Space bar to select the Broadcast mode.
Move the cursor to the Poll Interval field.
Go to step Step 6. (For Broadcast mode details, see SNTP time synchronization)
Option 2
Use the Space bar to select the Unicast mode.
Move the cursor to the Server Address field.
Enter the IP address of the SNTP server you want the switch to use for time synchronization.
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.
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: 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.
Move the cursor to the Poll Interval field, then go to step 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)
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
, orNone
) 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:
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:
Syntax:
Example:
Suppose that time synchronization is in the factory-default configuration (TimeP is the currently selected time synchronization method.) Complete the following:
View the current time synchronization.
Select SNTP as the time synchronization mode.
Enable SNTP for Broadcast mode.
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 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 SNTP Configuration Time Sync Mode: Sntp SNTP Mode : Broadcast Poll Interval (sec) [720] :720
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:
Syntax:
Syntax:
[no]
sntp server priority
<1-3
> <ip-address
> [ version ]Use the
no
version of the command to disable SNTP.
Syntax:
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 HP Switch(config)# sntp server 10.28.227.141 4 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
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: 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:
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:
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.