Configuring an IPv6 address for an SNTP server
To use a global unicast IPv6 address to configure an IPv6 SNTP time server on the switch, the switch must be receiving advertisements from an IPv6 router on a VLAN configured on the switch.
To use a link-local IPv6 address to configure an IPv6 SNTP time server on the switch, it is necessary to append
%vlan
followed immediately (without spaces) by the VLAN ID of the VLAN on which the server address is available. (The VLAN must be configured on the switch.)
For example:
fe80::11:215%vlan10
Syntax:
sntp server priority
<1–3>
<link-local–addr> %vlan
<vid> [1–7]
no sntp server priority
<1–3>
<link-local–addr> %vlan
<vid> [1–7]
sntp server priority
<1–3>
<link-local–addr> %vlan
<vid> [1–7]
no sntp server priority
<1–3>
<link-local–addr> %vlan
<vid> [1–7]
Syntax:
sntp server priority
<1–3>
<global–unicast–addr> [1–7]
no sntp server priority
<1–3>
<global–unicast–addr> [1–7]
Configures an IPv6 address for an SNTP server.
server priority
<1–3>
: Specifies the priority of the server addressing being configured. When the SNTP mode is set to unicast and more than one server is configured, this value determines the order in which the configured servers will be accessed for a time value. The switch polls multiple servers in order until a response is received or until all servers on the list have been tried without success. Up to three server addresses (IPv6 and/or IPv4) can be configured.
<link-local–addr>
: Specifies the link-local IPv6 address of the destination device.
%vlan
<vid>
: Suffix specifying the interface on which the destination device is located. No spaces are allowed in the suffix.
<global–unicast–addr>
: Specifies the global IPv6 address of the destination device.
[1–7]
: This optional setting specifies the SNTP server version expected for the specified server. Default: 3.
Configuring link-local and global unicast SNTP server addresses
To configure link-local and global unicast SNTP server addresses of:
fe80::215:60ff:fe7a:adc0 (on VLAN 10, configured on the switch)
2001:db8::215:60ff:fe79:8980
As the priority "1" and "2" SNTP servers, respectively, using version 7, you would enter these commands at the global config level, as shown below.
Switch(config)# sntp server priority 1 fe80::215:60ff:fe7a:adc0%vlan10 7
Switch(config)# sntp server priority 2 2001:db8::215:60ff:fe79:8980 7
In the preceding example, using a link-local address requires that you specify the local scope for the address; VLAN 10 in this case. This is always indicated by
%vlan
followed immediately (without spaces) by the VLAN identifier.
Syntax:
show sntp
Displays the current SNTP configuration, including the following:
Time sync mode: Indicates whether
timesync
is disabled or set to either
SNTP
or
Timep
. Default:
timep
SNTP mode: Indicates whether SNTP uses the broadcast or unicast method of contacting a time server. The broadcast option does not require you to configure a time server address. The unicast option does require configuration of a time server address.
Poll interval: Indicates the interval between consecutive time requests to an SNTP server.
Priority: Indicates the configured priority for the corresponding SNTP server address.
SNTP server address: Lists the currently configured SNTP server addresses.
Protocol version: Lists the SNTP server protocol version to expect from the server at the corresponding address.
For example, the
show sntp
output for the proceeding
sntp server
command example would appear as follows:
Output for show sntp with both an IPv6 and an IPv4 server address configured
This example illustrates the command output when both IPv6 and IPv4 server addresses are configured.
Switch(config)# show sntp SNTP Configuration Time Sync Mode: Sntp SNTP Mode : Broadcast 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
The
show management
command can also be used to display SNTP server information.