This article command set:
- display ntp-service sessions
- display ntp-service status
- display ntp-service trace
- ntp-service access
- ntp-service authentication complexity-check disable
- ntp-service authentication enable
- ntp-service authentication-keyid
- ntp-service broadcast-client
- ntp-service broadcast-server
- ntp-service cwmp unicast-server
- ntp-service discard
- ntp-service enable
- ntp-service in-interface disable
- ntp-service kod-enable
- ntp-service manycast-client
- ntp-service manycast-server
- ntp-service max-dynamic-sessions
- ntp-service multicast-client
- ntp-service multicast-server
- ntp-service refclock-master
- ntp-service reliable authentication-keyid
- ntp-service source-interface
- ntp-service unicast-peer
- ntp-service unicast-server
Details are as follows:
display ntp-service sessions
Command function
The display NTP service sessions command is used to view all session information maintained by the local NTP.
Command format
display ntp-service sessions [ verbose ]
Use example
View the NTP session information of the local device.
<Huawei> display ntp-service sessions clock source: 127.127.1.0 clock stratum: 1 clock status:configured, insane, invalid reference clock ID: LOCAL(0) reach: 377 poll: 64 now: 2 offset: 0.0000 ms delay: 0.00 ms disper: 0.94 ms
project | describe |
---|---|
clock source | Clock source address. |
clock stratum | The number of layers of the clock source. The number of clock layers determines the accuracy of the clock. The value range is 1 ~ 16. The clock with the number of layers 1 has the highest accuracy, and the accuracy decreases from 1 to 16. The clock with the number of layers 16 is in an unsynchronized state and cannot be used as a reference clock. |
clock status | Specifies the clock state. Of which: configured: indicates that the session is established by the configuration command Master: indicates that the clock source corresponding to the session is the master clock source of the current system selected: indicates that the clock source corresponding to the session has passed the clock selection algorithm Candidate: indicates that the clock source corresponding to the session is a candidate clock source sane: indicates that the clock source corresponding to the session has passed sound verification insane: indicates that the clock source corresponding to the session has not passed the sound verification Valid: indicates that the clock source corresponding to the session is valid (verified, in the synchronization state, the number of layers is valid, the root delay / deviation does not exceed the boundary, etc.) Invalid: indicates that the clock source corresponding to the session is invalid Unsynchronized: indicates that the clock source corresponding to the session is not synchronized or the number of layers is illegal |
reference clock ID | When the local system has been synchronized to a remote NTP server or a clock source, it indicates the address of the remote server or the identification of the clock source. |
reach | The reachability count of the clock source. 0 indicates that the clock source is unreachable. |
poll | NTP message polling interval, that is, the time interval between two consecutive NTP messages, in seconds. |
now | The time interval from the last synchronization to the present. |
offset | Represents the time difference relative to the previous clock source. |
delay | Represents the delay relative to the previous clock source. |
disper | Represents the deviation from the previous clock source. |
View the details of the local device NTP session.
<Huawei> display ntp-service sessions verbose clock source: 127.127.1.0 clock stratum: 1 clock status:configured, master, sane, valid reference clock ID: LOCAL(0) local mode: client, local poll: 6 peer mode: server, peer poll: 6 offset: 0.0000 ms,delay: 0.00 ms, disper: 0.88 ms root delay: 0.00 ms, root disper: 10.00 ms reach: 37, sync dist: 0.011, sync state: 3 precision: 2^18, version: 3, peer interface: InLoopBack0 reftime: 16:46:51.054 UTC Jul 28 2012(D3BE95FB.0DFB3FA6) orgtime: 16:46:51.054 UTC Jul 28 2012(D3BE95FB.0DFB3FA6) rcvtime: 16:46:51.054 UTC Jul 28 2012(D3BE95FB.0DFBF833) xmttime: 16:46:51.054 UTC Jul 28 2012(D3BE95FB.0DFADAFD) filter delay : 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 filter offset: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 filter disper: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 reference clock status: working abnormally timecode:
display ntp-service status
Command function
The display NTP service status command is used to view NTP status information.
Command format
display ntp-service status
Use example
View NTP running status information.
<Huawei> display ntp-service status clock status: synchronized clock stratum: 2 reference clock ID: LOCAL(0) nominal frequency: 60.0002 Hz actual frequency: 60.0002 Hz clock precision: 2^18 clock offset: 0.0000 ms root delay: 0.00 ms root dispersion: 0.00 ms peer dispersion: 10.00 ms reference time: 15:51:36.259 UTC Apr 25 2012(C6179088.426490A3)
project | describe |
---|---|
clock status | Indicates the clock state. Synchronized: the local clock is synchronized to an NTP server or clock source. unsynchronized: the local clock is not synchronized to any NTP server. |
clock stratum | Indicates the number of NTP layers where the local clock is located. |
reference clock ID | Represents the clock source. When the local clock has been synchronized to a remote NTP server or a clock source, it indicates the address of the remote NTP server or the identification of the clock source. If the Local clock is used as the reference clock, Local will be displayed. If the clock status is unsynchronized, None is displayed. |
nominal frequency | Represents the nominal frequency of the local clock. |
actual frequency | Represents the actual frequency of the local clock. |
clock precision | Represents the precision of the local clock. |
clock offset | Represents the deviation of the local clock from the reference clock. |
root delay | Represents the total system delay of the local clock relative to the master reference clock. |
root dispersion | Represents the system deviation of the local clock from the master reference clock. |
peer dispersion | Represents the deviation between the local clock and the remote NTP peer clock. |
reference time | Represents the reference timestamp. |
display ntp-service trace
Command function
The display NTP service trace command is used to view the path from the local device to the reference clock source.
Command format
display ntp-service trace
Use example
View brief information about each NTP server traced back from the local device to the reference clock source.
<Huawei> display ntp-service trace server 10.0.0.1,stratum 5, offset 0.024099, synch distance 0.06337 server 172.16.1.1,stratum 4, offset 0.028786, synch distance 0.04575 server 192.168.1.1,stratum 3, offset 0.035199, synch distance 0.03075 server 192.168.20.1,stratum 2, offset 0.039855, synch distance 0.01096 refid 127.127.1.0
ntp-service access
Command function
The NTP service access command is used to set the access control permissions of the local device NTP.
The undo NTP service access command is used to cancel the set access control permission.
By default, access control permissions are not configured.
Command format
ntp-service access { peer | query | server | synchronization | limited } { acl-number | ipv6 acl6-number } * undo ntp-service access { peer | query | server | synchronization | limited } [ ipv6 | all ] undo ntp-service access { peer | query | server | synchronization | limited } [ acl-number | ipv6 acl6-number ] *
Use example
Set peer s that match ACL 2000 to perform time request, query control and time synchronization on local devices.
<Huawei> system-view [Huawei] ntp-service access peer 2000
Setting allows the server matching ACL 2002 to perform time request and query control on the local device.
<Huawei> system-view [Huawei] ntp-service access server 2002
ntp-service authentication complexity-check disable
Command function
The NTP service authentication complexity check disable command is used to enable the NTP authentication password complexity check function.
The undo NTP service authentication complexity check disable command is used to enable the NTP authentication password complexity check function.
By default, the NTP authentication password complexity check function is enabled.
Command format
ntp-service authentication complexity-check disable undo ntp-service authentication complexity-check disable
Use example
To enable NTP authentication password complexity check function.
<Huawei> system-view [Huawei] ntp-service authentication complexity-check disable
ntp-service authentication enable
Command function
The NTP service authentication enable command is used to set the NTP authentication function.
The undo NTP service authentication enable command is used to cancel the authentication function.
By default, the authentication function is not configured.
Command format
ntp-service authentication enable undo ntp-service authentication enable
Use example
Enables NTP authentication.
<Huawei> system-view [Huawei] ntp-service authentication enable
ntp-service authentication-keyid
Command function
The NTP service authentication keyID command is used to set the NTP authentication key.
The undo NTP service authentication keyID command is used to cancel the NTP authentication key.
By default, the authentication key is not configured.
Command format
ntp-service authentication-keyid key-id authentication-mode { md5 | hmac-sha256 } [ cipher ] password undo ntp-service authentication-keyid key-id
Use example
Set the HMAC-SHA256 authentication key. The key ID number is 10 and the key is BetterKey.
<Huawei> system-view [Huawei] ntp-service authentication-keyid 10 authentication-mode hmac-sha256 BetterKey
ntp-service broadcast-client
Command function
The NTP service broadcast client command is used to configure the NTP broadcast client mode.
The undo NTP service broadcast client command is used to cancel the NTP broadcast client mode.
By default, NTP broadcast client mode is not configured.
Command format
ntp-service broadcast-client undo ntp-service broadcast-client
Use example
Configure to receive NTP broadcast messages on the GE1/0/0 interface.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [Huawei-GigabitEthernet1/0/0] ntp-service broadcast-client
ntp-service broadcast-server
Command function
The NTP service broadcast server command is used to configure the NTP broadcast server mode.
The undo NTP service broadcast server command is used to cancel the NTP broadcast server mode.
By default, broadcast server mode is not configured.
Command format
ntp-service broadcast-server [ version number | authentication-keyid key-id ] * undo ntp-service broadcast-server
Use example
Send NTP broadcast message packet on GE1/0/0 interface. NTP version number is 2 and encrypted with key No. 4.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [Huawei-GigabitEthernet1/0/0] ntp-service broadcast-server version 2 authentication-keyid 4
ntp-service cwmp unicast-server
Command function
The NTP service CWMP unicast server command is used to configure the NTP server defined by the CWMP protocol.
The undo NTP service CWMP unicast server command is used to delete the NTP server defined by the CWMP protocol.
By default, the NTP server defined by the CWMP protocol is not configured.
Command format
ntp-service cwmp unicast-server unicast-server { first | second } undo ntp-service cwmp unicast-server unicast-server
Use example
Configure server 10.10 1.1 is the first NTP server.
<Huawei> system-view [Huawei] ntp-service cwmp unicast-server 10.10.1.1 first
ntp-service discard
Command function
NTP service discard command is used to configure the minimum time interval and average time interval of NTP sending messages.
Undo NTP service discard command is used to cancel the minimum time interval and average time interval of NTP sending messages.
By default, the minimum time interval for NTP to send messages is 1 power second of 2 (2 seconds), and the average time interval is 5 power seconds of 2 (32 seconds)
Command format
ntp-service discard { min-interval min-interval-val | avg-interval avg-interval-val } * undo ntp-service discard
Use example
Set the minimum time interval and average time interval for sending NTP message to 4, that is, the minimum time interval and average time interval are set to 16 seconds.
<Huawei> system-view [Huawei] ntp-service discard min-interval 4 avg-interval 4
ntp-service enable
Command function
The NTP service enable command is used to enable the NTP function of the local device.
The undo NTP service enable command is used to enable the NTP function of the local device.
By default, the NTP function of the local device is enabled.
Command format
ntp-service enable undo ntp-service enable
Use example
Enables the NTP function of the local device.
<Huawei> system-view [Huawei] ntp-service enable
ntp-service in-interface disable
Command function
NTP service in interface disable command is used to prohibit the interface from receiving NTP messages.
The undo NTP service in interface disable command is used to enable the interface to receive NTP messages.
By default, the interface can receive NTP messages.
Command format
ntp-service [ ipv6 ] in-interface disable undo ntp-service [ ipv6 ] in-interface disable
Use example
GE1/0/0 interface is prohibited from receiving NTP message.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ntp-service in-interface disable
ntp-service kod-enable
Command function
The NTP service KOD enable command is used to enable the KOD function.
The undo NTP service KOD enable command is used to enable the KOD function.
By default, the KOD function is not enabled.
Command format
ntp-service kod-enable undo ntp-service kod-enable
Use example
Enable KOD.
<Huawei> system-view [Huawei] ntp-service kod-enable
ntp-service manycast-client
Command function
The NTP service manycast client command is used to configure the NTP multicast client mode.
The undo NTP service manycast client command is used to cancel the NTP multicast client mode.
By default, NTP multicast client mode is not enabled.
Command format
ntp-service manycast-client [ ip-address | ipv6 [ ipv6-address ] ] [ authentication-keyid key-id | ttl ttl-number ] * undo ntp-service manycast-client [ ip-address | ipv6 [ ipv6-address ] ]
Use example
Configure GE1/0/0 interface to receive NTP multicast message. The multicast address of multicast IPv6 message is FF0E::111.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ntp-service manycast-client ipv6 FF0E::111 authentication-keyid 6
ntp-service manycast-server
Command function
The NTP service manycast server command is used to configure the multicast server mode.
The undo NTP service manycast server command is used to cancel the NTP multicast server mode.
By default, NTP multicast server mode is not configured.
Command format
ntp-service manycast-server [ ip-address | ipv6 [ ipv6-address ] ] undo ntp-service manycast-server [ ip-address | ipv6 [ ipv6-address ] ]
Use example
Configure the GE1/0/0 interface as the interface on the server. The interface is used to respond to multicast client requests for multicast addresses.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ntp-service manycast-server ipv6 FF0E::111
ntp-service max-dynamic-sessions
Command function
The NTP service Max dynamic sessions command is used to set the maximum number of NTP dynamic sessions allowed locally.
The undo NTP service Max dynamic sessions command is used to recover the maximum number of NTP dynamic sessions allowed locally. It is the default value.
By default, a maximum of 100 NTP dynamic sessions are allowed.
Command format
ntp-service max-dynamic-sessions number undo ntp-service max-dynamic-sessions
Use example
Set up a maximum of 50 NTP dynamic sessions allowed locally.
<Huawei> system-view [Huawei] ntp-service max-dynamic-sessions 50
ntp-service multicast-client
Command function
The NTP service multicast client command is used to configure the NTP multicast client mode.
The undo NTP service multicast client command is used to cancel the NTP multicast client mode.
By default, the multicast client mode is not configured.
Command format
ntp-service multicast-client [ ip-address | ipv6 [ ipv6-address ] ] undo ntp-service multicast-client [ ip-address | ipv6 [ ipv6-address ] ]
Use example
It is configured to receive NTP multicast message packets on the GE1/0/0 interface. The multicast group address corresponding to the multicast message packet is 224.0 1.2.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [Huawei-GigabitEthernet1/0/0] ntp-service multicast-client 224.0.1.2
ntp-service multicast-server
Command function
The NTP service multicast server command is used to configure sending NTP multicast message packets on the current interface and the local device running in NTP multicast server mode.
The undo NTP service multicast server command is used to cancel the configuration of the NTP multicast server.
By default, the multicast server mode is not configured.
Command format
ntp-service multicast-server [ ip-address ] [ version number | authentication-keyid key-id | ttl ttl-number ] * ntp-service multicast-server [ ipv6 [ ipv6-address ] ] [ authentication-keyid key-id | ttl ttl-number ] * undo ntp-service multicast-server [ ip-address | ipv6 [ ipv6-address ] ]
Use example
Configure to send NTP multicast message packet on GE1/0/0 interface, and the multicast group address is 224.0 1.1. The encryption key ID is 4 and the NTP version number is 3.
<Huawei> system-view [Huawei] interface gigabitethernet 1/0/0 [Huawei-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [Huawei-GigabitEthernet1/0/0] ntp-service multicast-server 224.0.1.1 authentication-keyid 4 version 3
ntp-service refclock-master
Command function
The NTP service refclock master command is used to set the local clock as the NTP master clock to provide synchronization time for other devices.
The undo NTP service refclock master command is used to cancel the NTP master clock setting.
By default, the NTP master clock is not set.
Command format
ntp-service refclock-master [ ip-address ] [ stratum ] undo ntp-service refclock-master [ ip-address ]
Use example
Set the local device clock as the NTP master clock, and the number of layers is 3.
<Huawei> system-view [Huawei] ntp-service refclock-master 3
ntp-service reliable authentication-keyid
Command function
The NTP service reliable authentication keyID command specifies that the key is trusted.
The undo NTP service reliable authentication keyID command is used to cancel the configuration of the specified key as trusted.
By default, the trusted authentication key is not set.
Command format
ntp-service reliable authentication-keyid key-id undo ntp-service reliable authentication-keyid key-id
Use example
Set and enable NTP authentication, use HMAC-SHA256 encryption, the key ID is 37, the key is BetterKey, and specify the key as a trusted key.
<Huawei> system-view [Huawei] ntp-service authentication enable [Huawei] ntp-service authentication-keyid 37 authentication-mode hmac-sha256 BetterKey [Huawei] ntp-service reliable authentication-keyid 37
ntp-service source-interface
Command function
NTP service source interface command is used to specify the source interface for sending NTP messages locally.
Undo NTP service source interface command is used to cancel the source interface for sending NTP messages locally.
By default, the source interface for sending NTP message locally is not specified, that is, the source interface of NTP message is selected according to the route.
Command format
ntp-service [ ipv6 ] source-interface { interface-type interface-number | interface-name } [ vpn-instance vpn-instance-name ] undo ntp-service [ ipv6 ] source-interface { interface-type interface-number | interface-name } [ vpn-instance vpn-instance-name ]
Use example
Specify that the source IP address of all NTP output messages uses the IP address of interface GE1/0/0.
<Huawei> system-view [Huawei] ntp-service source-interface gigabitethernet 1/0/0
ntp-service unicast-peer
Command function
The NTP service unicast peer command is used to configure the NTP peer mode.
The undo NTP service unicast peer command is used to cancel NTP peer mode.
By default, NTP peer mode is not configured.
Command format
ntp-service unicast-peer ip-address [ version number | authentication-keyid key-id | maxpoll max-number | minpoll min-number | source-interface { interface-type interface-number | interface-name } | vpn-instance vpn-instance-name | preference ] * ntp-service unicast-peer ipv6 ipv6-address [ authentication-keyid key-id | maxpoll max-number | minpoll min-number | source-interface { interface-type interface-number | interface-name } | vpn-instance vpn-instance-name | preference ] * undo ntp-service unicast-peer { ip-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ]
Use example
The local is configured by peer 10.10 1.1 provides synchronization time, and the local peer can also provide synchronization time for peer. The version number is 3. The IP address of NTP message is obtained from GE1/0/0.
<Huawei> system-view [Huawei] ntp-service unicast-peer 10.10.1.1 version 3 source-interface gigabitethernet 1/0/0
ntp-service unicast-server
Command function
The NTP service unicast server command is used to configure the NTP server mode.
The undo NTP service unicast server command is used to cancel the NTP server mode.
By default, NTP server mode is not configured.
Command format
ntp-service unicast-server server [ version number | authentication-keyid key-id | maxpoll max-number | minpoll min-number | source-interface { interface-type interface-number | interface-name } | vpn-instance vpn-instance-name | preference ] * ntp-service unicast-server ipv6 ipv6-address [ authentication-keyid key-id | maxpoll max-number | minpoll min-number | source-interface { interface-type interface-number | interface-name } | vpn-instance vpn-instance-name | preference ] * undo ntp-service unicast-server { server | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ]
Use example
The local device is configured to be controlled by the server 10.10 1.1 provide synchronization time, and the version number is 3.
<Huawei> system-view [Huawei] ntp-service unicast-server 10.10.1.1 version 3
The local device is configured to be managed by the server 10.10. Belonging to the VPN instance "abc" 1.1 provide synchronization time.
<Huawei> system-view [Huawei] ntp-service unicast-server 10.10.1.1 vpn-instance abc