No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

AR500, AR510, and AR530 V200R007 Commands Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
First Login Commands

First Login Commands

clock datetime

Function

The clock datetime command sets the current date and time on the industrial switch router.

NOTE:

The AR510 series does not support this command.

Format

clock datetime HH:MM:SS YYYY-MM-DD

Parameters

Parameter Description Value
HH:MM:SS Specifies the current time on the industrial switch router. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. SS specifies the second, which is an integer ranging from 0 to 59.
YYYY-MM-DD Specifies the current date (year, month, and day) on the industrial switch router. YYYY specifies the year, which is an integer ranging from 2000 to 2037. MM specifies the month, which is an integer ranging from 1 to 12. DD specifies the day, which is an integer ranging from 1 to 31.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

In the scenario where accurate absolute time is required, the current date and time must be set on the industrial switch router.

Prerequisite

The time zone and daylight saving time have been configured using the clock timezone and clock daylight-saving-time commands. If the time zone and daylight saving time are not configured, the clock datetime command sets a UTC time.

Precautions

  • The specified time must be in 24-hour format. If you do not specify MM and SS, their values are 0. You must enter at least one digit to specify HH. For example, when you enter 0, the time is 00:00:00.

  • The specified year must be a four-digit number and the specified month and day can be a one-digit number. For example, when you enter 2012-9-1, the time is 2012-09-01.

  • If the device is configured to restart at a specified time and if the system time is changed to be more than 10 minutes later than the specified restart time, the scheduled restart function will be disabled.

Example

# Set the current time and date of the system to 0:0:0 2012-01-01.

<Huawei> clock datetime 0:0:0 2012-01-01
Related Topics

clock daylight-saving-time

Function

The clock daylight-saving-time command sets the name, start time, and end time of the daylight saving time (DST).

The undo clock daylight-saving-time command cancels the DST settings.

By default, DST is not used.

Format

clock daylight-saving-time time-zone-name one-year start-time start-date end-time end-date offset

clock daylight-saving-time time-zone-name repeating start-time { { fifth | first | second | third | fourth | last } weekday month | start-date1 } end-time { { first | second | third | fourth | last } weekday month | end-date1 } offset [ start-year [ end-year ] ]

undo clock daylight-saving-time

Parameters

Parameter Description Value
time-zone-name Specifies the name of the DST zone. The value is a string of 1 to 32 characters.
one-year Specifies absolute DST. -
repeating Specifies periodic DST. -
start-time Specifies the DST start time.

The start time is in 24-hour format HH:MM. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. If MM is not specified, DST starts on the hour. You must enter at least one digit to specify HH. For example, when you enter 0, the start time is 00:00.

start-date Specifies the DST start date. The start date is in the format YYYY-MM-DD. YYYY specifies the year, which is an integer ranging from 2000 to 2037, MM specifies the month, which is an integer ranging from 1 to 12, and DD specifies the day, which is an integer ranging from 1 to 31.
end-time Specifies the DST end time.

The end time is in 24-hour format HH:MM. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. If MM is not specified, DST starts on the hour. You must enter at least one digit to specify HH. For example, when you enter 0, the start time is 00:00.

end-date Specifies the DST end date. The end date is in the format YYYY-MM-DD. YYYY specifies the year, which is an integer ranging from 2000 to 2037, MM specifies the month, which is an integer ranging from 1 to 12, and DD specifies the day, which is an integer ranging from 1 to 31.
fifth Specifies the fifth workday in a month. -
first Specifies the first workday in a month. -
second Specifies the second workday in a month. -
third Specifies the third workday in a month. -
fourth indicates the fourth workday in a month. -
last Specifies the last workday in a month. -
weekday Specifies a day of the week. The value is Mon, Tue, Wed, Thu, Fri, Sat, or Sun.
month Specifies a month. The value is Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.
start-date1 Specifies the DST start date. The start date is in the format MM-DD. MM specifies the month, which is an integer ranging from 1 to 12, and DD specifies the day, which is an integer ranging from 1 to 31.
end-date1 Specifies the DST end date. The end date is in the format MM-DD. MM specifies the month, which is an integer ranging from 1 to 12, and DD specifies the day, which is an integer ranging from 1 to 31.
offset Specifies the DST offset. The offset is in 24-hour format HH:MM. HH specifies the hour, which is an integer ranging from 0 to 23. MM specifies the minute, which is an integer ranging from 0 to 59. If MM is not specified, the offset is the specified hours. You must enter at least one digit to specify HH.
start-year Specifies the start year. The start year is in the format YYYY and ranges from 2000 to 2037.
end-year Specifies the end year. The end year is in the format YYYY and ranges from 2000 to 2037.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

DST, also referred to as summer time, is a convention intended to save resources. In high latitude areas, sunrise time is earlier in summer than in winter. To reduce use of incandescent lighting in the evenings and save energy, clocks are adjusted forward one hour.

Users can customize the DST zone according to their countries' or regions' convention. In addition, users can set how far ahead clocks are adjusted forward, usually an hour. With DST enabled, when it is time to start DST, the system time is adjusted according to the user-specified DST. When it is time to end DST, the system time automatically returns to the original time.

Configuration Impact

To configure DST, note the following:
  • The time in logs and debugging information uses the local time adjusted based on the time zone and the configured DST.
  • The time in the output of the display commands uses the local time adjusted based on the time zone and the configured DST.
To remove configurations for DST, note the following:
  • If DST has already taken effect when you remove the configurations, the device will adjust its clock by subtracting the value of the offset parameter from the current time.
  • If DST has not taken effect, removing the configurations will not affect the system time.

Precautions

  • The DST is configured in the summer. The DST duration ranges from one day to one year.

  • You can configure the start time and end time for periodic DST in one of the following modes: date+date, week+week, date+week, and week+date.

Example

# Set periodic DST.
<Huawei> clock daylight-saving-time bj repeating 0 first sun jan 0 first sun apr 2 2009 2009
# Set periodic DST by day.
<Huawei> clock daylight-saving-time bj repeating 12:11 1-1 1:0 3-4 1
# Set absolute DST.
<Huawei> clock daylight-saving-time bj one-year 12:11 2010-10-2 1:00 2010-11-4 1
Related Topics

clock timezone

Function

The clock timezone command sets the local time zone.

The undo clock timezone command deletes the local time zone.

If you do not specify the time zone name, the system uses Default Zone Name.

Format

clock timezone time-zone-name { add | minus } offset

undo clock timezone

Parameters

Parameter Description Value
time-zone-name Specifies the time zone name. The name is a string of 1 to 32 case-sensitive characters without spaces.
add Specifies the offset from the UTC for the time zone specified by time-zone-name. That is, the sum of the default UTC time zone and offset is equal to the time zone specified by time-zone-name. -
minus Specifies the offset from the UTC for the time zone specified by time-zone-name. That is, the remainder obtained by subtracting offset from the default UTC time zone is equal to the time zone specified by time-zone-name. -
offset Specifies the offset from the UTC.
Format: HH:MM:SS
  • HH specifies the hour.
    • If the local time is earlier than the UTC, the value is an integer ranging from 0 to 14.
    • If the local time is later than the UTC, the value is an integer ranging from 0 to 12.
  • MM and SS specify the minute and second respectively, and both range from 0 to 59.
  • When HH is set to the maximum value, the MM and SS values must be 0.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The system clock is the time indicated by the system timestamp. Because the rules governing local time differ in different regions, the system clock can be configured to comply with the rules of any given region.

System clock = UTC + Time zone offset + DST offset

To ensure normal communication between devices, set an accurate system clock. You can run the clock timezone and clock daylight-saving-time commands to set the time zone and DST offsets.

Precautions

  • The specified time must be in 24-hour format. If you do not specify MM and SS, their values are 0. You must enter at least one digit to specify HH. For example, when you enter 0, the time is 00:00:00.

  • After configuring the local time zone, run the display clock command to view the configuration. The time in logs and diagnostic information uses the local time adjusted based on the time zone and DST.

Example

# Set the local time zone name for Beijing China to BJ.

If the default UTC is London time 2012-12-01 00:00:00, Beijing time is London time plus 08:00 because the offset from UTC is 8 hours.

<Huawei> clock datetime 0:0:0 2012-12-01
<Huawei> clock timezone BJ add 08:00:00

display clock

Function

The display clock command displays the current date and clock setting.

Format

display clock

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can run the display clock command to view the system date and clock setting and adjust the setting if necessary.

Precautions

The system clock is set using the clock datetime, clock timezone, and clock daylight-saving-time commands.

  • If the three commands are not used, the original system clock is displayed after you run the display clock command.
  • You can use any combination of the three commands to configure the system time. Table 2-12 lists the formats of the configured time.
The table assumes that the original system time is 08:00:00 on January 1, 2010.
  • 1: indicates that the clock datetime command is used, in which the current time and date is date-time.
  • 2: indicates that the clock timezone command is used, in which the time zone parameter is set and the time offset is zone-offset.
  • 3: indicates that the clock daylight-saving-time command is used, in which the DST parameters are set and the time offset is offset.
  • [1]: indicates that the clock datetime command is optional.
Table 2-12  System clock setting examples

Action

Configured System Time

Example

1

date-time

Command: clock datetime 8:0:0 2011-11-12

Configured system time:

2011-11-12 08:00:02
Saturday
Time Zone(Default Zone Name) : UTC+00:00

2

Original system time ± zone-offset

Command: clock timezone BJ add 8

Configured system time:

2010-01-01 16:00:27
Friday
Time Zone(BJ) : UTC+08:00

1, 2

date-time ± zone-offset

Commands: clock datetime 8:0:0 2011-11-12 and clock timezone BJ add 8

Configured system time:

2011-11-12 16:00:17
Saturday
Time Zone(BJ) : UTC+08:00

[1], 2, 1

date-time

Commands: clock timezone NJ add 8 and clock datetime 9:0:0 2011-11-12

Configured system time:

2011-11-12 09:00:03
Saturday
Time Zone(NJ) : UTC+08:00

3

If the original system time is not in the DST segment, the original system time is displayed.

Command: clock daylight-saving-time BJ one-year 6:0 2011-8-1 6:0 2011-10-01 1

Configured system time:

2010-01-01 08:00:51
Friday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00

If the original system time is in the DST segment, the configured system time is the original system time plus offset.

Command: clock daylight-saving-time BJ one-year 6:0 2010-1-1 6:0 2010-9-1 2

Configured system time:

2010-01-01 10:00:08 DST
Friday
Time Zone(BJ) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2010
         End year    : 2010
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00 

1, 3

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock datetime 9:0:0 2011-11-12 and clock daylight-saving-time BJ one-year 6:0 2012-8-1 6:0 2012-10-01 1

Configured system time:

2011-11-12 09:00:26
Saturday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00 

If date-time is in the DST segment, the configured system time is date-time+offset.

Commands: clock datetime 9:0:0 2011-11-12 and clock daylight-saving-time BJ one-year 9:0 2011-11-12 6:0 2011-12-01 2

Configured system time:

2011-11-12 11:02:21 DST
Saturday
Time Zone(BJ) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 11-12 09:00:00
         End time    : 12-01 06:00:00
         Saving time : 02:00:00  

[1], 3, 1

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 6:0 2012-8-1 6:0 2012-10-01 1 and clock datetime 9:0 2011-11-12

Configured system time:

2011-11-12 09:00:02
Saturday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00 

If date-time is in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 1:0 2011-1-1 1:0 2011-9-1 2 and clock datetime 3:0 2011-1-1

Configured system time:

2011-01-01 03:00:19 DST
Saturday
Time Zone(BJ) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

2, 3 or 3, 2

If the result of original system time ± zone-offset is not in the DST segment, the configured system time is equal to the original system time ± zone-offset.

Commands: clock timezone BJ add 8 and clock daylight-saving-time BJ one-year 6:0 2011-1-1 6:0 2011-9-1 2

Configured system time:

2010-01-01 16:01:29
Friday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If the result of original system time ± zone-offset is in the DST segment, the configured system time is equal to the original system time ± zone-offset ± offset.

Commands: clock daylight-saving-time BJ one-year 1:0 2010-1-1 1:0 2010-9-1 2 and clock timezone BJ add 8

Configured system time:

2010-01-01 18:05:31 DST
Friday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2010
         End year    : 2010
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

1, 2, 3 or 1, 3, 2

If the value of date-time ± zone-offset is not in the DST segment, the configured system time is equal to date-time ± zone-offset.

Commands: clock datetime 8:0:0 2011-11-12, clock timezone BJ add 8, and clock daylight-saving-time BJ one-year 6:0 2012-1-1 6:0 2012-9-1 2

Configured system time:

2011-11-12 08:01:40
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If the value of date-time ± zone-offset is in the DST segment, the configured system time is equal to date-time ± zone-offset + offset.

Commands: clock datetime 8:0:0 2011-1-1, clock daylight-saving-time BJ one-year 6:0 2011-1-1 6:0 2011-9-1 2 and clock timezone BJ add 8

Configured system time:

2011-01-01 10:00:43 DST
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

[1], 2, 3, 1 or [1], 3, 2, 1

If date-time is not in the DST segment, the configured system time is date-time.

Commands: clock daylight-saving-time BJ one-year 6:0 2012-1-1 6:0 2012-9-1 2, clock timezone BJ add 8, and clock datetime 8:0:0 2011-11-12

Configured system time:

2011-11-12 08:00:03
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 01-01 06:00:00
         End time    : 09-01 06:00:00
         Saving time : 02:00:00

If date-time is in the DST segment, the configured system time is date-time.

Commands: clock timezone BJ add 8, clock daylight-saving-time BJ one-year 1:0 2011-1-1 1:0 2011-9-1 2, and clock datetime 3:0:0 2011-1-1

Configured system time:

2011-01-01 03:00:03 DST
Saturday
Time Zone(BJ) : UTC+08:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2011
         End year    : 2011
         Start time  : 01-01 01:00:00
         End time    : 09-01 01:00:00
         Saving time : 02:00:00

Example

# Display the current system date and time.

<Huawei> display clock
2012-05-15 20:34:53
Tuesday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
         Name        : BJ
         Repeat mode : one-year
         Start year  : 2012
         End year    : 2012
         Start time  : 08-01 06:00:00
         End time    : 10-01 06:00:00
         Saving time : 01:00:00 
Table 2-13  Description of the display clock command output

Item

Description

Time Zone

Time zone.

Daylight saving time

DST.

Name

DST name.

Repeat mode

DST mode.
  • one-year: absolute DST
  • repeating: periodic DST

Start year

Year from which DST takes effect.

End year

Year when DST becomes ineffective.

Start time

Time when DST takes effect.

End time

Time when DST becomes ineffective.

Saving time

Storage time.

sysname

Function

The sysname command sets the device host name.

The undo sysname command restores the default device host name.

By default, the device host name is Huawei.

Format

sysname host-name

undo sysname

Parameters

Parameter Description Value
host-name Specifies the host name. The value is a string of 1 to 246 case-sensitive characters with spaces, "?" not supported.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Changing the host name affects the command interface prompt. For example, if the host name is Huawei, the user interface prompt is <Huawei>.

Example

# Set the host name to HuaweiA.

<Huawei> system-view
[Huawei] sysname HuaweiA
[HuaweiA]
Related Topics
Translation
Download
Updated: 2019-05-29

Document ID: EDOC1000097293

Views: 50636

Downloads: 102

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next