- Table of Contents
-
- H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
- 00-1Cover
- 01-CLI Commands
- 02-Login Commands
- 03-Configuration File Management Commands
- 04-VLAN Commands
- 05-Extended VLAN Application Commands
- 06-IP Address-IP Performance-IPX Commands
- 07-GVRP Commands
- 08-QinQ Commands
- 09-Port Basic Configuration Commands
- 10-Link Aggregation Commands
- 11-Port Isolation Commands
- 12-Port Binding Commands
- 13-DLDP Commands
- 14-MAC Address Table Commands
- 15-MSTP Commands
- 16-Routing Protocol Commands
- 17-Multicast Commands
- 18-802.1x Commands
- 19-AAA-RADIUS-HWTACACS-EAD Commands
- 20-Traffic Accounting Commands
- 21-VRRP-HA Commands
- 22-ARP Commands
- 23-DHCP Commands
- 24-ACL Commands
- 25-QoS Commands
- 26-Mirroring Commands
- 27-Cluster Commands
- 28-PoE Commands
- 29-UDP-Helper Commands
- 30-SNMP-RMON Commands
- 31-NTP Commands
- 32-SSH Terminal Service Commands
- 33-File System Management Commands
- 34-FTP and TFTP Commands
- 35-Information Center Commands
- 36-DNS Commands
- 37-System Maintenance and Debugging Commands
- 38-HWPing Commands
- 39-RRPP Commands
- 40-NAT-Netstream-Policy Routing Commands
- 41-Telnet Protection Commands
- 42-Hardware-Dependent Software Configuration Commands
- 43-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
03-Configuration File Management Commands | 86 KB |
Table of Contents
Chapter 1 Configuration File Management Commands
1.1 Configuration File Management Commands
1.1.1 display current-configuration
1.1.2 display saved-configuration
1.1.5 reset saved-configuration
1.1.7 startup saved-configuration
Chapter 1 Configuration File Management Commands
1.1 Configuration File Management Commands
1.1.1 display current-configuration
Syntax
display current-configuration [ [ controller | interface [ interface-type [ interface-number ] ] | configuration [ configuration ] ] [ | { begin | exclude | include } text ] ] | [ vlan [ vlan-id ] ]
View
Any view
Parameters
controller: Views the configuration information of controllers.
interface: Views the configuration information of interfaces.
interface-type: Type of an interface, which may be Aux, Ethernet, GigabitEthernet, Loopback, NULL, Vlan-interface, or M-Ethernet.
interface-number: Number of an interface.
configuration configuration: Views the configuration information excluding the port information. The value of the configuration argument is the keyword of the configuration on the switch, such as:
l acl-adv: Views the configuration information of advanced ACLs.
l ospf: Views the configuration information of the OSPF protocol.
l system: Views the name of the host.
l timerange: Views the configuration information of the time range.
The optional configuration keywords are available only after the related functions are enabled on the switch.
vlan [ vlan-id ]: Views the VLAN configuration in the system. If the vlan-id argument is not specified, the configuration information of all VLANs in the system is displayed; if the vlan-id argument is specified, the configuration information of the specified VLAN is displayed.
|: Uses the regular expression to filter the configuration information to be output.
begin: Displays the configuration beginning with the specified characters.
exclude: Displays the configuration excluding the specified characters.
include: Displays the configuration including the specified characters.
text: Text included in a configuration item, expressed in a regular expression. .
Table 1-1 Description on the special characters in the regular expression
Character |
Meaning |
Description |
_ |
Underline, which can represent the following characters: (^|$|[,{}]), space, starting character, and ending character. |
If the first character of a regular expression is not “_”, the number of underline characters in a regular expression is only limited by the length of a command line. If the first character of a regular expression is “_”, there can be up to four other successive underline characters following it. If the underline characters are not successive, only the first underline character group is matched. The subsequent underline groups are ignored. |
( |
Left parenthesis, push-in-stack signal |
You are not recommended to use this character in a regular expression. |
. |
Period, a wildcard which can represent any single character, including spaces. |
— |
* |
Asterisk. It means that the preceding sub-expression can be matched for zero or multiple times. |
zo* matches “z” and “zoo”. |
+ |
Plus sign. It means that the preceding sub-expression can be matched for once or multiple times. |
zo+ matches "zo" and “zoo”, but not "z". |
Description
Use the display current-configuration command to display the currently running configuration parameters of the switch.
Running configuration parameters adopting the default values will not be displayed.
If you want to verify the configurations after finishing a set of configurations, you can use the display current-configuration command to display the running parameters. Although you have configured some parameters, they are not displayed if the related functions are not effective.
When there is plenty of configuration information, you can use a regular expression to filter the output information.
Related commands: save, reset saved-configuration, display saved-configuration.
Examples
# View the running configuration parameters of the switch.
<H3C> display current-configuration
#
sysname H3C
#
radius scheme system
primary authentication 127.0.0.1 1645
primary accounting 127.0.0.1 1646
user-name-format without-domain
domain system
radius-scheme system
access-limit disable
state active
idle-cut disable
domain default enable system
#
local-server nas-ip 127.0.0.1 key hello
#
router id 2.2.2.2
#
stp timer hello 500
#
vlan 1
#
vlan 2
#
interface Vlan-interface1
#
interface Vlan-interface2
ip address 10.1.1.2 255.255.255.0
#
interface Aux0/0/0
#
interface M-Ethernet0/0/0
#
interface Ethernet3/0/1
duplex full
speed 1000
port access vlan 2
#
interface Ethernet3/0/2
#
interface Ethernet3/0/3
#
interface Ethernet3/0/4
#
interface Ethernet4/0/1
port access vlan 2
#
interface Ethernet4/0/2
#
interface Ethernet4/0/3
#
interface Ethernet4/0/4
#
interface NULL0
#
ospf
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
user-interface aux 0
user-interface vty 0 4
#
return
# View configuration information of VLAN 1.
<H3C> display current-configuration vlan 1
#
vlan 1
description TestVlan1
igmp-snooping enable
#
return
# View the lines containing the character string “10*” in the configuration information. The “*” indicates that the “0” before it can appear zero times or multiple consecutive times.
<H3C> display current-configuration | include 10*
primary authentication 127.0.0.1 1645
primary accounting 127.0.0.1 1646
local-server nas-ip 127.0.0.1 key hello
vlan 1
interface Vlan-interface1
ip address 10.1.1.2 255.255.255.0
interface Ethernet3/0/1
speed 1000
interface Ethernet4/0/1
network 10.1.1.0 0.0.0.255
# View configuration information beginning with “user”.
<H3C> display current-configuration | include ^user
user-interface aux 0
user-interface vty 0 4
# View the configuration information except the port configuration.
<H3C> display current-configuration configuration
#
sysname H3C
#
radius scheme system
primary authentication 127.0.0.1 1645
primary accounting 127.0.0.1 1646
user-name-format without-domain
domain system
radius-scheme system
access-limit disable
state active
idle-cut disable
domain default enable system
#
local-server nas-ip 127.0.0.1 key hello
#
router id 2.2.2.2
#
stp timer hello 500
#
ospf
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
user-interface aux 0
user-interface vty 0 4
#
return
1.1.2 display saved-configuration
Syntax
display saved-configuration
View
Any view
Parameters
None
Description
Use the display saved-configuration command to view the configuration files saved in the Flash memory of the Ethernet switch.
If the Ethernet switch works abnormally after startup, execute the display saved-configuration command to view the startup configuration of the Ethernet switch.
Related commands: save, reset saved-configuration, display current-configuration.
Examples
# Display configuration files in Flash memory of the Ethernet switch.
<H3C> display saved-configuration
#
sysname H3C
#
radius scheme system
primary authentication 127.0.0.1 1645
primary accounting 127.0.0.1 1646
user-name-format without-domain
domain system
radius-scheme system
access-limit disable
state active
idle-cut disable
domain default enable system
#
local-server nas-ip 127.0.0.1 key hello
#
router id 2.2.2.2
#
stp timer hello 500
#
vlan 1
#
vlan 2
#
interface Vlan-interface1
#
interface Vlan-interface2
ip address 10.1.1.2 255.255.255.0
#
interface Aux0/0/0
#
interface M-Ethernet0/0/0
#
interface Ethernet3/0/1
duplex full
speed 1000
port access vlan 2
#
interface Ethernet3/0/2
#
interface Ethernet3/0/3
#
interface Ethernet3/0/4
#
interface Ethernet4/0/1
port access vlan 2
#
interface Ethernet4/0/2
#
interface Ethernet4/0/3
#
interface Ethernet4/0/4
#
interface NULL0
#
ospf
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
user-interface aux 0
user-interface vty 0 4
#
return
The configurations listed above are global configuration, port configuration and user interface configuration successively.
1.1.3 display this
Syntax
display this
View
Any view
Parameters
None
Description
Use the display this command to display the running configuration in the current view. If you want to verify the configurations after finishing a set of configurations in a view, you can use the display this command to view the running parameters.
Running parameters adopting the default values are not displayed. Some parameters are not displayed either if their relevant functions are not effective even if these parameters have been configured.
The configuration in the corresponding interface view is displayed when this command is executed in an interface view; the configuration in the corresponding protocol view is displayed when this command is executed in a protocol view; and all the configurations in the corresponding protocol view are displayed when this command is executed in a protocol sub-view.
Related commands: save, reset, saved-configuration, display current-configuration, display saved-configuration.
Examples
# Display the running configuration parameters in system view.
System View: return to User View with Ctrl+Z.
[H3C] display this
#
sysname H3C
#
super password level 3 simple 1234567890
#
ftp server enable
#
domain default enable system
#
dhcp-server 2 ip 1.1.1.1
#
undo info-center enable
#
router id 1.1.1.1
#
temperature-limit 0 10 70
temperature-limit 1 10 70
#
poe power max-value 2400
#
loopback-detection interval-time 40
#
attack-protection
bridgemactocpu enable
#
multicast routing-enable
#
return
1.1.4 display startup
Syntax
display startup
View
Any view
Parameters
None
Description
Use the display startup command to display the configuration file names used for the current and the next start-ups.
Related commands: startup saved-configuration.
Examples
# Display the configuration file names used for the current and the next start-ups.
MainBoard:
Startup saved-configuration file: flash:/config.cfg
Next startup saved-configuration file: flash:/config.cfg
1.1.5 reset saved-configuration
Syntax
reset saved-configuration
View
User view
Parameters
None
Description
Use the reset saved-configuration command to remove configuration files from the Flash memory of the Ethernet switch.
Perform this command cautiously. You are recommended to consult technical support personnel first.
Generally, this command is used in the following situations:
l After software upgrade, configuration files in Flash memory may not match the new software in version. Perform the reset saved-configuration command to remove the old configuration files.
l If a used Ethernet switch is applied to the new circumstance and the original configuration files cannot meet the new requirements, the Ethernet switch must be configured again. Remove the original configuration files for reconfiguration.
If no configuration file exists in the Flash memory when an Ethernet switch is powered on and initialized, it will be initialized through the default configuration files.
Related commands: save, display current-configuration, display saved-configuration.
Examples
# Remove the configuration files from the Flash memory of the Ethernet switch.
<H3C> reset saved-configuration
The saved configuration will be erased.
Are you sure?[Y/N]y
Configuration in flash memory is being cleared.
Please wait ...
....
Configuration in flash memory is cleared.
1.1.6 save
Syntax
save [ file-name | safely ]
View
User view
Parameters
file-name: File name with the extension name .cfg, a character string of 5 to 56 characters.
safely: Saves the configuration files to the Flash memory in the safely mode.
Description
Use the save command to save the current configuration files to the Flash memory.
After finishing a group of configurations and achieving expected functions, you should remember to save the current configuration files in the Flash memory.
The configuration files can be saved in one of the following two ways:
l Fast saving: in this mode, the configuration files are saved fast. However, if restart or power-off occurs in the saving procedure, the configuration files will be lost.
l Safely saving: in this mode, the configuration files are saved slowly. However, even if restart or power-off occurs in the saving procedure, the configuration files still exist.
If the save command is executed without the safely keyword, the configuration files are saved in the fast saving mode. If the save command is executed with the safely keyword, the configuration files are saved in the safely saving mode.
You are recommended to adopt the fast saving mode in the conditions of stable power and adopt the safely saving mode in the conditions of unstable power or remote maintenance.
Related commands: reset saved-configuration, display current-configuration, display saved-configuration.
Examples
# Save the current configuration files to the Flash memory.
<H3C> save
The configuration will be written to the device.
Are you sure?[Y/N]y
Now saving current configuration to the device.
Saving configuration flash:/config.cfg. Please wait...
...........
Configuration is saved to flash memory successfully.
1.1.7 startup saved-configuration
Syntax
startup saved-configuration { cfgfile | device-name }
View
User view
Parameters
cfgfile: Name of a configuration file. It is a string of 1 to 64 characters.
device-name: Name of the current storage device.
Description
Use the startup saved-configuration command to configure the configuration file to be used in the next startup.
The configuration file uses .cfg as its extension name and is saved in the root directory of the Flash.
Related commands: display startup.
Examples
# Configure the configuration file to be used in the next startup as config.cfg.
<H3C> startup saved-configuration config.cfg