System Clock Commands
  • 06 Jul 2023
  • 7 Minutes to read
  • Contributors
  • PDF

System Clock Commands

  • PDF

Article summary

The Clock IWF (Inter Working Functionality) module functions as a layer between the system clock and the protocol that synchronizes the system clock.

This module selects the time source to set the system clock and maintains the information regarding the clock quality (such as clock accuracy, class, and variance).


Note: Module will updated in future releases.

System clock CLI commands are categorized as follows:

Enable and Disable Command

This section includes the system clock enable and disable command.

ntp client

Command Objective:
This command configures the NTP Client status and performs the given operation on the NTPD daemon.

Syntax:
ntp client { start | stop}

Parameter Description:

  • start - Starts the NTP Client
  • stop - Stops the NTP Client

Mode:
Global Configuration Mode

Example:

Your Product(config)# ntp-client
Your Product(config-ntp-client)# ntp client start

Configuration Commands

This section includes system clock configuration commands.

clock utc-offset

Command Objective:
This command configures the current UTC offset in scaled nanoseconds with respect to the system time.

The no form of the command resets the current UTC offset to the default utc-offset.


Note: Current utc-offset value are (+HH:MM /-HH:MM)(+00:00 to +14:00)/ (-00:00 to -12:00).

Syntax:
clock utc-offset < offset >

no clock utc-offset

Mode:
Global Configuration Mode

Default:
0

Example:

Your Product(config)# clock utc-offset +05:45

clock set time

Command Objective:
This command sets the time of the Software System Clock only.


Note: Clock set time value are (+HH:MM /-HH:MM)(+00:00 to +14:00)/ (-00:00 to -12:00).

Syntax:
clock set time < time-nanoseconds >

Mode:
Global Configuration Mode

Example:

Your Product(config)# clock set time -08:00

ntp-client

Command Objective:
This command configures the NTP client.

The no form of the command resets the configured NTP client.

Syntax:
ntp-client

no ntp-client

Mode:
Global Configuration Mode

Example:

Your Product(config)# ntp-client

ntp-server

Command Objective:
This command sets NTP servers in the pool-specific DHCP server configuration parameters.

The no form of the command deletes NTP Server from the pool-specific DHCP server configuration parameters.

Syntax:
ntp-server < ip address > [< ip address >]

no ntp-server

Parameter Description:

  • < ip address > [< ip address >] - Configures the unicast IP address to be set for the corresponding NTP servers in the pool-specific DHCP server configuration.

Mode:
DHCP Pool Configuration Mode

Example:

Your product (dhcp-config)# ntp-server 12.0.0.1 13.0.0.0

ntp sever ipv4 address

Command Objective:
This command configures the NTP server IP address.

The no form of the command deletes the assigned NTP Server IP address.

Syntax:
ntp server { < ip_addr >}

no ntp server { < ip_addr >}

Parameter Description:

  • < ip_addr > - Configures the specified IPv4 address to the NTP server.

Mode:
Global Configuration Mode / NTP Client Configuration Mode

Example:

Your Product(config)# ntp server 12.0.0.1
Your Product(config-ntp-client)# ntp server 12.0.0.1

ntp sever ipv4 - parameters

Command Objective:
This command configures the NTP server parameter-related configuration.

Syntax:
ntp server { < ip_addr > } ([prefer][version < integer(1-4) >][{[burst]| [ iburst]}][authkey < integer(1-65535) >][maxpoll < integer(10-17) >][minpoll < integer(4-6) >])

Parameter Description:

  • < ip_addr > - Configures the specified IPv4 address to the NTP server.
  • prefer - Adds the NTP server as the preferred server. When not mentioned, it is set as false and the specified NTP server IP is not configured as the preferred server.
  • version < integer(1-4) > - Configures the NTP version-related configuration used by the outgoing NTP packets. This value ranges from 1 to 4.
  • burst - Enables Burst mode in the NTP Server. When enabled the server is reachable and at each poll interval and sends a burst of eight packets rather than the usual single packet.
  • iburst - Enables iBurst mode in the NTP Server. When enabled the server is unreachable and at each poll interval and sends a burst of eight packets instead of the usual single packet.
  • authkey < integer(1-65535) > - Configures the authentication key identifier. This value ranges from 1 to 65535.
  • maxpoll < integer(10-17) > - Configures the maximum poll interval for NTP messages as power of 2, in seconds. The maximum poll interval defaults to 10 (1024 s) but can be increased by the maxpoll option to an upper limit of 17 (36.4 h)
  • minpoll < integer(4-6) > - Configures the minimum poll interval for NTP messages as power of 2, in seconds. The minimum poll interval defaults to 6 (64 s) but can be decreased by the minpoll option to a lower limit of 4 (16 s).

Mode:
Global Configuration Mode / NTP Client Configuration Mode

Default:

  • version - 4
  • maxpoll - 10
  • minpoll - 6

Example:

Your Product(config)# ntp server 12.0.0.1 version 1 burst authkey 1
Your Product(config-ntp-client)# ntp server 12.0.0.1 version 1 burst authkey 1

ntp source interface

Command Objective:
This command configures the NTP source interface.

The IP address configured in the NTP source interface is used as the source IP address for the NTP packets.

The no form of the command disables the NTP source interface.

Syntax:
ntp source interface { vlan < vlan < vlan_vfi_id > > | < interface-type > < interface-id > | cpu0}

no ntp source interface { vlan < vlan_vfi_id > | < interface-type > < interface-id > | cpu0}

Parameter Description:

  • vlan < vlan < vlan_vfi_id > > - Specifies the VLAN interface identifier on which NTP is enabled. This value ranges from 1 to 65535.
  • < vlan – id > - VLAN ID is a unique value that represents the specific VLAN. This value ranges from 1 to 4094.
  • < interface-type > - Specifies the interface identifier on which NTP is enabled.
  • < interface-id > - Specifies the interface identifier on which NTP is enabled. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash for interface type. For example: 0/1 represents that the slot number is 0 and the port number is 1.
  • cpu0 - Out of Band management interface

Mode:
Global Configuration Mode / NTP Client Configuration Mode

Example:

Your Product(config)# ntp source interface vlan 1
Your Product(config-ntp-client)# ntp source interface vlan 1

Display Commands

This section includes system clock display commands.

show clock

Command Objective:
This command displays the system date and time.

Syntax:
show clock

Mode:
Privileged EXEC Mode

Example:

Your product# show clock
Thu Mar 17 17:15:17 2022 (UTC +00:00)

show clock properties

Command Objective:
This command displays the properties of the primary clock.

Syntax:
show clock properties

Mode:
Privileged EXEC Mode

Example:

Your Product# show clock properties
System Clock Information
------------------------
Variance : 120
Class : 200
Accuracy : Unknown
Source : GPS
Offset : +05:45 (UTC)
HoldOver : Enabled
Clock NOT in sync with time source

show ntp-client associations

Command Objective:
This command is used to display the NTP client connection status.

Syntax:
show ntp-client associations

Mode:
Privileged EXEC Mode

Example:

Your Product# show ntp-clients associations
NTP Client Associations
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 22.0.0.100      LOCAL(0)         9 u   32   64    3    0.168  2720.42 4468197

show ntp-client clients

Command Objective:
This command is used to display NTP client-related information connected to the clients.

Syntax:
show ntp-clients clients

Mode:
Privileged EXEC Mode

Example:

Your Product# show ntp-client clients
NTP Client Status
remote address          port local address      count m ver rstr avgint  lstint
===============================================================================
22.0.0.100               123 22.0.0.1              15 5 4    190     19       7

show ntp-client config-status

Command Objective:
This command displays the NTP client configuration status.

Syntax:
show ntp-client config-status {[all] }

Parameter Description:

  • all - Displays all configured NTP client statistics

Mode:
Privileged EXEC Mode

Example:

Your Product# show ntp-client config-status
NTP Client Configuration
 ========================
 Context Name                 : default
 Status                       : Enable
 Server address               : 12.0.0.1
 Server mode                  : broadcast
 server version               : 0
 server keyid                 : 0
 server burst mode            : 2
 server min poll int          : 0
 server max poll int          : 0
 server prefer                : 1
 Source Interface             : vlan100

show ntp-client statistics

Command Objective:
This command is used to display the NTP client statistics.

Syntax:
show ntp-client statistics

Mode:
Privileged EXEC Mode

Example:

Your Product# show ntp-client statistics
NTP Client Statistics
time since restart:     206
time since reset:       206
packets received:       17
packets processed:      9
current version:        12
previous version:       0
declined:               0
access denied:          3
bad length or format:   0
bad authentication:     0
rate exceeded:          0

show ntp-client status

Command Objective:
This command displays the NTP client status.

Syntax:
show ntp-client status

Mode:
Privileged EXEC Mode

Example:

Your Product# show ntp-client status
NTP Client Running Status
NTP server is running.

show ntp-client sync status

Command Objective:
This command displays the NTP client synchronization status with the NTP server.

Syntax:
show ntp-client sync status

Mode:
Privileged EXEC Mode

Example:

your product# show ntp-client sync status
	NTP Client Sync Status
	synchronised to NTP server (40.0.0.100) at stratum 10
	   time correct to within 288 ms
	   polling server every 64 s

© 2024 Cisco and/or its affiliates. All rights reserved.
 
For more information about trademarks, please visit: Cisco trademarks
For more information about legal terms, please visit: Cisco legal terms

For legal information about Accedian Skylight products, please visit: Accedian legal terms and tradmarks



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.