- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 06-Device management configuration | 136.77 KB |
Enabling displaying the copyright statement
Configuring the exception handling method
Rebooting the device immediately at the CLI
Scheduling a job in the non-modular approach
Scheduling a job in the modular approach·
Scheduled job configuration example
Setting the port status detection timer
Clearing unused 16-bit interface indexes
Verifying and diagnosing transceiver modules
Diagnosing transceiver modules
Displaying and maintaining device management
Device management includes monitoring the operating status of devices and configuring their running parameters.
The configuration tasks in this document are order independent. You can perform these tasks in any order.
Configuring the device name
A device name identifies a device in a network and works as the user view prompt at the CLI. For example, if the device name is Sysname, the user view prompt is <Sysname>.
To configure the device name:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Configure the device name. |
sysname sysname |
By default, the device name is H3C. |
Changing the system time
You must synchronize your device with a trusted time source by using NTP or changing the system time before you run it on the network. Network management depends on an accurate system time setting, because the timestamps of system messages and logs use the system time. For NTP configuration, see Network Management and Monitoring Configuration Guide.
In a small-sized network, you can manually set the system time of each device.
Configuration guidelines
You can change the system time by configuring the relative time, time zone, and daylight saving time. The configuration result depends on their configuration order (see Table 1). In the first column of this table, 1 represents the clock datetime command, 2 represents the clock timezone command, and 3 represents the clock summer-time command. To verify the system time setting, use the display clock command. This table assumes that the original system time is 2005/1/1 1:00:00.
Table 1 System time configuration results
|
Command |
Effective system time |
Configuration example |
System time |
|
1 |
date-time |
01:00:00 UTC Mon 01/01/2007. |
|
|
2 |
Original system time ± zone-offset |
02:00:00 zone-time Sat 01/01/2005. |
|
|
1, 2 |
date-time ± zone-offset |
03:00:00 zone-time Fri 02/02/2007. |
|
|
2, 1 |
date-time |
03:00:00 zone-time Sat 03/03/2007. |
|
|
3 |
The original system time outside the daylight saving time range: The system time does not change until it falls into the daylight saving time range. |
01:00:00 UTC Sat 01/01/2005. |
|
|
The original system time in the daylight saving time range: The system time increases by summer-offset. |
03:00:00 ss Sat 01/01/2005. If the original system time plus summer-offset is beyond the daylight saving time range, the original system time does not change. After you disable the daylight saving setting, the system time automatically decreases by summer-offset. |
||
|
1, 3 |
date-time outside the daylight saving time range: date-time |
01:00:00 UTC Mon 01/01/2007. |
|
|
date-time in the daylight saving time range: date-time + summer-offset |
10:00:00 ss Mon 01/01/2007. If the date-time plus summer-offset is outside the daylight saving time range, the system time equals date-time. After you disable the daylight saving setting, the system time automatically decreases by summer-offset. |
||
|
3, 1 (date-time outside the daylight saving time range) |
date-time |
01:00:00 UTC Tue 01/01/2008. |
|
|
3, 1 (date-time in the daylight saving time range) |
date-time – summer-offset outside the daylight saving time range: date-time – summer-offset |
23:30:00 UTC Sun 12/31/2006. |
|
|
date-time – summer-offset in the daylight saving time range: date-time |
03:00:00 ss Mon 01/01/2007. |
||
|
2, 3 or 3, 2 |
Original system clock ± zone-offset outside the daylight saving time range: Original system clock ± zone-offset |
02:00:00 zone-time Sat 01/01/2005. |
|
|
Original system clock ± zone-offset outside the daylight saving time range: Original system clock ± zone-offset + summer-offset |
System clock configured: 04:00:00 ss Sat 01/01/2005. |
||
|
1, 2, 3 or 1, 3, 2 |
date-time ± zone-offset outside the daylight saving time range: date-time ± zone-offset |
02:00:00 zone-time Mon 01/01/2007. |
|
|
date-time ± zone-offset outside the daylight saving time range: date-time ± zone-offset + summer-offset |
04:00:00 ss Mon 01/01/2007. |
||
|
2, 3, 1 or 3, 2, 1 |
date-time outside the daylight saving time range: date-time |
01:00:00 zone-time Mon 01/01/2007. |
|
|
date-time in the daylight saving time range, but date-time – summer-offset outside the summer-time range: date-time – summer-offset |
23:30:00 zone-time Mon 12/31/2007. |
||
|
Both date-time and date-time – summer-offset in the daylight saving time range: date-time |
03:00:00 ss Tue 01/01/2008. |
Configuration procedure
To change the system time:
|
Step |
Command |
Remarks |
|
1. Set the system time and date. |
clock datetime time date |
Optional. Available in user view. |
|
2. Enter system view. |
system-view |
N/A |
|
3. Set the time zone. |
clock timezone zone-name { add | minus } zone-offset |
Optional. Coordinated UTC time zone by default. |
|
4. Set a daylight saving time scheme. |
· Set a non-recurring scheme: ·
Set a recurring scheme: |
Optional. Use either command. By default, daylight saving time is disabled, and the UTC time zone applies. |
Enabling displaying the copyright statement
The device by default displays the copyright statement when a Telnet or SSH user logs in, or when an OAP user quits user view. You can disable or enable the function as needed. The following is a sample copyright statement:
******************************************************************************
* Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
*******************************************************************
To enable displaying the copyright statement:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Enable displaying the copyright statement. |
copyright-info enable |
Enabled by default. |
Configuring banners
Banners are messages that the system displays during user login.
The system supports the following banners:
· Legal banner—Appears after the copyright or license statement. To continue login, the user must enter Y or press Enter. To quit the process, the user must enter N. Y and N are case-insensitive.
· Message of the Day (MOTD) banner—Appears after the legal banner and before the login banner.
· Login banner—Appears only when password or scheme authentication has been configured.
· Incoming banner—Appears for Modem users.
· Shell banner—Appears for non-Modem users.
Banner message input modes
You can configure a banner in one of the following ways:
· Single-line input
Input the entire banner in the same line as the command. The start and end delimiters for the banner must be the same but can be any visible character. The input text, including the command keywords and the delimiters cannot exceed 510 characters. In this mode, do not press Enter before you input the end delimiter. For example, you can configure the shell banner "Have a nice day." as follows:
<System> system-view
[System] header shell %Have a nice day.%
· Multiple-line input
Input message text in multiple lines. In this approach, the message text can be up to 2000 characters. Use one of the following methods to implement multi-line input mode:
? Method 1—Press Enter after the last command keyword. At the system prompt, enter the banner message and end with the delimiter character %. For example, you can configure the banner "Have a nice day. Please input the password." as follows:
<System> system-view
[System] header shell
Please input banner content, and quit with the character '%'.
Have a nice day.
Please input the password.%
? Method 2—After you type the last command keyword, type any single character as the start delimiter for the banner and press Enter. At the system prompt, type the banner and end the last line with a delimiter that is the same as the start delimiter. For example, you can configure the banner "Have a nice day. Please input the password." as follows:
<System> system-view
[System] header shell A
Please input banner content, and quit with the character 'A'.
Have a nice day.
Please input the password.A
? Method 3—After you type the last keyword, type the start delimiter and part of the banner and press Enter. At the system prompt, enter the rest of the banner and end the last line with a delimiter that is the same as the start delimiter. For example, you can configure the banner "Have a nice day. Please input the password." as follows:
<System> system-view
[System] header shell AHave a nice day.
Please input banner content, and quit with the character 'A'.
Please input the password.A
Configuration procedure
To configure banners:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Configure the incoming banner. |
header incoming text |
Optional. |
|
3. Configure the login banner. |
header login text |
Optional. |
|
4. Configure the legal banner. |
header legal text |
Optional. |
|
5. Configure the shell banner. |
header shell text |
Optional. |
|
6. Configure the MOTD banner. |
header motd text |
Optional. |
Configuring the exception handling method
You can configure the device to handle system exceptions by using one of the following methods:
· reboot—The device reboots the failed device to recover from the error condition.
· maintain—The device stays in the error condition so you can collect complete data, including error messages, for diagnosis. In this approach, you must manually reboot the device.
To configure exception handling method:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Configure the exception handling method for the system. |
system-failure { maintain | reboot } |
By default, the system uses the reboot method when an exception occurs. |
Rebooting the device
|
|
CAUTION: · Device reboot can interrupt network services. · To avoid data loss, use the save command to save the current configuration before a reboot. · Use the display startup and display boot-loader commands to verify that you have correctly set the startup configuration file and the main system software image file. If the main system software image file has been corrupted or does not exist, the device cannot reboot. You must re-specify a main system software image file, or power off the device and then power it on so the system can reboot with the backup system software image file. |
You can reboot the device in one of the following ways to recover from an error condition:
· Reboot the device immediately at the CLI.
· At the CLI, schedule a reboot to occur at a specific time and date or after a delay.
· Power off and then power on the device. This method might cause data loss, and is the least-preferred method.
Reboot at the CLI enables easy remote device maintenance.
Rebooting the device immediately at the CLI
Use the following command in user view.
|
Task |
Command |
|
Reboot the device immediately. |
reboot |
Scheduling a device reboot
The device supports only one device reboot schedule. If you configure the schedule reboot delay command multiple times, the last configuration takes effect. The schedule reboot at command and the schedule reboot delay command overwrite each other, and whichever is configured last takes effect.
For data security, if you are performing file operations at the reboot time, the system does not reboot.
To schedule a device reboot, execute one of the following commands in user view:
|
Task |
Command |
Remarks |
|
Schedule a reboot. |
·
Schedule a reboot to occur at a specific time and
date: ·
Schedule a reboot to occur after a delay: |
Use either command. The scheduled reboot function is disabled by default. Changing any clock setting can cancel the reboot schedule. |
Scheduling jobs
You can schedule a job to automatically run a command or a set of commands without administrative interference. The commands in a job are polled every minute. When the scheduled time for a command is reached, the job automatically executes the command. If a confirmation is required while the command is running, the system automatically enters Y or Yes. If characters are required, the system automatically enters a default character string or an empty character string when no default character string is available.
Job configuration approaches
You can configure jobs in a non-modular or modular approach. Use the non-modular approach for a one-time command execution and use non-modular approach for complex maintenance work.
Table 2 A comparison of non-modular and modular approaches
|
Comparison item |
||
|
Configuration method |
Configure all elements in one command |
Separate job, view, and time settings |
|
Can multiple jobs be configured? |
No |
Yes |
|
Can a job have multiple commands? |
No If you use the schedule job command multiple times, the most recent configuration takes effect. |
Yes You can use the time command in job view to configure commands to be executed at different time points. |
|
Supported views |
User view and system view. In the schedule job command, shell represents user view, and system represents system view. |
All views. In the time command, monitor represents user view. |
|
Supported commands |
Commands in user view and system view |
Commands in all views |
|
Can a job be repeatedly executed? |
No |
Yes |
|
Can a job be saved? |
No |
Yes |
Configuration guidelines
· To have a job successfully run a command, check that the specified view and command are valid. The system does not verify their validity.
· The configuration interface, view, and user status that you have before job execution restores even if the job changed the user interface (for example, telnet, ftp, and ssh2), the view (for example, system-view and quit), or the user status (for example, super).
· The jobs run in the background without displaying any messages except log, trap and debugging messages.
· To make sure scheduled jobs can be executed at the expected time, you must configure an accurate time setting or configure NTP for the device. For NTP configuration, see Network Management and Monitoring Configuration Guide.
· In the modular approach:
? Every job can have only one view and up to 10 commands. If you specify multiple views, the one specified last takes effect.
? Enter a view name in its complete form. Most commonly used view names include monitor for user view, system for system view, GigabitEthernetx/x/x for Ethernet interface view, and Vlan-interfacex for VLAN interface view.
? The time ID (time-id) must be unique in a job. If two time and command bindings have the same time ID, the one configured last takes effect.
Scheduling a job in the non-modular approach
To schedule a job, execute one of the following commands in user view:
|
Task |
Command |
Remarks |
|
Schedule a job. |
·
Schedule a job to run a command at a specific
time: · Schedule a job to run a command after a delay: |
Use either command. NOTE: · If you execute the schedule job command multiple times, the most recent configuration takes effect. · Changing any clock setting can cancel the job set by using the schedule job command. |
Scheduling a job in the modular approach
To configure a scheduled job:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Create a job and enter job view. |
job job-name |
N/A |
|
3. Specify the view in which the commands in the job run. |
view view-name |
You can specify only one view for a job. The job executes all commands in the specified view. |
|
4. Add commands to the job. |
· Configure a command to run at a specific time and date: · Configure a command to run at a specific time: · Configure a command to run after a delay: |
Use any of the commands. NOTE: Changing a clock setting does not affect the schedule set by using the time at or time delay command. |
Scheduled job configuration example
Network requirements
Configure scheduled jobs on the device to enable interfaces GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 at 8:00 and disabled them at 18:00 on working days every week, to control the access of the PCs connected to these interfaces.
Figure 1 Network diagram

Configuration procedure
# Enter system view.
<Sysname> system-view
# Create a job named pc1, and enter its view.
[Sysname] job pc1
# Configure the job to be executed in the view of GigabitEthernet 1/0/1.
[Sysname-job-pc1] view gigabitethernet1/0/1
# Configure the device to enable GigabitEthernet 1/0/1 at 8:00 on working days every week.
[Sysname-job-pc1] time 1 repeating at 8:00 week-day mon tue wed thu fri command undo shutdown
# Configure the device to shut down GigabitEthernet 1/0/1 at 18:00 on working days every week.
[Sysname-job-pc1] time 2 repeating at 18:00 week-day mon tue wed thu fri command shutdown
[Sysname-job-pc1] quit
# Create a job named pc2, and enter its view.
[Sysname] job pc2
# Configure the job to be executed in the view of GigabitEthernet 1/0/2.
[Sysname-job-pc2] view gigabitethernet1/0/2
# Configure the device to enable GigabitEthernet 1/0/2 at 8:00 on working days every week.
[Sysname-job-pc2] time 1 repeating at 8:00 week-day mon tue wed thu fri command undo shutdown
# Configure the device to shut down GigabitEthernet 1/0/2 at 18:00 on working days every week.
[Sysname-job-pc2] time 2 repeating at 18:00 week-day mon tue wed thu fri command shutdown
[Sysname-job-pc2] quit
# Create a job named pc3, and enter its view.
[Sysname] job pc3
# Configure the job to be executed in the view of GigabitEthernet 1/0/3.
[Sysname-job-pc3] view gigabitethernet1/0/3
# Configure the device to enable GigabitEthernet 1/0/3 at 8:00 on working days every week.
[Sysname-job-pc3] time 1 repeating at 8:00 week-day mon tue wed thu fri command undo shutdown
# Configure the device to shut down GigabitEthernet 1/0/3 at 18:00 on working days every week.
[Sysname-job-pc3] time 2 repeating at 18:00 week-day mon tue wed thu fri command shutdown
[Sysname-job-pc3] quit
# Display information about scheduled jobs.
[Sysname] display job
Job name: pc1
Specified view: GigabitEthernet1/0/1
Time 1: Execute command undo shutdown at 08:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Time 2: Execute command shutdown at 18:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Job name: pc2
Specified view: GigabitEthernet1/0/2
Time 1: Execute command undo shutdown at 08:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Time 2: Execute command shutdown at 18:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Job name: pc3
Specified view: GigabitEthernet1/0/3
Time 1: Execute command undo shutdown at 08:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Time 2: Execute command shutdown at 18:00 Mondays Tuesdays Wednesdays Thursdays Fridays
Setting the port status detection timer
Some protocols might shut down ports under specific circumstances. For example, MSTP shuts down a BPDU guard–enabled port when the port receives a BPDU. In this case, you can set the port status detection timer. If the port is still down when the detection timer expires, the protocol module automatically cancels the shutdown action and restores the port to its original physical status.
To set the port status detection timer:
|
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Set the port status detection timer. |
shutdown-interval time |
By default, the port status detection timer is 30 seconds. |
Clearing unused 16-bit interface indexes
The device must maintain persistent 16-bit interface indexes and keep one interface index match one interface name for network management. After deleting a logical interface, the device retains its 16-bit interface index so the same index can be assigned to the interface at interface re-creation.
To avoid index depletion causing interface creation failures, you can clear all 16-bit indexes that have been assigned but not in use. The operation does not affect the interface indexes of the interfaces that have been created but the indexes assigned to re-recreated interfaces might change.
A confirmation is required when you execute this command. The command will not run if you fail to make a confirmation within 30 seconds or enter N to cancel the operation.
To clear unused 16-bit interface indexes, execute the following command in user view:
|
Task |
Command |
|
Clear unused 16-bit interface indexes. |
reset unused porttag |
Verifying and diagnosing transceiver modules
This section describes how to verify and diagnose transceiver modules.
Verifying transceiver modules
You can verify the genuineness of a transceiver module in the following ways:
· Display the key parameters of a transceiver module, including its transceiver type, connector type, central wavelength of the transmit laser, transfer distance and vendor name.
· Display its electronic label. The electronic label is a profile of the transceiver module and contains the permanent configuration including the serial number, manufacturing date, and vendor name. The data is written to the storage component during debugging or testing.
To verify transceiver modules, execute the following commands in any view:
|
Task |
Command |
|
Display key parameters of the transceiver modules. |
display transceiver interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
|
Display transceiver modules' electrical label information. |
display transceiver manuinfo interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
Diagnosing transceiver modules
The device provides the alarm function and digital diagnosis function for transceiver modules. When a transceiver module fails or works inappropriately, you can examine the alarms present on the transceiver module to identify the fault source or examine the key parameters monitored by the digital diagnosis function, including the temperature, voltage, laser bias current, TX power, and RX power.
To diagnose transceiver modules, execute the following commands in any view:
|
Step |
Command |
|
1. Display alarms present on transceiver modules. |
display transceiver alarm interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
|
2. Display the measured values of the digital diagnosis parameters for transceiver modules. |
display transceiver diagnosis interface [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
Displaying and maintaining device management
For diagnosis or troubleshooting, you can use separate display commands to collect running status data module by module, or use the display diagnostic-information command to bulk collect running data for multiple modules.
|
Task |
Command |
Remarks |
|
Display the system time and date. |
display clock [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the software and hardware copyright statements. |
display copyright [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display or save running status data for multiple feature modules. |
display diagnostic-information [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display alarm information. |
display alarm [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display CPU usage statistics. |
display cpu-usage [ slot slot-number [ cpu cpu-number ] ] [ | { begin | exclude | include } regular-expression ] display cpu-usage entry-number [ offset ] [ verbose ] [ slot slot-number ] [ cpu cpu-number ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display historical CPU usage statistics in charts. |
display cpu-usage history [ task task-id ] [ slot slot-number [ cpu cpu-number ] ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display device information. |
display device [ verbose ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the electronic label data for the device. |
display device manuinfo [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the configuration of jobs configured by using the job command. |
display job [ job-name ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display memory usage statistics. |
display memory [ slot slot-number [ cpu cpu-number ] ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the mode of the last reboot. |
display reboot-type [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the configuration of the job configured by using the schedule job command. |
display schedule job [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the reboot schedule. |
display schedule reboot [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the exception handling method. |
display system-failure [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display system version information. |
display version [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Display the system software update history. |
display version-update-record [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
|
Clear the system software update history. |
reset version-update-record |
Available in user view. |
