- Table of Contents
-
- H3C S9500 Command Manual-Release1648[v1.24]-08 System Volume
- 00-1Cover
- 01-Command Line Interface Commands
- 02-Login and User Interface Commands
- 03-FTP and TFTP Commands
- 04-HA Commands
- 05-NQA Commands
- 06-NetStream Commands
- 07-NTP Commands
- 08-RMON Commands
- 09-SNMP Commands
- 10-Packet Statistics Accounting Commands
- 11-Device Management Commands
- 12-Configuration File Management Commands
- 13-File System Management Commands
- 14-Cluster Management Commands
- 15-System Maintenance and Debugging Commands
- 16-Information Center Commands
- 17-PoE Commands
- 18-Clock Module Commands
- 19-ACSEI Server Commands
- 20-OAP Module Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-NTP Commands | 68 KB |
Table of Contents
Chapter 1 NTP Configuration Commands
1.1 NTP Configuration Commands
1.1.2 display ntp-service sessions
1.1.3 display ntp-service status
1.1.4 display ntp-service trace
1.1.6 ntp-service authentication enable
1.1.7 ntp-service authentication-keyid
1.1.8 ntp-service broadcast-client
1.1.9 ntp-service broadcast-server
1.1.10 ntp-service in-interface disable
1.1.11 ntp-service max-dynamic-sessions
1.1.12 ntp-service multicast-client
1.1.13 ntp-service multicast-server
1.1.14 ntp-service refclock-master
1.1.15 ntp-service reliable authentication-keyid
1.1.16 ntp-service source-interface
1.1.17 ntp-service unicast-peer
1.1.18 ntp-service unicast-server
Chapter 1 NTP Configuration Commands
1.1 NTP Configuration Commands
1.1.1 debugging ntp-service
Syntax
debugging ntp-service { access | adjustment | authentication | event | filter | packet | parameter | refclock | selection | synchronization | validity | all }
undo debugging ntp-service { access | adjustment | authentication | event | filter | packet | parameter | refclock | selection | synchronization | validity | all }
View
User view
Parameters
access: Enables NTP access control debugging.
adjustment: Enables NTP clock adjustment debugging.
all: Enables all NTP debugging functions.
authentication: Enables NTP authentication debugging.
event: Enables NTP event debugging.
filter: Enables NTP filter information debugging.
packet: Enables NTP packet debugging.
parameter: Enables NTP clock parameter debugging.
refclock: Enables NTP reference clock debugging.
selection: Enables NTP clock selection information debugging.
synchronization: Enables NTP clock synchronization information debugging.
validity: Enables NTP remote host validity debugging.
Description
Use the debugging ntp-service command to debug different NTP services.
Use the undo debugging ntp-service command to disable corresponding debugging function.
By default, no debugging function is enabled.
Examples
# Enable NTP access control debugging.
<H3C> debugging ntp-service access
1.1.2 display ntp-service sessions
Syntax
display ntp-service sessions [ verbose ]
View
Any view
Parameters
verbose: Specifies to display the detail information about the SESSIONS.
Description
Use the display ntp-service sessions command to display the status of all the SESSIONS maintained by NTP service provided by the local equipment.
By default, the status of all the SESSIONS maintained by NTP service provided by the local equipment will be displayed.
l When you configure this command without the verbose argument, the switch will display the brief information about all the SESSIONS it maintains.
l With the verbose argument configured, the switch will display the detail information about all the SESSIONS it maintains.
Examples
# Display status of all SESSIONS maintained by the local device NTP service.
<H3C> display ntp-service sessions
source reference stra reach poll now offset delay disper
********************************************************************
[12345]127.127.1.0 LOCAL(0) 7 377 64 16 0.0 0.0 0.9
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
1.1.3 display ntp-service status
Syntax
display ntp-service status
View
Any view
Parameters
None
Description
Use the display ntp-service status command to display the NTP service status.
Examples
# Display the NTP service status.
<H3C> display ntp-service status
Clock status: synchronized
Clock stratum: 8
Reference clock ID: 127.127.1.0
Nominal frequency: 100.0000 Hz
Actual frequency: 100.0000 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: 09:13:32.953 UTC Feb 13 2006(C79ACC3C.F405F6BA)
Table 1-1 display ntp-service status command output description
Description |
|
clock status: unsynchronized |
Local clock status: do not synchronize to any remote NTP server. |
clock stratum: 16 |
Indicates the NTP stratum of local clock. |
reference clock ID |
|
nominal frequency |
Nominal frequency of the local system hardware clock |
actual frequency |
Actual frequency of the local system hardware clock |
clock precision |
Precision of local system clock |
clock offset |
Offset of the local clock to the NTP server clock |
root delay |
Root delay from local equipment to the master reference clock. |
root dispersion |
Dispersion of the local clock relative to the NTP server clock |
peer dispersion |
Dispersion of the remote NTP server |
reference time |
Reference timestamp |
1.1.4 display ntp-service trace
Syntax
display ntp-service trace
View
Any view
Parameters
None
Description
Use the display ntp-service trace command to display the brief information about every NTP server on the way from the local device to the reference clock source.
With this command, the system synchronizes the NTP server link from the local device along time till the reference clock source, and displays brief information about every NTP server.
Examples
# Display brief information about every NTP server on the way from the local device to the reference clock source.
<H3C> display ntp-service trace
server 127.0.0.1,stratum 8, offset 0.000000, synch distance 0.00000
refid 127.127.1.0
1.1.5 ntp-service access
Syntax
ntp-service access { query | synchronization | server | peer } acl-number
undo ntp-service access { query | synchronization | server | peer }
View
System view
Parameters
query: Allows to control query authority.
synchronization: Only allows the server to access.
server: Allows query to server and access.
peer: Full access authority.
acl-number: IP address list number.
Description
Use the ntp-service access command to set the authority to access the local equipment.
Use the undo ntp-service access command to cancel the access authority settings.
By default, there is no limit to the access.
Set authority to access the NTP services on a local Ethernet Switch. This is a basic and brief security measure, compared to authentication. An access request will be matched with peer, server, synchronization, and query in an ascending order of the limitation. The first matched authority will be given.
Examples
# Give the authority of time request, query control and synchronization with the local equipment to the peer in ACL 2000.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service access peer 2000
# Give the authority of time request and query control of the local equipment to the peer in ACL 2000.
[H3C] ntp-service access synchronization 2000
1.1.6 ntp-service authentication enable
Syntax
ntp-service authentication enable
undo ntp-service authentication enable
View
System view
Parameters
None
Description
Use the ntp-service authentication enable command to enable the NTP-service authentication function.
Use the undo ntp-service authentication enable command to disable this function.
By default, the authentication is disabled.
Examples
# Enable NTP authentication function.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service authentication enable
1.1.7 ntp-service authentication-keyid
Syntax
ntp-service authentication-keyid number authentication-mode md5 value
undo ntp-service authentication-keyid number
View
System view
Parameters
number: Key number, ranging from 1 to 4,294,967,295.
value: Value of the key with 1 to 16 ASCII characters.
Description
Use the ntp-service authentication-keyid command to set NTP authentication key.
Use the undo ntp-service authentication-keyid command to cancel the NTP authentication key.
By default, there is no authentication key.
Only MD5 authentication is supported for the NTP authentication key settings.
Examples
# Set MD5 authentication key 10 as test.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service authentication-keyid 10 authentication-mode md5 test
1.1.8 ntp-service broadcast-client
Syntax
ntp-service broadcast-client
undo ntp-service broadcast-client
View
VLAN interface view
Parameters
None
Description
Use the ntp-service broadcast-client command to configure NTP broadcast client mode.
Use the undo ntp-service broadcast-client command to disable the NTP broadcast client mode.
By default, the NTP broadcast client mode is disabled.
Designate an interface on the local Ethernet Switch to receive NTP broadcast messages and operate in broadcast client mode. The local Ethernet Switch listens to the broadcast from the server. When it receives the first broadcast packet, it starts a brief Client/Server mode to switch messages with a remote server for estimating the network delay. Thereafter, the local Ethernet Switch enters Broadcast Client mode and continues listening to the broadcast and synchronizes the local clock according to the arrived broadcast message.
Examples
# Configure to receive NTP broadcast packets through Vlan-Interface1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface1
[H3C-Vlan-interface1] ntp-service broadcast-client
1.1.9 ntp-service broadcast-server
Syntax
ntp-service broadcast-server [ authentication-keyid keyid version number ]
undo ntp-service broadcast-server
View
VLAN interface view
Parameters
authentication-keyid: Specifies the authentication key.
keyid: Key ID used in broadcast, ranging from 0 to 4294967295.
version: Defines NTP version number.
number: NTP version number, ranging from 1 to 3.
Description
Use the ntp-service broadcast-server command to configure NTP broadcast server mode.
Use the undo ntp-service broadcast-server command to disable the NTP broadcast server mode.
By default, the broadcast service is disabled and number defaults to 3.
Designate an interface on the local equipment to broadcast NTP packets. The local equipment runs in broadcast-server mode and regularly broadcasts packets to its clients.
Examples
# Configure to broadcast NTP packets through Vlan-Interface1, encrypt them with Key 4, and set the NTP version number as 3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface1
[H3C-Vlan-interface1] ntp-service broadcast-server authentication-key 4 version 3
1.1.10 ntp-service in-interface disable
Syntax
ntp-service in-interface disable
undo ntp-service in-interface disable
View
VLAN interface view
Parameters
None
Description
Use the ntp-service in-interface disable command to disable an interface from receiving NTP messages.
Use the undo ntp-service in-interface disable command to restore the default.
By default, an interface is allowed to receive NTP messages.
Examples
# Disable VLAN-interface 1 from receiving NTP messages.
<H3C> system-view
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] ntp-service in-interface disable
1.1.11 ntp-service max-dynamic-sessions
Syntax
ntp-service max-dynamic-sessions number
undo ntp-service max-dynamic-sessions
View
System view
Parameters
number: Maximum number of SESSIONS that can be created locally, ranging from 0 to 100.
Description
Use the ntp-service max-dynamic-sessions command to set how many SESSIONS can be created locally.
Use the undo ntp-service max-dynamic-sessions command to resume the default maximum SESSIONS number
By default, a local device allows up to 100 SESSIONS.
Examples
# Set the local equipment to allow up to 50 SESSIONS.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service max-dynamic-sessions 50
1.1.12 ntp-service multicast-client
Syntax
ntp-service multicast-client [ ip-address ]
undo ntp-service multicast-client [ ip-address ]
View
VLAN interface view
Parameters
ip-address: Multicast IP address of Class D. By default, the ip-address argument is set to 224.0.1.1. Actually, for the S9500 series, you can set 224.0.1.1 as the multicast IP address only.
Description
Use the ntp-service multicast-client command to configure the NTP multicast client mode.
Use the undo ntp-service multicast-client command to disable the NTP multicast client mode.
By default, the multicast client service is disabled. ip-address defaults to 224.0.1.1.
Designate an interface on the local Ethernet Switch to receive NTP multicast messages and operate in Multicast Client mode. The local Ethernet Switch listens to the multicast packets from the server. When it receives the first multicast packet, it starts a brief Client/Server mode to switch messages with a remote server for estimating the network delay. Thereafter, the local Ethernet Switch enters Multicast Client mode and continues listening to the multicast packets and synchronizes the local clock according to the arrived multicast packets.
Examples
# Configure to receive NTP multicast packet through Vlan-Interface1 and the multicast group corresponding to these packets located at 224.0.1.1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] ntp-service multicast-client 224.0.1.1
1.1.13 ntp-service multicast-server
Syntax
ntp-service multicast-server [ ip-address ] [ authentication-keyid keyid ] [ ttl ttl-number ] [ version number ]*
undo ntp-service multicast-server [ ip-address ]
View
VLAN interface view
Parameters
ip-address: Multicast IP address of Class D. It defaults to 224.0.1.1. Actually, for the S9500 series, you can set 224.0.1.1 as the multicast IP address only.
authentication-keyid: Specifies authentication key.
keyid: Key ID used in multicast, ranging from 1 to 4294967295.
ttl: Time to live of a multicast packet.
ttl-number: ttl of a multicast packet, ranging from 1 to 255.
version: Specifies the NTP version number.
number: NTP version number and range from 1 to 3.
Description
Use the ntp-service multicast-server command to configure NTP multicast server mode, if no IP address is specified, switch automatically choice the 224.0.1.1 as the multicast IP address.
Use the undo ntp-service multicast-server command to disable NTP multicast server mode, if no IP address is specified, the switch will disable the configuration of the multicast IP address 224.0.1.1.
By default, the multicast service is disabled. IP address defaults to 224.0.1.1 and the version number defaults to 3.
Designate an interface on the local equipment to transmit NTP multicast packet. The local equipment operates in multicast-server mode and multicasts packets regularly to its clients.
Examples
# Configure to transmit NTP multicast packets encrypted with Key 4 through Vlan-Interface1 at 224.0.1.1 and use NTP version 3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface vlan-interface 1
[H3C-Vlan-interface1] ntp-service multicast-server 224.0.1.1 authentication-keyid 4 version 3
1.1.14 ntp-service refclock-master
Syntax
ntp-service refclock-master [ ip-address ] [ stratum ]
undo ntp-service refclock-master [ ip-address ]
View
System view
Parameters
ip-address: Specifies the reference clock IP address as 127.127.u, where u ranges from 0 to 3.
stratum: Specifies which stratum the local clock is located at and range from 1 to 15.
Description
Use the ntp-service refclock-master command to configure an external reference clock or the local clock as an NTP master clock.
Use the undo ntp-service refclock-master command to cancel the NTP master clock settings.
By default, ip-address is 127.127.1.0 and stratum defaults to 8.
You can use this command to designate an NTP external reference clock or the local clock as an NTP master clock to provide synchronized time for other equipment. ip-address specifies the IP address of an external clock as 127.127.u. If no IP address is specified, the local clock is set as the NTP master clock by default. You can also specify the stratum of the NTP master clock.
Examples
# Set the local clock as the NTP master clock to provide synchronized time for its peers and locate it at stratum 3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service refclock-master 3
1.1.15 ntp-service reliable authentication-keyid
Syntax
ntp-service reliable authentication-keyid key-number
undo ntp-service reliable authentication-keyid key-number
View
System view
Parameters
key-number: Key number, ranging from 1 to 4294967295.
Description
Use the ntp-service reliable authentication-keyid command to configure the key as reliable.
Use the undo ntp-service reliable authentication-keyid command to cancel the current setting.
By default, no key is configured as reliable.
When you enable the authentication, you can use this command to configure one or more than one keys as reliable. In this case, a Client will only get synchronized by a server whichever can provide a reliable key.
Examples
# Enable NTP authentication, adopt MD5 encryption, and designate Key 37 BetterKey and configure it as reliable.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service authentication enable
[H3C] ntp-service authentication-keyid 37 authentication-mode md5 BetterKey
[H3C] ntp-service reliable authentication-keyid 37
1.1.16 ntp-service source-interface
Syntax
ntp-service source-interface interface-type interface-number
undo ntp-service source-interface
View
System view
Parameters
interface-type: Specifies the interface type and determine an interface with the interface-number argument.
interface-number: Specifies the interface number and determine an interface with the interface-type argument.
Description
Use the ntp-service source-interface command to designate an interface to transmit NTP message.
Use the undo ntp-service source-interface command to cancel the current setting.
By default, the source address specifies where the packets are transmitted from.
You can use this command to designate an interface to transmit all the NTP packets and take the source address of these packets from its IP address. If you do not want any other interface to receive the acknowledgement packets, use this command to specify one interface to send all the NTP packets.
Examples
# Configure all the outgoing NTP packets to use the IP address of Vlan-Interface1 as their source IP address.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service source-interface Vlan-Interface 1
1.1.17 ntp-service unicast-peer
Syntax
ntp-service unicast-peer ip-address [ version number ] [ authentication-keyid keyid ] [ source-interface interface-type interface-number ] [ priority ]*
undo ntp-service unicast-peer ip-address
View
System view
Parameters
ip-address: IP address of a remote server.
version: Defines NTP version number.
number: NTP version number, ranging from 1 to 3.
authentication-keyid: Defines authentication key.
keyid: Key ID used for transmitting messages to a remote server, ranging from 1 to 4294967295.
source-interface: Specifies the name of an interface, the interface can be VLAN interface and Loopback interface currently.
interface-type: Specifies the interface type and determine an interface together with the interface-number argument.
interface-number: Specifies the interface number and determine an interface together with the interface-type argument.
interface-type interface-number specifies from which interface to obtain the source IP address carried in the packet sent by the local switch to the peer. Currently, only VLAN interfaces and Loopback interfaces are supported.
priority: Designates a server as the first choice.
Description
Use the ntp-service unicast-peer command to configure NTP peer mode.
Use the undo ntp-service unicast-peer command to cancel NTP peer mode.
By default, version number number defaults to 3, the authentication is disabled, and the local server is not the first choice.
This command sets the remote server at ip-address as a peer of the local equipment, which operates in symmetric active mode. ip-address specifies a host address other than an IP address of broadcast, multicast, or reference clock. By operating in this mode, a local device can synchronize and be synchronized by a remote server.
Examples
# Configure the local equipment to synchronize or synchronized by a peer at 128.108.22.44. Set the NTP version to 3. The IP address of the NTP packets are taken from that of Vlan-Interface1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service unicast-peer 131.108.22.33 version 3 source-interface Vlan-Interface 1
1.1.18 ntp-service unicast-server
Syntax
ntp-service unicast-server ip-address [ version number ] [ authentication-keyid keyid ] [ source-interface interface-type interface-number ] [ priority ]*
undo ntp-service unicast-server ip-address
View
System view
Parameters
ip-address: IP address of a remote server.
version: Defines NTP version number.
number: NTP version number, ranging from 1 to 3.
authentication-keyid: Defines authentication key.
keyid: Key ID used for transmitting messages to a remote server, ranging from 1 to 4294967295.
source-interface: Specifies the name of an interface, the interface can be VLAN interface and Loopback interface.
interface-type: Specifies the interface type and determine an interface together with the interface-number argument.
interface-number: Specifies the interface number and determine an interface together with the interface-type argument.
When the local switch sends an NTP packet to the timer server, the source IP address carried in the packet is obtained from the interface. Currently, only VLAN interfaces and Loopback interfaces are supported.
priority: Designates a server as the first choice.
Description
Use the ntp-service unicast-server command to configure NTP server mode.
Use the undo ntp-service unicast-server command to disable NTP server mode.
By default, version number number defaults to 3, the authentication is disabled, and the local server is not the first choice.
The command announces to use the remote server at ip-address as the local time server. ip-address specifies a host address other than an IP address of broadcast, multicast, or reference clock. By operating in client mode, a local device can be synchronized by a remote server, but not synchronize any remote server.
Examples
# Designate the server at 128.108.22.44 to synchronize the local device and use NTP version 3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ntp-service unicast-server 128.108.22.44 version 3