Clock Commands

This chapter contains the following sections:

absolute

To specify an absolute time when a time range is in effect, use the absolute command in Time-range Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

absolute start hh:mm day month year

no absolute start

absolute end hh:mm day month year

no absolute end

Parameters

  • start—Absolute time and date that the permit or deny statement of the associated function going into effect. If no start time and date are specified, the function is in effect immediately.

  • end—Absolute time and date that the permit or deny statement of the associated function is no longer in effect. If no end time and date are specified, the function is in effect indefinitely.

  • hh:mm—Time in hours (military format) and minutes (Range: 0–23, mm: 0–5)

  • day—Day (by date) in the month. (Range: 1–31)

  • month—Month (first three letters by name). (Range: Jan...Dec)

  • year—Year (no abbreviation) (Range: 2000–2097)

Default Configuration

There is no absolute time when the time range is in effect.

Command Mode

Time-range Configuration mode

Example

switchxxxxxx(config)# time-range http-allowed
switchxxxxxx(config-time-range)# absolute start 12:00 1 jan 2005
switchxxxxxx(config-time-range)# absolute end 12:00 31 dec 2005

clock dhcp timezone

To specify that the timezone and the Summer Time (Daylight Saving Time) of the system can be taken from the DHCP Timezone option, use the clock dhcp timezone command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

clock dhcp timezone

no clock dhcp timezone

Default Configuration

Disabled

Command Mode

Global Configuration mode

User Guidelines

The TimeZone taken from the DHCP server has precedence over the static TimeZone.

The Summer Time taken from the DHCP server has precedence over static SummerTime.

The TimeZone and SummerTime remain effective after the IP address lease time has expired.

The TimeZone and SummerTime that are taken from the DHCP server are cleared after reboot.

The no form of the command clears the dynamic Time Zone and Summer Time from the DHCP server are cleared.

In case of multiple DHCP-enabled interfaces, the following precedence is applied: Disabling the DHCP client from where the DHCP-TimeZone option was taken, clears the dynamic Time Zone and Summer Time configuration.

  • information received from DHCPv6 precedes information received from DHCPv4.

  • information received from DHCP client running on lower interface precedes information received from DHCP client running on higher interface.

Example

switchxxxxxx(config)# clock dhcp timezone

clock set

To set the system clock manually, use the clock set command in Privileged EXEC mode.

Syntax

clock set hh:mm:ss {[day month] | [month day]} year

Parameters

  • hh:mm:ss—Specifies the current time in hours (military format), minutes, and seconds. (Range: hh: 0-23, mm: 0-59, ss: 0-59)

  • day—Specifies the current day of the month. (Range: 1-31)

  • month—Specifies the current month using the first three letters of the month name. (Range: Jan–Dec)

  • year—Specifies the current year. (Range: 2000–2037)

Default Configuration

The time of the image creation.

Command Mode

Privileged EXEC mode

User Guidelines

After boot the system clock is set to the time of the image creation.

Example

The following example sets the system time to 13:32:00 on March 7th, 2005.

switchxxxxxx# clock set 13:32:00 7 Mar 2005

clock source

To configure an external time source for the system clock, use the clock source command in Global Configuration mode. To disable the external time source, use the no form of this command.

Syntax

clock source {sntp | browser}

no clock source {sntp | browser}

Parameters

  • sntp—(Optional) Specifies that an SNTP server is the external clock source.

  • browser—(Optional) Specifies that if the system clock is not already set (either manually or by SNTP) and a user login to the device using a WEB browser (either via HTTP or HTTPS), the system clock will be set according to the browser’s time information.

Default Configuration

SNTP

Command Mode

Global Configuration mode

User Guidelines

After boot the system clock is set to the time of the image creation.

If no parameter is specified, SNTP will be configured as the time source.

if the command is executed twice, each time with a different clock source, both sources will be operational, SNTP has higher priority than time from browser.

Example

The following example configures an SNTP server as an external time source for the system clock.

switchxxxxxx(config)# clock source sntp
switchxxxxxx(config)# clock source browser
switchxxxxxx(config)# exit
switchxxxxxx# show clock
*10:46:48 UTC May 28 2013
Time source is sntp
Time from Browser is enabled

clock summer-time

To configure the system to automatically switch to summer time (Daylight Saving Time), use the clock summer-time command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

clock summer-time zone recurring {usa | eu | {week day month hh:mm week day month hh:mm}} [offset]

clock summer-time zone date day month year hh:mm date month year hh:mm [offset]

clock summer-time zone date month day year hh:mm month day year hh:mm [offset]

no clock summer-time

Parameters

  • zone—The acronym of the time zone. (Range: 1- 4 characters). Only letters can be included in the acronym.

  • recurring—Indicates that summer time starts and ends on the corresponding specified days every year.

  • date—Indicates that summer time starts on the first date listed in the command and ends on the second date in the command.

  • usa—The summer time rules are the United States rules.

  • eu—The summer time rules are the European Union rules.

  • week—Week of the month. Can be 1–5, first to last.

  • day—Day of the week (first three characters by name, such as Sun).

  • date—Date of the month. (Range: 1–31)

  • month—Month (first three characters by name, such as Feb).

  • year—year (no abbreviation). (Range: 2000–2097)

  • hh:mm—Time (military format) in hours and minutes. (Range: hh:mmhh: 0-23, mm: 0-59)

  • offset—(Optional) Number of minutes to add during summer time (default is 60). (Range: 1440)

Default Configuration

Summer time is disabled.

Command Mode

Global Configuration mode

User Guidelines

In both the date and recurring forms of the command, the first part of the command specifies when summer time begins, and the second part specifies when it ends. All times are relative to the local time zone. The start time is relative to standard time. The end time is relative to summer time. If the starting month is chronologically after the ending month, the system assumes that you are in the southern hemisphere.

USA rules for Daylight Saving Time:

  • From 2007:

    Start: Second Sunday in March

    End: First Sunday in November

    Time: 2 AM local time

  • Before 2007:

    Start: First Sunday in April

    End: Last Sunday in October

    Time: 2 AM local time

EU rules for Daylight Saving Time:

  • Start: Last Sunday in March

  • End: Last Sunday in October

    Time: 1.00 am (01:00) Greenwich Mean Time (GMT)

Example

switchxxxxxx(config)# clock summer-time abc date apr 1 2010 09:00 aug 2 2010 09:00

clock timezone

To set the time zone for display purposes, use the clock timezone command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

clock timezone zone hours-offset [minutes-offset]

no clock timezone

Parameters

  • zone—The acronym of the time zone. (Range: 1- 4 characters). Only letters can be included in the acronym.

  • hours-offset—Hours difference from UTC. (Range: (-12)–(+13))

  • minutes-offset—(Optional) Minutes difference from UTC. (Range: 0–59)

Default Configuration

Coordinated Universal Time (UTC) or Greenwich Mean Time (GMT), which is the same:

  • Offsets are 0.

  • Acronym is empty.

Command Mode

Global Configuration mode

User Guidelines

The system internally keeps time in UTC, so this command is used only for display purposes and when the time is manually set.

Example

switchxxxxxx(config)# clock timezone abc +2 minutes 32

periodic

To specify a recurring (weekly) time range for functions that support the time-range feature, use the periodic command in Time-range Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

periodic day-of-the-week hh:mm to day-of-the-week hh:mm

no periodic day-of-the-week hh:mm to day-of-the-week hh:mm

periodic list hh:mm to hh:mm day-of-the-week1 [day-of-the-week2… day-of-the-week7]

no periodic list hh:mm to hh:mm day-of-the-week1 [day-of-the-week2… day-of-the-week7]

periodic list hh:mm to hh:mm all

no periodic list hh:mm to hh:mm all

Parameters

  • day-of-the-week—The starting day that the associated time range is in effect. The second occurrence is the ending day the associated statement is in effect. The second occurrence can be the following week (see description in the User Guidelines). Possible values are: mon, tue, wed, thu, fri, sat, and sun.

  • hh:mm—The first occurrence of this argument is the starting hours:minutes (military format) that the associated time range is in effect. The second occurrence is the ending hours:minutes (military format) the associated statement is in effect. The second occurrence can be at the following day (see description in the User Guidelines). (Range: 0–23, mm: 0–59)

  • list day-of-the-week1—Specifies a list of days that the time range is in effect.

Default Configuration

There is no periodic time when the time range is in effect.

Command Mode

Time-range Configuration mode

User Guidelines

The second occurrence of the day can be at the following week, e.g. Thursday–Monday means that the time range is effective on Thursday, Friday, Saturday, Sunday, and Monday.

The second occurrence of the time can be on the following day, e.g. “22:00–2:00”.

Example

switchxxxxxx(config)# time-range http-allowed
switchxxxxxx(config-time-range)# periodic mon 12:00 to wed 12:00

sntp anycast client enable

To enable the SNTP Anycast client, use the sntp anycast client enable command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp anycast client enable [both | ipv4 | ipv6]

Parameters

  • both—(Optional) Specifies the IPv4 and IPv6 SNTP Anycast clients are enabled. If the parameter is not defined it is the default value.

  • ipv4—(Optional) Specifies the IPv4 SNTP Anycast clients are enabled.

  • ipv6—(Optional) Specifies the IPv6 SNTP Anycast clients are enabled.

Default Configuration

The SNTP anycast client is disabled.

Command Mode

Global Configuration mode

User Guidelines

Use this command to enable the SNTP Anycast client.

Example

The following example enables SNTP Anycast clients.

switchxxxxxx(config)# sntp anycast client enable

sntp authenticate

To enable authentication for received SNTP traffic from servers, use the sntp authenticate command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp authenticate

no sntp authenticate

Default Configuration

Authentication is disabled.

Command Mode

Global Configuration mode

Examples

The following example enables authentication for received SNTP traffic and sets the key and encryption key.

switchxxxxxx(config)# sntp authenticate
switchxxxxxx(config)# sntp authentication-key 8 md5 ClkKey
switchxxxxxx(config)# sntp trusted-key 8

sntp authentication-key

To define an authentication key for Simple Network Time Protocol (SNTP), use the sntp authentication-key command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp authentication-key key-number md5 key-value

encrypted sntp authentication-key key-number md5 encrypted-key-value

no sntp authentication-key key-number

Parameters

  • key-number—Specifies the key number. (Range: 1–4294967295)

  • key-value—Specifies the key value. (Length: 1–8 characters)

  • encrypted-key-value—Specifies the key value in encrypted format.

Default Configuration

No authentication key is defined.

Command Mode

Global Configuration mode

Examples

The following example defines the authentication key for SNTP.

switchxxxxxx(config)# sntp authentication-key 8 md5 ClkKey
switchxxxxxx(config)# sntp authentication-key 8 md5 ClkKey
switchxxxxxx(config)# sntp trusted-key 8
switchxxxxxx(config)# sntp authenticate

sntp broadcast client enable

To enable SNTP Broadcast clients, use the sntp broadcast client enable command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp broadcast client enable [both | ipv4 | ipv6]

no sntp broadcast client enable

Parameters

  • both—(Optional) Specifies the IPv4 and IPv6 SNTP Broadcast clients are enabled. If the parameter is not defined it is the default value.

  • ipv4—(Optional) Specifies the IPv4 SNTP Broadcast clients are enabled.

  • ipv6—(Optional) Specifies the IPv6 SNTP Broadcast clients are enabled.

Default Configuration

The SNTP Broadcast client is disabled.

Command Mode

Global Configuration mode

User Guidelines

Use the sntp broadcast client enable Interface Configuration mode command to enable the SNTP Broadcast client on a specific interface.

Example

The following example enables SNTP Broadcast clients.

switchxxxxxx(config)# sntp broadcast client enable

sntp client enable

To enable the SNTP Broadcast and Anycast client, use the sntp client enable command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp client enable interface-id

no sntp client enable interface-id

Parameters

  • interface-id—Specifies an interface ID, which can be one of the following types: Ethernet port, Port-channel or VLAN.

Default Configuration

The SNTP client is disabled.

Command Mode

Global Configuration mode

User Guidelines

Use the sntp client enable command to enable SNTP Broadcast and Anycast clients.

Example

The following example enables the SNTP Broadcast and Anycast clients on VLAN 100:

switchxxxxxx(config)# sntp client enable vlan 100

sntp client enable (interface)

To enable the SNTP Broadcast and Anycast client on an interface, use the sntp client enable command in Interface Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp client enable

no sntp client enable

Default Configuration

The SNTP client is disabled on an interface.

Command Mode

Interface Configuration mode

User Guidelines

This command enables the SNTP Broadcast and Anycast client on an interface. Use the no form of this command to disable the SNTP client.

Example

The following example enables the SNTP broadcast and anycast client on an interface.

switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# sntp client enable
switchxxxxxx(config-if)# exit

sntp server

To configure the device to use the SNTP to request and accept Network Time Protocol (NTP) traffic from a specified server (meaning to accept system time from an SNTP server), use the sntp server command in Global Configuration mode. To remove a server from the list of SNTP servers, use the no form of this command.

Syntax

sntp server {default | {{ip-address | hostname} [poll] [key keyid]}}

no sntp server [ip-address | hostname]

Parameters

  • default—Default defined SNTP servers.

  • ip-address—Specifies the server IP address. This can be an IPv4, IPv6 or IPv6z address.

  • hostname—Specifies the server hostname. Only translation to IPv4 addresses is supported. (Length: 1–158 characters. Maximum label length for each part of the hostname: 63 characters)

  • poll—(Optional) Enables polling.

  • key keyid—(Optional) Specifies the Authentication key to use when sending packets to this peer. (Range:1–4294967295)

Default Configuration

The following servers with polling and without authentication are defined:

  • time-a.timefreq.bldrdoc.gov

  • time-b.timefreq.bldrdoc.gov

  • time-c.timefreq.bldrdoc.gov

  • pool.ntp.org

  • time-pnp.cisco.com

Command Mode

Global Configuration mode

User Guidelines

Use the sntp server {ip-address | hostname} [poll] [key keyid] command to define a SNTP server. The switch supports up to 8 SNTP servers.

Use the sntp server default command to return to the default configuration.

Use the no sntp server ip-address | hostname command to remove one SNTP server.

Use the no sntp server to remove all SNTP servers.

Example

The following example configures the device to accept SNTP traffic from the server on 192.1.1.1 with polling.

switchxxxxxx(config)# sntp server 192.1.1.1 poll

sntp source-interface

To specify the source interface whose IPv4 address will be used as the source IPv4 address for communication with IPv4 SNTP servers, use the sntp source-interface command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp source-interface interface-id

no sntp source-interface

Parameters

  • interface-id—Specifies the source interface.

Default Configuration

The source IPv4 address is the IPv4 address defined on the outgoing interface and belonging to next hop IPv4 subnet.

Command Mode

Global Configuration mode

User Guidelines

If the source interface is the outgoing interface, the interface IP address belonging to next hop IPv4 subnet is applied.

If the source interface is not the outgoing interface, the minimal IPv4 address defined on the interface is applied.

If there is no available IPv4 source address, a SYSLOG message is issued when attempting to communicate with an IPv4 SNTP server.

OOB cannot be defined as a source interface.

Example

The following example configures the VLAN 10 as the source interface.

switchxxxxxx(config)# sntp source-interface vlan 10

sntp source-interface-ipv6

To specify the source interface whose IPv6 address will be used ad the Source IPv6 address for communication with IPv6 SNTP servers, use the sntp source-interface-ipv6 command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp source-interface-ipv6 interface-id

no sntp source-interface-ipv6

Parameters

  • interface-id—Specifies the source interface.

Default Configuration

The IPv6 source address is the IPv6 address defined of the outgoing interface and selected in accordance with RFC6724.

Command Mode

Global Configuration mode

User Guidelines

The outgoing interface is selected based on the SNTP server's IP address. If the source interface is the outgoing interface, the IPv6 address defined on the interfaces and selected in accordance with RFC 6724.

If the source interface is not the outgoing interface, the minimal IPv4 address defined on the interface and with the scope of the destination IPv6 address is applied.

If there is no available IPv6 source address, a SYSLOG message is issued when attempting to communicate with an IPv6 SNTP server.

Example

The following example configures the VLAN 10 as the source interface.

switchxxxxxx(config)# sntp source-interface-ipv6 vlan 10

sntp trusted-key

To define the trusted key, use the sntp trusted-key command in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

sntp trusted-key key-number

no sntp trusted-key key-number

Parameters

  • key-number—Specifies the key number of the authentication key to be trusted. (Range: 1–4294967295).

Default Configuration

No keys are trusted.

Command Mode

Global Configuration mode

User Guidelines

The trusted key is used for authentication of all servers not having personal keys assigned.

Examples

The following example authenticates key 8.

switchxxxxxx(config)# sntp trusted-key 8
switchxxxxxx(config)# sntp authentication-key 8 md5 ClkKey
switchxxxxxx(config)# sntp trusted-key 8
switchxxxxxx(config)# sntp authenticate

sntp unicast client enable

To enable the device to use Simple Network Time Protocol (SNTP) Unicast clients, use the sntp unicast client enable command in Global Configuration mode. To disable the SNTP Unicast clients, use the no form of this command.

Syntax

sntp unicast client enable

no sntp unicast client enable

Default Configuration

The SNTP unicast clients are enabled.

Command Mode

Global Configuration mode

User Guidelines

Use the sntp server Global Configuration mode command to define SNTP servers.

Example

The following example enables the device to use SNTP Unicast clients.

switchxxxxxx(config)# sntp unicast client enable

sntp unicast client poll

To enable polling for the SNTP Unicast clients, use the sntp unicast client poll command in Global Configuration mode. To disable the polling, use the no form of this command.

Syntax

sntp unicast client poll

no sntp unicast client poll

Default Configuration

Polling is enabled.

Command Mode

Global Configuration mode

User Guidelines

The polling interval is 1024 seconds.

Example

The following example enables polling for SNTP unicast clients.

switchxxxxxx(config)# sntp unicast client poll

show clock

To display the time and date from the system clock, use the show clock command in User EXEC mode.

Syntax

show clock [detail]

Parameters

  • detail—(Optional) Displays the time zone and summer time configuration.

Command Mode

User EXEC mode

User Guidelines

The default output of the command shows the current system date and time, information on the operational source of the system time and general clock related configurations.

The detailed output of the command shows additional information about time-zone and daylight savings configuration.

The possible values for operational system time source are:

  • RTC - Indicates that the system time was set from the Real Time Clock component. This happens if the system clock hasn’t been set by SNTP, by a user or by the browser.

  • User - If the system clock was last set manually by a user.

  • SNTP - if the system clock was last set by SNTP. In this case, the time since the last synchronization with the SNTP server is also displayed.

  • None - If the clock hasn’t been set by any method since the last reboot and the system does not have an RTC component.

Examples

Example 1 - The following example displays general system time and date information.

switchxxxxxx# show clock
 15:29:03 PDT(UTC-7) Jun 17 2019
Operational Time Source: SNTP (last synchronized 2 days, 18 hours, 29 minutes and 3 seconds ago)
Time from SNTP is enabled
Time from Browser is disabled

Example 2 - The following example displays the system time and date along with the time zone and daylight saving configuration.

switchxxxxxx# show clock detail
 15:22:55 SUN Apr 23 2019
Operational Time Source: User
Time from SNTP is disabled
Time from Browser is enabled
Time zone (DHCPv4 on VLAN1):
Acronym is RAIN
Offset is UTC+2
Time zone (Static):
Offset is UTC+0
Summertime (DHCPv4 on VLAN1):
Acronym is SUN
Recurring every year.
Begins at first Sunday of Apr at 02:00.
Ends at first Tuesday of Sep at 02:00.
Offset is 60 minutes.
Summertime (Static):
Acronym is GMT
Recurring every year.
Begins at first Sunday of Mar at 10:00.
Ends at first Sunday of Sep at 10:00.
Offset is 60 minutes.
DHCP timezone: Enabled

show sntp configuration

To display the SNTP configuration on the device, use the show sntp configuration command in Privileged EXEC mode.

Syntax

show sntp configuration

Command Mode

Privileged EXEC mode

Examples

The following example displays the device’s current SNTP configuration.

switchxxxxxx# show sntp configuration
SNTP port : 123
Polling interval: 1024 seconds
MD5 Authentication Keys
-----------------------------------
2   John123
3   Alice456
-----------------------------------
Authentication is not required for synchronization.
No trusted keys
Unicast Clients: enabled
Unicast Clients Polling: enabled
Server: 1.1.1.121
  Polling: disabled
  Encryption Key: disabled
Server: 3001:1:1::1
  Polling: enabled
  Encryption Key: disabled
Server: dns_server1.comapany.com
  Polling: enabled
  Encryption Key: disabled
Server: dns_server2.comapany.com
  Polling: enabled
  Encryption Key: disabled
Broadcast Clients: enabled for IPv4 and IPv6
Anycast Clients: disabled
No Broadcast Interfaces
Source IPv4 interface: vlan 1
Source IPv6 interface: vlan 10

show sntp status

To display the SNTP servers status, use the show sntp status command in Privileged EXEC mode.

Syntax

show sntp status

Command Mode

Privileged EXEC mode

Example

The following example displays the SNTP servers status:

switchxxxxxx# show sntp status
Clock is synchronized, stratum 4, reference is 176.1.1.8, unicast
Reference time is afe2525e.70597b34 (00:10:22.438 PDT Jul 5 1993)
Unicast servers:
Server: 176.1.1.8
  Source: DHCPv4 on VLAN 1
  Status: Up
  Last response: 19:58:22.289 PDT Feb 19 2015
  Last request: 19:58:21.555 PDT Feb 19 2015
  Stratum Level: 1
  Offset: 7.33mSec
  Delay: 117.79mSec
Server: dns_server.comapany.com
  Source:  static
  Status: Unknown
  Last response: 12:17.17.987 PDT Feb 19 2015
  Last request: 12:58:21.555 PDT Feb 19 2015
  Stratum Level: 1
  Offset: 8.98mSec
  Delay: 189.19mSec
Server: 3001:1:1::1
  Source: DHCPv6 on VLAN 2
  Status: Unknown
  Last response:
  Last request:
  Offset: mSec
  Delay: mSec
Server: dns1.company.com
  Source: DHCPv6 on VLAN 20
  Status: Unknown
  Last response:
  Last request:
  Offset: mSec
  Delay: mSec
Anycast servers:
Server: 176.1.11.8
  Interface:  VLAN 112
  Status: Up
  Last response: 9:53:21.789 PDT Feb 19 2005
  Last request: 9:53:21.689 PDT Feb 19 2005
  Stratum Level: 10
  Offset: 9.98mSec
  Delay: 289.19mSec
Broadcast servers:
Server: 3001:1::12
  Interface:  VLAN 101
  Last response: 9:53:21.789 PDT Feb 19 2005
  Last reqeust: 9:53:21.689 PDT Feb 19 2005
  Stratum Level: 255

show time-range

To display the time range configuration, use the show time-range command in User EXEC mode.

Syntax

show time-range time-range-name

Parameters

  • time-range-name—Specifies the name of an existing time range.

Command Mode

User EXEC mode

Example

switchxxxxxx# show time-range
http-allowed
--------------
absolute start 12:00 1 Jan 2005 end  12:00 31 Dec 2005
periodic Monday 12:00 to Wednesday 12:00

time-range

To define time ranges and to enter to Time-range Configuration mode, use the time-range command to define time ranges and to enter to Time-range Configuration mode in Global Configuration mode. To restore the default configuration, use the no form of this command.

Syntax

time-range time-range-name

no time-range time-range-name

Parameters

  • time-range-name—Specifies the name for the time range. (Range: 1–32 characters).

Default Configuration

No time range is defined

Command Mode

Global Configuration mode

User Guidelines

After entering to Time-range Configuration mode with this command, use the absolute and periodic commands to actually configure the time-range. Multiple periodic commands are allowed in a time range. Only one absolute command is allowed.

If a time-range command has both absolute and periodic values specified, then the periodic items are evaluated only after the absolute start time is reached, and are not evaluated again after the absolute end time is reached.

All time specifications are interpreted as local time.

To ensure that the time range entries take effect at the desired times, the software clock should be set by the user or by SNTP. If the software clock is not set by the user or by SNTP, the time range is not activated.

Example

switchxxxxxx(config)# time-range http-allowed
switchxxxxxx(config-time-range)# periodic mon 12:00 to wed 12:00