Syntax
display current-configuration
[ [ controller | interface [ interface-type [ interface-number
] ] | configuration [ configuration ] ] [ | { begin
| exclude | include } text ] ] | [ vlan [ vlan-id
] ]
View
Any view
Parameter
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 command: save, reset
saved-configuration, and display saved-configuration.
Example
# 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
Syntax
display saved-configuration
View
Any view
Parameter
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 command: save, reset
saved-configuration, and display current-configuration.
Example
# 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
Parameter
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 command: save, reset,
saved-configuration, display current-configuration, and display
saved-configuration.
Example
# Display the running configuration
parameters in system view.
<H3C> 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
Syntax
display startup
View
Any view
Parameter
None
Description
Use the display startup command to
display the configuration file names used for the current and the next
start-ups.
Related command: startup
saved-configuration.
Example
# Display the configuration file names used
for the current and the next start-ups.
<H3C>
display startup
MainBoard:
Startup saved-configuration
file: flash:/config.cfg
Next startup saved-configuration
file: flash:/config.cfg
Syntax
reset saved-configuration
View
User view
Parameter
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 command: save, display
current-configuration, and display saved-configuration.
Example
# 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.
Syntax
save [ file-name
| safely ]
View
User view
Parameter
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 command: reset
saved-configuration, display current-configuration, and display
saved-configuration.
Example
# 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.
Syntax
startup saved-configuration
{ cfgfile | device-name }
View
User view
Parameter
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 command: display startup.
Example
# Configure the configuration file to be
used in the next startup as config.cfg.
<H3C>
startup saved-configuration config.cfg