< Home

ntp-service unicast-server

Function

The ntp-service unicast-server command configures the NTP server mode.

The undo ntp-service unicast-server command cancels the NTP server mode.

By default, the NTP server mode is not configured.

Format

ntp-service unicast-server ip-address [ version number | authentication-keyid key-id | 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 | 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 { ip-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value

ip-address

Indicates the IPv4 address of the remote server.

The value of ip-address must be an IP address of a host, but cannot be a broadcast address, multicast address, or reference clock's IP address.

version number

Indicates the NTP version number. If this parameter is not specified, the default version number is used.

The version number is an integer that ranges from 1 to 4. By default, the version number is 3.

authentication-keyid key-id

Indicates the authentication key ID used when messages are transmitted to the remote server. If this parameter is not specified, authentication is not performed.

The key ID is an integer that ranges from 1 to 4294967295 when the NTP version number is from 1 to 3. When the NTP version number is 4, the key ID is integer that ranges from 1 to 65535. When the remote server address is an IPv6 address, the key ID is an integer that ranges from 1 to 65535.

maxpoll max-number

Specifies the NTP maximum poll interval. The NTP poll interval of the system floats between the minimum value and maximum value.

It is an integer ranging from 10 to 17, in seconds. The default value is 10 seconds in NTPv1, NTPv2, NTPv3, and NTPv4.

minpoll min-number

Specifies NTP minimum poll interval. The NTP poll interval of the system floats between the minimum value and maximum value.

It is an integer ranging from 3 to 6, in seconds. The default value is 6 seconds.

source-interface interface-type interface-number

Indicates the source interface from which the unicast client sends NTP packets to the unicast server. The source IP address of the NTP packets is the IP address of this interface.

-

vpn-instance vpn-instance-name

Specifies the VPN instance name.

The value must be an existing VPN instance name.

preference

Indicates the remote server as the preferred one. By default, the remote server is not preferred.

NOTE:

If you run the ntp-service unicast-server command multiple times to configure multiple remote servers, you can specify the preference parameter to configure a server as the preferred one. This prevents the local device from frequently switching connections with remote servers and prevents frequent time changes and a large number of logs generated on the local device.

-

burst

Indicates that a burst of packets is sent within a fixed poll period. When the poll interval is long, this method helps measure the time jitter.

-

iburst

Indicates that the device sends a burst of packets when receiving a response of an unreachable server. This parameter can be used to accelerate synchronization.

-

preempt

Indicates that the server is in preemption mode. If any error, for example, an authentication failure, is detected on the association, the server marked as "preempt" is marked as unavailable for selection. However, the server is marked as available for selection when no other servers are available for selection on the network and no error occurs on the association of the server.

-

port port-number

Specifies the port number to transmit NTP unicast message.

The value is 123 or an integer ranging from 1025 to 65535. The default value is 123.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the clock of a device on the network needs to be synchronized in unicast server/client mode, the command can be run, and the remote server specified by ip-address or ipv6-address is used as the local clock server. The local device runs in client mode. In this mode, the local client can be synchronized to the remote server, but the remote server cannot be synchronized to the local client.

When the ntp-service unicast-server 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

  • A maximum of 128 servers can be configured for the local device. The optimal symmetric peer is selected as the synchronization source.
  • 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.
  • When a PE is synchronized to another PE or CE in a VPN, the parameter vpn-instance vpn-instance-name needs to be specified.
  • When the undo ntp-service unicast-server command is run, if the parameter vpn-instance vpn-instance-name is specified, cancel the configuration of the NTP server with the IP address ip-address or ipv6-address in the VPN. If the parameter vpn-instance vpn-instance-name is not specified, cancel the configuration of the NTP server with the IP address ip-address or ipv6-address in the public network.
  • 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:
    1. Specify an NTP server and bind a VPN instance to the NTP server. You can view the following configurations:
      <HUAWEI> display current-configuration | begin ntp
      ntp-service unicast-server 10.1.1.1 vpn-instance vpn2
      ntp-service refclock-master
    2. If the VPN instance named vpn2 is deleted, the VPN instance bound to the NTP server is also deleted.
      <HUAWEI> display current-configuration | be ntp
      ntp-service unicast-server 10.1.1.1
      ntp-service refclock-master

Example

# Configure the server 10.10.1.1 to provide the synchronizing time for the local device. The NTP version number is 3.

<HUAWEI> system-view
[HUAWEI] ntp-service unicast-server 10.10.1.1 version 3
# Configure the server 10.10.1.1 with VPN instance "abc" to provide the synchronizing time for the local device.
<HUAWEI> system-view
[HUAWEI] ntp-service unicast-server 10.10.1.1 vpn-instance abc
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >