The How Running-Config Cisco command
Command: show running-config
Function: Displays the running configuration of a Cisco device.
Usage:
show running-config [detail] [security-level [disable | level {0 | 1 | 2}]]
Parameters:
detail: Displays additional details about the configuration, including comments and descriptions.
security-level: Specifies the level of security to use when displaying the configuration. The default level is 0, which displays the configuration without any sensitive information.
disable: Disables security filtering and displays all configuration information, including sensitive information.
level 0: Displays the configuration without any sensitive information.
level 1: Displays the configuration with some sensitive information, such as passwords, encrypted in a reversible format.
level 2: Displays the configuration with all sensitive information encrypted in an irreversible format.
Supported Devices: All Cisco devices that run the Cisco IOS operating system, including routers, switches, and firewalls.
Additional Information:
The show running-config command is used to troubleshoot configuration issues and to verify the current configuration of a device.
The command output can be saved to a file using the redirect command. For example, to save the running configuration to a file named "running-config.txt," you would use the following command:
show running-config > running-config.txt
The show running-config command can also be used to compare the running configuration of two devices. To do this, use the compare command. For example, to compare the running configuration of two routers named "router1" and "router2," you would use the following command:
show running-config compare router1 router2 | more
The show running-config command is a powerful tool that can be used to manage and troubleshoot Cisco devices.
how running-config Usage Examples
The 'show running-config' command in Cisco is used to display the currently active running configuration of a device. Here are some examples of how you can use this command:
Display the Full Running Configuration:
show running-config
This command shows the entire running configuration of the device, including all active commands, settings, and interfaces.
Display Specific Configuration Sections:
show running-config section <section-name>
Replace
<section-name>
with the name of the configuration section you want to view. For example, to see the VLAN configuration, you would use:show running-config section vlan
Display Configuration for a Specific Interface:
show running-config interface <interface-name>
Replace
<interface-name>
with the name of the interface whose configuration you want to view. This shows the configuration specifically applied to that interface.Display Configuration Changes Since Last Commit:
show running-config changes
This command displays the changes made to the running configuration since the last time it was saved or committed. This is useful for reviewing changes before committing them to the startup configuration.
Search for Specific Configuration Elements:
show running-config | include <search-string>
Replace
<search-string>
with the text you want to search for in the running configuration. This command allows you to quickly find specific configuration elements within the entire running config.Display Running Configuration with Context:
show running-config context <context-name>
Replace
<context-name>
with the name of the configuration context you want to view. This command is useful in environments where multiple configuration contexts are used.Compare Running Configuration with Startup Configuration:
show running-config diff startup-config
This command displays the differences between the running configuration and the startup configuration. This allows you to identify changes made to the running configuration that have not yet been saved to the startup configuration.
Display Only Specific Changes:
show running-config diff startup-config | include <search-string>
Combine the diff command with the include command to filter the output and only show changes that contain the specified search string.