< Home

ntp-service unicast-peer

Function

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

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

Format

ntp-service unicast-peer 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 | preempt | port port-number ]*

ntp-service unicast-peer 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 | preempt | port port-number ] *

undo ntp-service unicast-peer { ipv6 ipv6-address [ vpn-instance vpn-instance-name ] | ip-address [ vpn-instance vpn-instance-name ] }

Parameters

Parameter Description Value
ip-address Specifies the IPv4 address of the remote server. The ip-address is a host address and cannot be the broadcast address, the multicast address or the IP address of a reference clock.
ipv6 ipv6-address Specifies the IPv6 address of the remote server. The ipv6-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 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 Enables an automatic key. -
source-interface interface-type interface-number Specifies the interface from which the symmetric active end sends NTP messages to the symmetric passive end. The source IP address of the NTP message is the IP address of this 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 NTP maximum poll interval. It is an integer ranges from 10 to 17.
minpoll min-number Specifies NTP minimum poll interval. It is an integer ranges from 3 to 6.
preempt Designates a peer as preemptible. The designated peer is marked as unavailable for selection if any error (authentication failure) is detected on the association. Consequently, the association is marked as available only when no other associations are available for selection. -
port port-number Specifies the port number to transmit NTP unicast message. The value is in the range of 1025 to 65535.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

This command is used to set the remote server with a specified ip-address as the peer of the local device. The local device runs in the symmetric active mode. In this way, the local device can be synchronized to the remote server and the remote server can also be synchronized to the local server.

If the same server is specified in at least two commands that are run in sequence to configure the NTP server mode, during the configuration restoration, the last run command takes effect. For example, the ntp-service unicast-peer 10.10.1.1 source-interface GigabitEthernet 0/0/0 command and ntp-service unicast-peer 10.10.1.1 command are run in sequence. During the configuration restoration, only the ntp-service unicast-peer 10.10.1.1 command takes effect.

Example

# Configure the peer 10.10.1.1 to provide the synchronizing time for the local device. The local device can also provide synchronizing time for the peer. The version number is 3. The IP address of the NTP packets is the address of GE 1/0/0. The port number is 5000.

<sysname> system-view
[sysname] ntp-service unicast-peer 10.10.1.1 version 3 source-interface GigabitEthernet 0/0/0 port 5000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >