Time Range Commands

Use these M4500 CLI commands to create time ranges with absolute and periodic entries for time-based ACLs, and display time ranges.

show time-range

Use this command to display a time range and all the absolute/periodic time entries that are defined for the time range. Use the name parameter to identify a specific time range to display. When name is not specified, all the time ranges defined in the system are displayed.

Default None
Format show time-range [<name>]
Mode Privileged Exec

Display Message

Parameter Definition
Admin mode The administrative mode of time ranges for ACLs.
Current number of all Time Ranges Number of time ranges configured on the switch.
Maximum number of all Time Ranges The maximum number of time ranges can be configured.
Time Range Name Name of the time range.
Time Range Status Status of the time range (active/inactive).
Absolute Start Time Start time and day for absolute time entry.
Absolute End Time End time and day for absolute time entry.
Periodic Entries Number of periodic entries in a time-range.
Periodic Start Time Start time and day for periodic entry.
Periodic End Time End time and day for periodic entry.

time-range

Use this command to enable or disable the time range Admin mode.

Default Enabled
Format time-range
Mode Global Config

no time-range

This command sets the time-range Admin mode to disable.

Format no time-range
Mode Global Config

time-range <name>

Use this command to create a time range identified by name, consisting of one absolute time entry and/or one or more periodic time entries. The name parameter is a case-sensitive, alphanumeric string from 1 to 31

characters that uniquely identifies the time range. An alpha-numeric string is defined as consisting of only alphabetic, numeric, dash, underscore, or space characters.

If a time range by this name already exists, this command enters Time-Range config mode to allow updating the time range entries

Default None
Format time-range <name>
Mode Global Config
Parameter Definition
<name> time range name.

no time-range <name>

This command deletes a time-range identified by name.

Format no time-range <name>
Mode Global Config

absolute

Use this command to add an absolute time entry to a time range. Only one absolute time entry is allowed per time-range. The time parameter is based on the currently configured time zone.

The [start time date] parameters indicate the time and date at which the configuration that referenced the time range starts going into effect. The time is expressed in a 24-hour clock, in the form of hours:minutes. For example, 8:00 is 8:00 am and 20:00 is 8:00 pm.

The date is expressed in the format day month year. If no start time and date are specified, the configuration statement is in effect immediately.

The [end time date] parameters indicate the time and date at which the configuration that referenced the time range is no longer in effect. The end time and date must be after the start time and date. If no end time and date are specified, the configuration statement is in effect indefinitely.

Default None
Format absolute {start <hh:mm> <1-31> <month> <1970-2035> [end <hh:mm> <1-31> <month> <1970-2035>] | end <hh:mm> <1-31> <month> <1970-2035>}
Mode Time-Range Config

no absolute

This command deletes the absolute time entry in the time range.

Format no absolute
Mode Time-Range Config

periodic

Use this command to add a periodic time entry to a time range. The time parameter is based off of the currently configured time zone.

The first occurrence of the days-of-the-week argument is the starting day(s) from which the configuration that referenced the time range starts going into effect. The second occurrence is the ending day or days from which the configuration that referenced the time range is no longer in effect. If the end days-of-the-week are the same as the start, they can be omitted

This argument can be any single day or combinations of days: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. Other possible values are:

  • daily — Monday through Sunday
  • weekdays — Monday through Friday
  • weekend — Saturday and Sunday

If the ending days of the week are the same as the starting days of the week, they can be omitted. The first occurrence of the time argument is the starting hours:minutes which the configuration that referenced the time range starts going into effect. The second occurrence is the ending hours:minutes at which the configuration that referenced the time range is no longer in effect.

The hours:minutes are expressed in a 24-hour clock. For example, 8:00 is 8:00 am and 20:00 is 8:00 pm.

You can decide how often this perodic entry becomes active. If the value for <frequency> is set to 0, the option is disabled and a periodic entry becomes active only once.

Default None
Format periodic {{days-of-the-week time} to {[days-of-the-week] time} | <frequency>}
Mode Time-Range Config

no periodic

This command deletes a periodic time entry from a time range.

Format no periodic {{days-of-the-week time} to {[days-of-the-week] time} | <frequency>}
Mode Time-Range Config