Command Reference NTP Commands
service, as well as time synchronization between the local device and
the peer device (full access permission).
serve
Allows the time request for, and control and query for the local NTP
service, but not time synchronization between the local device and
the peer device
serve-only
Allows the time request for the time of local NTP service.
query-only
Allows the control and query for the local NTP service.
access-list-number
Number of the IP access control list (ACL), in the range 1 to 99 and
1300 to 1999.
access-list-name
Name of the IP ACL
Defaults
No NTP access control rule is configured by default.
Command
Mode
Global configuration mode
Usage Guide
Use this command to configure the access control priority of the NTP service. The NTP services
access control function provides a minimal security measure (the more secure way is to use the NTP
authentication mechanism).
When an access request arrives, the NTP service matches the rules in accordance from the smallest
to the largest to access restriction, and the first matched rule shall prevail. The matching order is
peer, serve, serve-only, and query-only.
The control and query function is not supported in the current system. Although it
matches with the order in accordance with the preceding rules, requests related to the
control and query function are not supported.
If you do not configure any access control rules, all accesses are allowed. Once the
access control rules are configured, only the rule that allows access can be carried out.
Configuration
Examples
The following example shows how to allow the peer device in acl1 to control, query, request for, and
synchronize the time with the local device; and limit the peer device in acl2 to request the time for the
local device:
Ruijie(config)# ntp access-group peer 1
Ruijie(config)# ntp access-group serve-only 2
Related
Commands
Command Description
ip access-list
Creates the IP access control list.