11-ACL and QoS Command References

HomeSupportReference GuidesCommand ReferencesH3C MSR610[810][830][1000S][2600][3600] Routers Command References(V7)-R6749-6W10011-ACL and QoS Command References
05-Time range commands
Title Size Download
05-Time range commands 71.51 KB

Time range commands

 

display time-range

Use display time-range to display time range configuration and status.

Syntax

display time-range { time-range-name | all }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

time-range-name: Specifies a time range name, a case-insensitive string of 1 to 63 characters.

all: Displays the configuration and status of all existing time ranges.

Examples

# Display the configuration and status of time range t4.

<Sysname> display time-range t4

Current time is 17:12:34 11/23/2010 Tuesday

 

Time-range : t4 (Inactive)

 10:00 to 12:00 Mon

 14:00 to 16:00 Wed

 from 00:00:00 1/1/2011 to 00:00:00 1/1/2012

 from 00:00:00 6/1/2011 to 00:00:00 7/1/2011

# Display the configuration and status of all existing time ranges.

<Sysname> display time-range all

Current time is 17:23:41 6/28/2021 Monday

 

Time-range: aa (Inactive)

 Yundi Alias:AA Tenant: aa

 Monthly 12:00 1st to 13:00 11th

 from 00:00:00 6/28/2021 to 00:00:00 31/12/2021

 

Time-range: ee (Inactive)

 Yundi Alias:BBB Tenant: bb

 Description:aaa

 

Time-range: bb (Inactive)

 Yundi Alias:BB Tenant: bb

 Weekly 13:00 Mon to 13:11 Fri

 from 00:00:00 6/28/2021 to 00:00:00 31/12/2021

Table 1 Command output

Field

Description

Current time

Current system time.

Time-range

Configuration and status of the time range, including its name, status (active or inactive), and start time and end time.

Alias

Alias of the time range.

 

time-range

Use time-range to create or edit a time range.

Use undo time-range to delete a time range or a statement in the time range.

Syntax

time-range time-range-name { { monthly | weekly } start-day start-time to end-day end-time [ from time1 date1 ] [ to time2 date2 ] | start-time to end-time days [ from time1 date1 ] [ to time2 date2 ] | from time1 date1 [ to time2 date2 ] | to time2 date2 }

undo time-range time-range-name [ { monthly | weekly } start-day start-time to end-day end-time [ from time1 date1 ] [ to time2 date2 ] | start-time to end-time days [ from time1 date1 ] [ to time2 date2 ] | from time1 date1 [ to time2 date2 ] | to time2 date2 ]

Default

No time ranges exist.

Views

System view

Predefined user roles

network-admin

Parameters

time-range-name: Specifies a time range name. The name is a case-insensitive string of 1 to 63 characters. To avoid confusion, it cannot be all.

monthly start-day start-time to end-day end-time: Specifies a monthly time range statement. The start-day argument is the start date, and the end-day argument is the end date. The value ranges for the start-day and end-day arguments are both 1 to 31. The end date cannot be smaller than the start date. Both start-time and end-time are in hh:mm or hh:mm:ss format (24-hour clock). The value ranges for start-time and end-time are both 00:00:00 to 24:00:00. If the start date and end date are the same day, the end time must be greater than the start time.

weekly start-day start-time to end-day end-time: Specifies a weekly time range statement.

·     The start-day argument is the start day, and the end-day argument is the end day.

¡     A digit in the range of 0 to 6, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.

¡     A day of a week in abbreviated words: Sun, Mon, Tue, Wed, Thu, Fri, and Sat.

·     The value ranges for the start-day and end-day arguments are both 1 to 31. The end date cannot be smaller than the start date. Both start-time and end-time are in hh:mm or hh:mm:ss format (24-hour clock). The value ranges for start-time and end-time are both 00:00:00 to 24:00:00. If the start date and end date are the same day, the end time must be greater than the start time.

start-time to end-time: Specifies a daily time range statement. Both start-time and end-time are in hh:mm or hh:mm:ss format (24-hour clock). The value is in the range of 00:00:00 to 23:59:59 for the start time, and 00:00:00 to 24:00:00 for the end time. The end time must be greater than the start time.

days: Specifies the day or days of the week (in words or digits) on which the periodic statement is valid. If you specify multiple values, separate each value with a space, and make sure they do not overlap. These values can take one of the following forms:

·     A digit in the range of 0 to 6, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.

·     A day of a week in abbreviated words: Sun, Mon, Tue, Wed, Thu, Fri, and Sat.

·     working-day for Monday through Friday.

·     off-day for Saturday and Sunday.

·     daily for the whole week.

from time1 date1: Specifies the start time and date of an absolute statement. The time1 argument specifies the time of the day in hh:mm or hh:mm:ss format (24-hour clock). Its value is in the range of 00:00:00 to 23:59:59. The date1 argument specifies a date in MM/DD/YYYY or YYYY/MM/DD format, where MM is the month of the year in the range of 1 to 12, DD is the day of the month with the range varying by MM, and YYYY is the year in the calendar in the range of 1970 to 2100. If you do not specify this option, the start time is 01/01/1970 00:00:00 AM, the earliest time available in the system.

to time2 date2: Specifies the end time and date of the absolute time statement. The time2 argument has the same format as the time1 argument, but its value is in the range of 00:00:00 to 24:00:00. The date2 argument has the same format and value range as the date1 argument. The end time must be greater than the start time. If you do not specify this option, the end time is 12/31/2100 24:00:00 PM, the maximum time available in the system.

Usage guidelines

If an existing time range name is provided, this command adds a statement to the time range.

You can create multiple statements in a time range. Each time statement can take one of the following forms:

·     Periodic statement in the monthly start-day start-time to end-day end-time format. The periodic statement recurs on a monthly basis.

·     Periodic statement in the weekly start-day start-time to end-day end-time format. A periodic statement recurs periodically on a weekly basis.

·     Periodic statement in the start-time to end-time days format. A periodic statement recurs on a daily basis.

·     Absolute statement in the from time1 date1 to time2 date2 format. An absolute statement does not recur.

·     Compound statement in the start-time to end-time days from time1 date1 to time2 date2 format. A compound statement recurs on a day or days of the week only within the specified period. For example, to create a time range that is active from 08:00 to 12:00 on Monday between January 1, 2015, 00:00 and December 31, 2015, 23:59, use the time-range test 08:00 to 12:00 Mon from 00:00 01/01/2015 to 23:59 12/31/2015 command.

You can create a maximum of 1024 time ranges (including empty time ranges of the time-range tenant command), each with a maximum of 32 periodic statements and 12 absolute statements. The active period of a time range is calculated as follows:

1.     Combining all periodic statements.

2.     Combining all absolute statements.

3.     Taking the intersection of the two statement sets as the active period of the time range.

Examples

# Create a periodic time range t1, setting it to be active between 8:00 to 18:00 during working days.

<Sysname> system-view

[Sysname] time-range t1 08:00 to 18:00 working-day

# Create an absolute time range t2, setting it to be active in the whole year of 2011.

<Sysname> system-view

[Sysname] time-range t2 from 00:00 1/1/2011 to 24:00 12/31/2011

# Create a compound time range t3, setting it to be active from 08:00 to 12:00 on Saturdays and Sundays of the year 2011.

<Sysname> system-view

[Sysname] time-range t3 08:00 to 12:00 off-day from 00:00 1/1/2011 to 24:00 12/31/2011

# Create a compound time range t4, setting it to be active from 10:00 to 12:00 on Mondays and from 14:00 to 16:00 on Wednesdays in January and June of the year 2011.

<Sysname> system-view

[Sysname] time-range t4 10:00 to 12:00 1 from 00:00 1/1/2011 to 24:00 1/31/2011

[Sysname] time-range t4 14:00 to 16:00 3 from 00:00 6/1/2011 to 24:00 6/30/2011

# Create an absolute time range t5, setting it to be active between 8:00 to 18:00 on January 1st, 2018.

<Sysname> system-view

[Sysname] time-range t5 from 08:00:00 1/1/2018 to 18:00:00 1/1/2018

# Create a time range t6, setting it to be active from 08:00 on Mondays to 18:00 on Friday between 08:00 on January 1, 2021 and 18:00 on December 1, 2021.

<Sysname> system-view

[Sysname] time-range t6 weekly 1 08:00 to 5 18:00 from 08:00 1/1/2021 to 18:00 1/12/2021

Related commands

display time-range

time-range description

Use time-range description to configure a description for a time range.

Use undo time-range description to delete the description of a time range.

Syntax

time-range time-range-name description text

undo time-range time-range-name description

Default

A time range does not have a description.

Views

System view

Predefined user roles

network-admin

Parameters

time-range-name: Specifies a time range by its name, a case-insensitive string of 1 to 63 characters. To avoid confusion, it cannot be all.

text: Specifies a description for the time range, a case-insensitive string of 1 to 127 characters.

Examples

# Configure abc as the description of time range t1.

<Sysname> system-view

[Sysname] time-range t1 description abc

Related commands

display time-range

time-range yundi

Use time-range yundi to specify a tenant for a time range.

Use undo time-range yundi to restore the default.

Syntax

time-range time-range-name yundi alias alias-name tenant tenant-id

undo time-range time-range-name yundi

Default

A time range does not belong to any tenant. The security policy of a tenant is always in effect.

Views

System view

Predefined user roles

network-admin

Parameters

time-range-name: Specifies a time range by its name, a case-insensitive string of 1 to 63 characters. To avoid confusion, it cannot be all.

alias-name: Specifies a user alias, a case-sensitive string of 1 to 63 characters.

tenant-id: Specifies a tenant by its ID, a case-sensitive string of 1 to 63 characters.

Usage guidelines

In a yundi scenario, a large number of tenants exist, and the controller assigns each tenant a unique tenant ID and deploys tenant IDs and associated time ranges to firewalls through NETCONF. A firewall generates this command based on the deployed information to make the security policy of the tenant take effect only during the time range. If the time range associated with a tenant does not exist, the system creates a new time range.

Tenant IDs are typically assigned by the controller. As a best practice, do not execute this command on the device.

A time range can be associated with only one tenant.

A tenant can be associated with multiple time ranges. The time range that takes effect is the intersection of all the time ranges.

Examples

# Specify tenant 3abcx for time range t1.

<Sysname> system-view

[Sysname] time-range t1 yundi alias abc tenant 3abcx

Related commands

display time-range

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网