The ntp-service unicast-server command specifies the NTP server and configures the mode of the server.
The undo ntp-service unicast-server command removes the specified NTP server.
By default, NTPv3 is used, authentication is disabled, and the NTP server is not configured.
ntp-service unicast-server ip-address [ version number | [ authentication-keyid key-id | autokey ] | source-interface interface-type interface-number | preference | vpn-instance vpn-instance-name | maxpoll max-number | minpoll min-number | burst | iburst | preempt | port port-number ] *
ntp-service unicast-server ipv6 ipv6-address [ [ authentication-keyid key-id | autokey ] | source-interface interface-type interface-number | preference | vpn-instance vpn-instance-name | maxpoll max-number | minpoll min-number | burst | iburst | preempt | port port-number ] *
undo ntp-service unicast-server { ipv6 ipv6-address [ vpn-instance vpn-instance-name ] | ip-address [ vpn-instance vpn-instance-name ] }
| Parameter | Description | Value |
|---|---|---|
ip-address |
Specifies the IPv4 address of the remote server. |
ip-address is a host address and cannot be the broadcast address, the multicast address or the IP address of a reference clock. |
version number |
Specifies the NTP version number. |
The value is an integer in the range of 1 to 4. By default, it is 3. |
authentication-keyid key-id |
Specifies the authentication key number used while transmitting messages to the remote server. |
For NTPv1, NTPv2, and NTPv3, the value is an integer ranging from 1 to 4294967295. For NTPv4, the value is an integer ranging from 1 to 65535. |
autokey |
Specifies the enabled autokey. |
- |
source-interface interface-type interface-number |
Specifies a source IP address of NTP packets as that of the interface. |
- |
vpn-instance vpn-instance-name |
Specifies the name of the VPN instance in IPv4 network. |
The value is in the range of 1 to 31 in characters. |
preference |
Specifies the remote server as the preferred one. |
- |
maxpoll max-number |
Specifies the NTP maximum poll interval. |
It is an integer ranging from 10 to 17, in seconds. The default value is 10 in NTPv1, NTPv2, and NTPv3, and is 17 in NTPv4. |
minpoll min-number |
Specifies NTP minimum poll interval. |
It is an integer ranges from 3 to 6, in seconds. The default value is 4, in seconds. |
burst |
Specifies that a burst of packets will be sent at every poll interval. This is useful to accurately measure jitter with long poll intervals. |
- |
iburst |
Specifies that a burst of packets will be sent when an unreachable server sends a reply. This is useful to synchronize the clock faster. |
- |
preempt |
Specifies the server as the preemption mode. The specified server is marked as unavailable for selection if any error (authentication failure) is detected on the connection between the local and the reference clock. The server is marked as available for selection if no other connections are available and no error is detected on the connection between the local and the reference clock. |
- |
port port-number |
Specifies the port number to transmit NTP unicast message. |
The value is in the range of 1025 to 65535. The default value is 123. |
ipv6 ipv6-address |
Specifies the IPv6 address of the remote server. |
ipv6-address is a host address and cannot be the broadcast address, the multicast address or the IP address of a reference clock. |
Usage Scenario
You can run the ntp-service unicast-server command to specify a remote server for the local device. When the command is run, you can also configure the mode used for the remote server, such as the NTP version, authentication key, and the polling interval.
Precautions
If the local device works in the client mode, the local device can only be synchronized with the remote server but the remote server cannot be synchronized with the local device.
If the client is enabled with authentication and configured with the authentication key, the server sends NTP messages with authentication after receiving the synchronization request of the client. After the authentication succeeds, the clock is synchronized. If the client is not enabled with authentication, the server sends NTP messages without authentication after receiving the synchronization request of the client. The clock is synchronized after the client receives the messages.
Before deleting a VPN instance, check whether the VPN instance is bound to the NTP server. This confirmation is to ensure that the changed configuration meets users' requirements. For example:
<sysname> display current-configuration | begin ntp ntp-service unicast-server 10.1.1.1 vpn-instance vpn2 ntp-service refclock-master
<sysname> display current-configuration | begin ntp ntp-service unicast-server 10.1.1.1 ntp-service refclock-master