Description
Use display current-configuration to display the current configuration of the device.
A parameter is not displayed if it adopts the default setting. If the validated parameter is changed, although you have configured it, the validated parameter is displayed. For example, IP address 11.11.11.11 24 has been configured on a Loopback interface. If you execute display current-configuration, IP address 11.11.11.11 255.255.255.255 is displayed, meaning the validated subnet mask is 32 bits.
Related commands: display saved-configuration, reset saved-configuration, and save.
Syntax
display current-configuration [ [ configuration [ configuration ] | controller | interface [ interface-type ] [ interface-number ] | exclude modules ] [ by-linenum ] [ | { begin | exclude | include } regular-expression ] ]
View
Any viewDefault level
2: System levelParameters
configuration [ configuration ]: Displays non-interface configuration. If the argument is not provided, all
the non-interface configuration is displayed; if parameters are used, display the specified information. For example:
isis: Displays the ISIS configuration.
isp: Displays the ISP configuration.
post-system: Displays the post-system configuration.
radius-template: Displays the RADIUS scheme configuration.
system: Displays the system configuration.
user-interface: Displays the user interface configuration.
controller: Displays the controller configuration (For example, CE1/PRI interface. For more information, see Interface Configuration Guide).
interface [ interface-type ] [ interface-number ]: Displays the interface configuration, where interface-type
exclude modules:Excludes the configuration of the specified modules. The modules argument can be acl, acl6, or both separated by a space.
acl: Excludes the IPv4 ACL configuration.
acl6: Excludes the IPv6 ACL configuration.
by-linenum: Displays the number of each line.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line matching the specified regular expression and all following lines.
exclude: Displays all lines not matching the specified regular expression.
include: Displays all lines matching the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the configuration of all controllers on the device. <Sysname> display current-configuration controller # controller E1 6/0 # controller E1 6/1 pri-set # controller E1 6/2 pri-set # controller E1 6/3 using e1 # return
# Display the configuration from the line containing “user-interface” to the last line in the current configuration.
<Sysname> display current-configuration | begin user-interface user-interface con 0
user-interface aux 0 user-interface vty 0 4 authentication-mode none user privilege level 3 #
return
# Display the current SNMP configuration on the device (the output information depends on the current configuration).
<Sysname> display current-configuration | include snmp snmp-agent
snmp-agent local-engineid 800063A203000FE240A1A6 snmp-agent community read public
snmp-agent sys-info version all undo snmp-agent trap enable ospf 100
display saved-configuration
Description
Use display saved-configuration to display the contents of the configuration file saved for the next startup
of the device.
During device management and maintenance, you can use this command to check whether important configurations are saved to the configuration file to be used at the next startup of the device.
This command displays the main configuration file to be used at the next system startup.
If the system is not specified with a configuration file to the used at the next startup or the specified configuration file does not exist, display saved-configuration displays the default configuration file of the device. If the default configuration file does not exist, the system prompts “The config file does not exist!”. Related commands: display current-configuration, reset saved-configuration, and save.
Syntax
display saved-configuration [ by-linenum ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
by-linenum: Identifies each line of displayed information with a line number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line matching the specified regular expression and all following lines.
exclude: Displays all lines not matching the specified regular expression.
include: Displays all lines matching the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the configuration file saved for the next startup of the device. <Sysname> display saved-configuration
#
version 5.20, Test 5310 #
sysname Sysname #
domain default enable system #
telnet server enable #
# vlan 1 # vlan 999 # domain system access-limit disable state active idle-cut disable self-service-url disable # interface NULL0 # ---- More ----
The configurations are displayed in the order of global, port, and user interface. The More prompt indicates there are more lines the screen can display. Pressing Enter displays the next line; pressing Space displays the next screen; pressing Ctrl+C or any other key exits the display.
# Display the contents of the configuration file saved for the next startup of the device with a number identifying each line.
<Sysname> display saved-configuration by-linenum 1: #
2: version 5.20, Test 5310 3: #
4: sysname Sysname 5: #
6: domain default enable system 7: #
8: telnet server enable 9: # 10: multicast routing-enable 11: # 12: vlan 1 13: # 14: vlan 999 15: # 16: domain system 17: access-limit disable 18: state active 19: idle-cut disable 20: self-service-url disable 21: # 22: interface NULL0 23: # ---- More ----
The More prompt indicates there are more lines the screen can display. Pressing Enter displays the next line; pressing Space displays the next screen; pressing Ctrl+C or any other key exits the display.