The ntp-service unicast-peer command configures NTP peer mode.
The undo ntp-service unicast-peer command cancels the NTP peer mode.
By default, the NTP peer mode is not configured.
ntp-service unicast-peer 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 | preempt | port port-number ] *
ntp-service unicast-peer 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 | preempt | port port-number ] *
undo ntp-service unicast-peer { ip-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ]
Parameter | Description | Value |
---|---|---|
ip-address |
Indicates the IPv4 address of the remote peer. |
The parameter 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 |
Indicates the IPv6 address of the remote server. |
The value of ipv6-address is a unicast address, 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, it is 3. |
authentication-keyid key-id |
Indicates the authentication key ID used when transmitting messages to the remote peer. 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 |
Indicates the maximum NTP poll interval. |
The value is an integer that ranges from 10 to 17. |
minpoll min-number |
Indicates the minimum NTP poll interval. |
The value is an integer that ranges from 3 to 6. |
source-interface interface-type interface-number |
Indicates the source interface from which the symmetric active end sends NTP packets to the symmetric passive end. 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 peer as the preferred one. By default, the remote peer is not preferred. NOTE:
If you run the ntp-service unicast-peer command multiple times to configure multiple remote peers, you can specify the preference parameter to configure a peer as the preferred one. This prevents the local device from frequently switching connections with remote peers and prevents frequent time changes and a large number of logs generated on the local device. |
- |
preempt |
Indicates that the symmetric peer is in preemption mode. If any error, for example, an authentication failure, is detected on the association, the symmetric peer in preemption mode is marked as unavailable for selection. However, when no other symmetric peers are available for selection, this symmetric peer is marked as available. |
- |
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. |
Usage Scenario
When the clock of a device on the network needs to be synchronized in symmetric peer mode, you can run the ntp-service unicast-peer command to configure a remote node as the symmetric peer of the device. The local device runs in symmetric active peer mode. In this mode, the device and the remote peer can synchronize clock with each other.
Precautions
# 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 VLANIF100.
<HUAWEI> system-view [HUAWEI] ntp-service unicast-peer 10.10.1.1 version 3 source-interface vlanif 100