0% found this document useful (0 votes)
44 views

Content: CHAPTER 1 COMMANDS FOR SNTP....................................... 1-1

This document describes commands for network time management using both SNTP and NTP. It includes commands for configuring SNTP/NTP servers, setting polling intervals, enabling/disabling features, and displaying status information. Debugging commands are also provided to monitor packets, adjustments, authentication, and other events for troubleshooting network time issues.

Uploaded by

Kheme Vitoumeta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Content: CHAPTER 1 COMMANDS FOR SNTP....................................... 1-1

This document describes commands for network time management using both SNTP and NTP. It includes commands for configuring SNTP/NTP servers, setting polling intervals, enabling/disabling features, and displaying status information. Debugging commands are also provided to monitor packets, adjustments, authentication, and other events for troubleshooting network time issues.

Uploaded by

Kheme Vitoumeta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 10

Commands for Network Time Management Content

Content

CHAPTER 1 COMMANDS FOR SNTP.......................................1-1

1.1 DEBUG SNTP.......................................................................................1-1


1.2 SNTP SERVER......................................................................................1-1
1.3 SNTP POLLTIME...................................................................................1-1
1.4 SNTP TIMEZONE.................................................................................. 1-2
1.5 SHOW SNTP........................................................................................ 1-2

CHAPTER 2 COMMANDS FOR NTP.........................................2-1

2.1 NTP ENABLE....................................................................................... 2-1


2.2 NTP SERVER....................................................................................... 2-1
2.3 NTP BROADCAST SERVER COUNT.........................................................2-2
2.4 NTP TIMEZONE.................................................................................... 2-2
2.5 NTP ACCESS-GROUP............................................................................2-2
2.6 NTP AUTHENTICATE.............................................................................2-3
2.7 NTP AUTHENTICATION-KEY...................................................................2-3
2.8 NTP TRUSTED-KEY...............................................................................2-4
2.9 NTP DISABLE.......................................................................................2-4
2.10 DEBUG NTP AUTHENTICATION.............................................................2-4
2.11 DEBUG NTP PACKET..........................................................................2-5
2.12 DEBUG NTP ADJUST..........................................................................2-5
2.13 DEBUG NTP SYNC..............................................................................2-6
2.14 DEBUG NTP EVENTS..........................................................................2-6
2.15 SHOW NTP STATUS............................................................................2-6
2.16 show ntp session..............................................................................2-7

1
Commands for Network Time Management Chapter 1 Commands for SNTP

Chapter 1 Commands for SNTP

1.1 debug sntp

Command: debug sntp {adjust | packet | select }


no debug sntp {adjust | packet | select}
Function: Displays or disables SNTP debug information.
Parameters: adjust stands for SNTP clock adjustment information; packet for SNTP
packets, select for SNTP clock selection.
Command mode: Admin Mode
Example: Displaying debugging information for SNTP packet.
Switch#debug sntp packet

1.2 sntp server

Command: sntp server { <server_address> } [version <version_no>]


no sntp server { <server_address> }
Function: Configure the IP addresses and the version of the SNTP/NTP server; the “no”
form of this command cancels the configured SNTP/NTP server addresses.
Parameter: <server_address> is the IP unicast address of the SNTP/NTP server,
<version_no> is the version No. of the SNTP on current server, ranging between 1-4
and defaulted at 1.
Default: No SNTP/NTP configured by default.
Command Mode: Global Mode
Example: Configure an IP address of a SNTP/NTP server. SNTPv4 version is adopted
on the server
Switch(config)#sntp server 10.1.1.1 version 4

1.3 sntp polltime

Command: sntp polltime <interval>


no sntp polltime
Function: Sets the interval for SNTP clients to send requests to NTP/SNTP; the “no
sntp polltime” command cancels the polltime sets and restores the default setting.
Parameters: <interval> is the interval value from 16 to 16284.
Default: The default polltime is 64 seconds.
Command Mode: Global Mode
Example: Setting the client to send request to the server every 128 seconds.
Switch#config

1
Commands for Network Time Management Chapter 1 Commands for SNTP

Switch(config)#sntp polltime128

1.4 sntp timezone

Command: sntp timezone <name> [{add | subtract}] [<time_difference>]


no sntp timezone
Function: Set the difference between local time and UTC time. The no operation of this
command cancels the configuration timezone and restores the default value.
Parameter: <name> is the name of local timezone, consist of max 16 characters. <add>
means the timezone equals the UTC time add <time_difference>.<subtract>means the
timezone equals the UTC time subtract <time_difference>.<time-difference> is the time
difference to UTC time, range from 0 to 12,the default value is 8 .
Default: Add 8 is default timezone.
Command Mode: Global Mode
Example: Set the timezone Beijing.
Switch#config
Switch(config)#sntp timezone beijing add 8

1.5 show sntp

Command: show sntp


Function: Displays current SNTP client configuration and server status.
Parameters: N/A.
Command Mode: Admin and Configuration Mode.
Example: Displaying current SNTP configuration.
Switch#show sntp
SNTP server Version Last Receive
2.1.0.2 1 6

2
Commands for Network Time Management Chapter 2 Commands for NTP

Chapter 2 Commands for NTP

2.1 ntp enable

Command: ntp enable


ntp disable
Function: To enable/disable NTP function globally.
Parameter: None.
Default: Disabled.
Command Mode: Global Mode.
Usage Guide: None.
Example: To enable NTP function.
Switch(config)#ntp enable

2.2 ntp server

Command: ntp server {<ip-address> | <ipv6-address>} [version <version_no>] [key


<key-id>]
no ntp server {<ip-address>|<ipv6-address>}
Function: To enable specified time server of time source, the no form of this command
cancels the specified time server of time source.
Parameter: ip-address: IPv4 address of time server.
ipv6-address: IPv6 address of time server.
version: The version information configured for server.
version_no: The version number of server, range is from 1 to 4, default is 4.
key: To configure key for server.
key-id: The key id.
Default: Disabled.
Command Mode: Global Mode.
Usage Guide: None.
Example: To configure time server address as 1.1.1.1 on switch.
Switch(config)#ntp server 1.1.1.1

2.3 ntp broadcast server count

Command: ntp broadcast server count <number>


no ntp broadcast server count

1
Commands for Network Time Management Chapter 2 Commands for NTP

Function: Set the max number of broadcast or multicast servers supported by the NTP
client. The no operation will cancel the configuration and restore the default value.
Parameters: number:1-100, the max number of broadcast servers.
Default: The default max number of broadcast servers is 50.
Command Mode: Global Mode.
Examples: Configure the max number of broadcast servers is 70 on the switch.
Switch(config)#ntp broadcast server count 70

2.4 ntp timezone

Command: ntp timezone <name> [{add | subtract}] [<time_difference>]


no ntp timezone
Function: To configure the time zone and time different with UTC for NTP client, the no
form of this command cancels the time zone sets and restores the default setting.
Parameter: name is the configured time zone, less than 16 characters.
add means the configured UTC time add time_difference.
subtract means the configured UTC time subtract time_difference, add is by
default.
time_difference is the configured time different , range between 0 to 12, set
to 8 is by default.
Default: The time different is set to add 8 by default.
Command Mode: Global Mode.
Usage Guide: None.
Example: To configure the time zone to beijing.
Switch#config
Switch(config)#ntp timezone beijing add 8

2.5 ntp access-group

Command: ntp access-group server <acl>


no ntp access-group server <acl>
Function: To configure/cancel the access control list of NTP Server.
Parameter: <acl>: ACL number, range is from 1 to 99.
Default: Not configure the access control of NTP Server.
Command Mode: Global Mode.
Usage Guide: None.
Example: To configure access control list 2 on the switch.
Switch(config)#ntp access-group server 2

2
Commands for Network Time Management Chapter 2 Commands for NTP

2.6 ntp authenticate

Command: ntp authenticate


no ntp authenticate
Function: To enable/cancel NTP authentication function.
Parameter: None.
Default: Disabled.
Command Mode: Global Mode.
Usage Guide: None.
Example: To enable NTP authentication function.
Switch(config)#ntp authenticate

2.7 ntp authentication-key

Command: ntp authentication-key <key-id> md5 <value>


no ntp authentication-key <key-id>
Function: To enable/cancel NTP authentication function, and defined NTP authentication
key.
Parameter: key-id: The id of key, range is from 1 to 4294967295.
value: The value of key, range between 1 to 16 of ascii code.
Default: The authentication key of NTP authentication is not configured by default.
Command Mode: Global Mode.
Usage Guide: None.
Example: To define the authentication key of NTP authentication, the key-id is 20, the
md5 is abc.
Switch(config)# ntp authentication-key 20 md5 abc

2.8 ntp trusted-key

Command: ntp trusted-key <key-id>


no ntp trusted-key <key-id>
Function: To configure the trusted key. The no command cancels the trusted key.
Parameter: key-id: The id of key, range is from 1 to 4294967295.
Default: Trusted key is not configured by default.
Command Mode: Global Mode.
Usage Guide: None.
Example: To configure the specified key 20 to trusted key.
Switch(config)# ntp trusted-key 20

3
Commands for Network Time Management Chapter 2 Commands for NTP

2.9 ntp disable

Command: ntp disable


no ntp disable
Function: To disable/enable the NTP function on port.
Parameter: None.
Default: To enable NTP function on all ports.
Command Mode: Interface Configuration Mode.
Usage Guide: None.
Example: To disable the NTP function on vlan1 interface.
Switch(config)# interface vlan 1
Switch(Config-if-Vlan1)#ntp disable

2.10 debug ntp authentication

Command: debug ntp authentication


no debug ntp authentication
Function: To display NTP authentication information, the no form command disabled the
switch of displaying NTP authentication information.
Parameter: None.
Default: Disabled.
Command Mode: Admin Mode.
Usage Guide: To display NTP authentication information, if the switch is enabled, and if
the packets schlepped authentication information when the packet in sending or receiving
process, then the key identifier will be printed out.
Example: To enable the switch of displaying NTP authentication information.
Switch# debug ntp authentication

2.11 debug ntp packet

Command: debug ntp packet [send | receive]


no debug ntp packet [send | receive]
Function: To enable/disable the debug switch of displaying NTP packet information.
Parameter: send: The debug switch of sending NTP packet.
receive: The debug switch of receiving NTP packet.
If there is no parameter, that means should enable the sending and receiving
switch of NTP packet in the same time.
Default: Disabled.
Command Mode: Admin Mode.

4
Commands for Network Time Management Chapter 2 Commands for NTP

Usage Guide: None.


Example: To enable the debug switch of displaying NTP packet information.
Switch# debug ntp packet

2.12 debug ntp adjust

Command: debug ntp adjust


no debug ntp adjust
Function: To enable/disable the debug switch of displaying local time adjust information.
Parameter: None.
Default: Disabled.
Command Mode: Admin Mode.
Usage Guide: None.
Example: To enable the debug switch of displaying local time adjust information.
Switch# debug ntp adjust

2.13 debug ntp sync

Command: debug ntp sync


no debug ntp sync
Function: To enable/disable debug switch of displaying local time synchronization
information.
Parameter: None.
Default: Disabled.
Command Mode: Admin Mode.
Usage Guide: None.
Example: To enable debug switch of displaying local time synchronization information.
Switch# debug ntp sync

2.14 debug ntp events

Command: debug ntp events


no debug ntp events
Function: To enable/disable debug switch of displaying NTP event.
Parameter: None.
Default: Disable the debug switch of displaying NTP event.
Command Mode: Admin Mode.
Usage Guide: To enable debug switch of displaying NTP event, after that, if some server

5
Commands for Network Time Management Chapter 2 Commands for NTP

changed from available to unavailable or from unavailable to available, the received


illegal packet events will be printed.
Example: To enable debug switch of displaying NTP event information.
Switch# debug ntp events

2.15 show ntp status

Command: show ntp status


Function: To display time synchronization status, include synchronized or not, layers,
address of time source and so on.
Parameter: None.
Default: None.
Command Mode: Admin and Configuration Mode.
Usage Guide: None.
Example:
Switch# show ntp status
Clock status: synchronized
Clock stratum: 3
Reference clock server: 1.1.1.2
Clock offset: 0.010 s
Root delay: 0.012 ms
Root dispersion: 0.000 ms
Reference time: TUE JAN 03 01:27:24 2006

2.16 show ntp session

Command: show ntp session [<ip-address> | <ipv6-address>]


Function: To display the information of all NTP session or some one specific session,
include server ID, server layer, and the local offset according to server. (The symbol *
means this server is the selected local time source)
Parameter: ip-address: The IPv4 address of some specifics configured time server.
ipv6-address: The IPv6 address of some specifics configured time server.
If no parameter, the session relative information of all servers will be displayed
(Include broadcast and multicast servers)
Default: None.
Command Mode: Admin and Configuration Mode.
Usage Guide: None.
Example:
(Switch)# show ntp session
server stream type rootdelay rootdispersion trustlevel

6
Commands for Network Time Management Chapter 2 Commands for NTP

* 1.1.1.2 2 unicast 0.010s 0.002s 10


2.2.2.2 3 unicast 0.005s 0.000s 10

You might also like