Clock Management Commands
Total Page:16
File Type:pdf, Size:1020Kb
Clock Management Commands To use these commands in System Admin VM, you must be in a user group associated with appropriate command rules and data rules. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance. • clock timezone, page 2 • clock read-calendar, page 6 • ntp authenticate, page 7 • ntp authentication-key, page 8 • ntp peer, page 9 • ntp server, page 11 • ntp trusted-key, page 13 • show calendar, page 14 • show clock, page 15 • show ntp associations, page 16 System Administration Command Reference for the Cisco NCS 6000 Series Routers 1 Clock Management Commands clock timezone clock timezone To set the time zone for display, use the clock timezone command in System Admin Config mode or XR Config mode. To remove the time zone setting, use the no form of this command. clock timezone zone region no clock timezone Syntax Description zone Name of the time zone to be displayed when standard time is in effect. region Sets the offset according to the region specified. Command Default UTC Command Modes System Admin Config mode XR Config mode Command History Release Modification Release 5.0.0 This command was introduced. Usage Guidelines This table lists common time zone acronyms used for the zone argument. Table 1: Common Time Zone Acronyms Acronym Time Zone Name and UTC Offset Europe GMT Greenwich Mean Time, as UTC. BST British Summer Time, as UTC plus 1 hour. IST Irish Summer Time, as UTC plus 1 hour. WET Western Europe Time, as UTC. System Administration Command Reference for the Cisco NCS 6000 Series Routers 2 Clock Management Commands clock timezone Acronym Time Zone Name and UTC Offset WEST Western Europe Summer Time, as UTC plus 1 hour. CET Central Europe Time, as UTC plus 1 hour. CEST Central Europe Summer Time, as UTC plus 2 hours. EET Eastern Europe Time, as UTC plus 2 hours. EEST Eastern Europe Summer Time, as UTC plus 3 hours. MSK Moscow Time, as UTC plus 3 hours. MSD Moscow Summer Time, as UTC plus 4 hours. United States and Canada AST Atlantic Standard Time, as UTC minus 4 hours. ADT Atlantic Daylight Time, as UTC minus 3 hours. ET Eastern Time, either as EST or EDT, depending on place and time of year. EST Eastern Standard Time, as UTC minus 5 hours. EDT Eastern Daylight Saving Time, as UTC minus 4 hours. CT Central Time, either as CST or CDT, depending on place and time of year. CST Central Standard Time, as UTC minus 6 hours. CDT Central Daylight Saving Time, as UTC minus 5 hours. MT Mountain Time, either as MST or MDT, depending on place and time of year. MST Mountain Standard Time, as UTC minus 7 hours. MDT Mountain Daylight Saving Time, as UTC minus 6 hours. PT Pacific Time, either as PST or PDT, depending on place and time of year. PST Pacific Standard Time, as UTC minus 8 hours. PDT Pacific Daylight Saving Time, as UTC minus 7 hours. AKST Alaska Standard Time, as UTC minus 9 hours. System Administration Command Reference for the Cisco NCS 6000 Series Routers 3 Clock Management Commands clock timezone Acronym Time Zone Name and UTC Offset AKDT Alaska Standard Daylight Saving Time, as UTC minus 8 hours. HST Hawaiian Standard Time, as UTC minus 10 hours. Australia WST Western Standard Time, as UTC plus 8 hours. CST Central Standard Time, as UTC plus 9.5 hours. EST Eastern Standard/Summer Time, as UTC plus 10 hours (plus 11 hours during summer time). This table lists an alternative method for referring to time zones, in which single letters are used to refer to the time zone difference from UTC. Using this method, the letter Z is used to indicate the zero meridian, equivalent to UTC, and the letter J (Juliet) is used to refer to the local time zone. Using this method, the International Date Line is between time zones M and Y. Table 2: Single-Letter Time Zone Designators Letter Designator Word Designator Difference from UTC Y Yankee UTC minus 12 hours. X Xray UTC minus 11 hours. W Whiskey UTC minus 10 hours. V Victor UTC minus 9 hours. U Uniform UTC minus 8 hours. T Tango UTC minus 7 hours. S Sierra UTC minus 6 hours. R Romeo UTC minus 5 hours. Q Quebec UTC minus 4 hours. P Papa UTC minus 3 hours. O Oscar UTC minus 2 hours. N November UTC minus 1 hour. Z Zulu Same as UTC. System Administration Command Reference for the Cisco NCS 6000 Series Routers 4 Clock Management Commands clock timezone Letter Designator Word Designator Difference from UTC A Alpha UTC plus 1 hour. B Bravo UTC plus 2 hours. C Charlie UTC plus 3 hours. D Delta UTC plus 4 hours. E Echo UTC plus 5 hours. F Foxtrot UTC plus 6 hours. G Golf UTC plus 7 hours. H Hotel UTC plus 8 hours. I India UTC plus 9 hours. K Kilo UTC plus 10 hours. L Lima UTC plus 11 hours. M Mike UTC plus 12 hours. Examples This example shows how to set the time zone to IST Asia/Calcutta: sysadmin-vm:0_RP0# config sysadmin-vm:0_RP0(config)# clock timezone IST Asia/Calcutta System Administration Command Reference for the Cisco NCS 6000 Series Routers 5 Clock Management Commands clock read-calendar clock read-calendar To manually copy the hardware clock (calendar) settings into the software clock, use the clock read-calendar command in XR EXEC modeSystem Admin EXEC mode. clock read-calendar Syntax Description This command has no keywords or arguments. Command Default Read calendar is disabled. Command Modes XR EXEC mode System Admin EXEC mode Command History Release Modification Release 5.0.0 This command was introduced. Usage Guidelines The calendar clock is a hardware system clock that runs continuously, even if the router is powered off or rebooted. The hardware system clock is separate from the software clock settings, which are erased when the router is power cycled or rebooted. Use the clock read-calendar command to manually copy the hardware clock setting into the software clock. Examples In the following example, the hardware clock settings are copied to the software clock with the clock read-calendar command. The show clock command is then entered to display the new software clock settings. sysadmin-vm:0_RP0# clock read-calendar sysadmin-vm:0_RP0# show clock Thu Jul 18 14:56:51.888 UTC Thu Jul 18 14:56:52 UTC 2013 System Administration Command Reference for the Cisco NCS 6000 Series Routers 6 Clock Management Commands ntp authenticate ntp authenticate To enable Network Time Protocol (NTP) authentication, use the ntp authenticate command in the System Admin Config or XR Config mode. To restore the system to its default condition, use the no form of this command. ntp authenticate no ntp authenticate Syntax Description This command has no keywords or arguments. Command Default None Command Modes System Admin Config XR Config Command History Release Modification Release 5.0.0 This command was introduced. Usage Guidelines Use the authenticate command to enable NTP authentication. When NTP authentication is enabled, the system does not synchronize to a time source unless it carries one of the authentication keys specified by the trusted-key command. NTP synchronization will not take place until valid authentication credentials are available with the source. Examples The following example shows how to enable ntp authentication: sysadmin-vm:0_RP0#config sysadmin-vm:0_RP0(config)#ntp authenticate System Administration Command Reference for the Cisco NCS 6000 Series Routers 7 Clock Management Commands ntp authentication-key ntp authentication-key To define an authentication key for a trusted Network Time Protocol (NTP) time source, use the ntp authentication-key command in the System Admin Config and XR Config modes. To restore the system to its default condition, use the no form of this command. ntp authentication-key key-number md5 {clear | encrypted} key-name no ntp authentication-key key-number md5 {clear | encrypted} key-name Syntax Description key-number Authentication key. A number in the range from 1 to 65535. md5 Provides message authentication support using the Message Digest 5 (MD5) algorithm. clear Specifies that the key value entered after this keyword is unencrypted. encrypted Specifies that the key value entered after this keyword is encrypted. key-number Key value. The maximum length is 32 characters. Command Default No authentication key is defined for NTP. Command Modes System Admin Config XR Config Command History Release Modification Release 5.0.0 This command was introduced. Usage Guidelines Use the authentication-key command to define authentication keys for use with trusted NTP time sources. Use the authentication-key command only after enabling authentication. Examples This example shows how to configure the system to synchronize only to systems providing authentication key 42 in their NTP packets: sysadmin-vm:0_RP0#config sysadmin-vm:0_RP0(config)#ntp authentication-key 42 md5 clear key1 System Administration Command Reference for the Cisco NCS 6000 Series Routers 8 Clock Management Commands ntp peer ntp peer To configure the system clock to synchronize a peer or to be synchronized by a peer, use the ntp peer command in the System Admin Config mode. To remove the peer command from the configuration file and restore the system to its default condition with respect to the command, use the no form of this command. ntp peer peer-name [[key-id id]| [prefer]| [version number]] no ntp peer peer-name [[key-id id]| [prefer]| [version number]] Syntax Description peer-name Name of the NTP peer. key-id key-id Defines the authentication key, where the key-id argument is the authentication key to use when packets are sent to this peer.