show running-config
Displays the current active configuration loaded in DRAM, showing every configured command that differs from the factory default.
Definition: show running-config is a Cisco IOS privileged exec command. Displays the current active configuration in DRAM, showing all non-default settings.
Overview
The 'show running-config' command is one of the most fundamental and frequently used commands in Cisco IOS. It displays the current active configuration that is loaded in DRAM (Dynamic Random Access Memory) and is being used by the router or switch to make forwarding decisions. This configuration includes all non-default settings that have been applied via the CLI, such as interface IP addresses, routing protocols, access control lists, VLANs, and more.
The command is essential for network engineers to verify the current operational state of a device, audit changes, and troubleshoot issues. It is typically the first command used when connecting to a device to understand its current setup. Unlike 'show startup-config', which displays the configuration saved in NVRAM that will be loaded on next reboot, 'show running-config' shows what is actually running now.
This distinction is critical: if changes have been made but not saved, the running-config and startup-config will differ. The command is available in Privileged EXEC mode (enable mode) and requires a privilege level of 15 (or appropriate authorization). The output can be very long, especially on devices with many interfaces or complex configurations, so it is often piped to other commands like 'show running-config | include ospf' to filter specific sections.
The output is buffered, meaning it may be truncated if the terminal length is set; using 'terminal length 0' disables paging. The command is also used in conjunction with 'copy running-config startup-config' to save changes, and with 'configure replace' to roll back configurations. Understanding the running-config is key to network documentation, change management, and disaster recovery.
It provides a complete snapshot of the device's configuration at that moment, which can be compared against baseline configurations or used to replicate settings on another device. The command is supported across all Cisco IOS platforms, including routers, switches, and firewalls, though the output format may vary slightly between platforms. For example, on Catalyst switches, the running-config includes VLAN and spanning-tree settings, while on routers it focuses on routing protocols and interfaces.
The command is also available in IOS-XE, NX-OS, and ASA, though with some syntax differences. In summary, 'show running-config' is the go-to command for any network engineer to understand the current configuration of a Cisco device, and it is a cornerstone of network troubleshooting and management.
show running-configWhen to Use This Command
- Verify configuration before saving to NVRAM
- Troubleshoot misconfigurations by reviewing live config
- Audit security settings across device
- Compare with startup-config to find unsaved changes
Command Examples
View full running config
R1# show running-configBuilding configuration... Current configuration : 2048 bytes ! version 15.4 service password-encryption ! hostname R1 ! enable secret 5 $1$abc$xyz ! interface GigabitEthernet0/0 ip address 192.168.1.1 255.255.255.0 no shutdown ! router ospf 1 network 192.168.1.0 0.0.0.255 area 0 ! end
Output shows device hostname, interface configs, routing protocols, and security settings. Each ! is a comment separator.
Understanding the Output
The running-config output shows the complete active device configuration in IOS format. It starts with the IOS version, then global settings, interfaces, routing protocols, and line configs. Settings at default values are omitted.
The config ends with "end".
Configuration Scenarios
Verify OSPF Configuration on a Branch Router
A network engineer needs to confirm that OSPF is correctly configured on a branch router after a recent change to the network. The goal is to ensure OSPF process ID, network statements, and passive interfaces are set correctly.
Topology
R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2
R1(Gi0/1)---192.168.1.0/24---(LAN)Steps
- 1.Step 1: Connect to the router via SSH or console and enter enable mode: R1> enable
- 2.Step 2: Display the running configuration: R1# show running-config
- 3.Step 3: Filter the output to show only OSPF-related lines: R1# show running-config | section router ospf
- 4.Step 4: Verify the OSPF process ID, network statements, and passive-interface default command.
- 5.Step 5: Check that the router ID is set (or will be elected) and that redistribution is configured if needed.
! Partial running-config for OSPF router ospf 1 router-id 1.1.1.1 network 10.0.12.0 0.0.0.3 area 0 network 192.168.1.0 0.0.0.255 area 0 passive-interface default no passive-interface GigabitEthernet0/0
Verify: Use 'show ip ospf neighbor' to verify OSPF adjacency with R2. Expected output shows R2's router ID and state as FULL/DR.
Watch out: A common mistake is forgetting to use 'no passive-interface' on the interface connecting to the neighbor, which prevents OSPF hello packets from being sent.
Troubleshoot ACL Blocking Traffic on a Switch
Users report that they cannot access a server on VLAN 10. The network engineer suspects an access control list (ACL) applied to the VLAN interface is blocking traffic. The goal is to review the ACL configuration in the running-config.
Topology
Switch1(Vlan10)---192.168.10.0/24---(Server)
Switch1(Gi0/1)---10.0.0.0/30---(Router)Steps
- 1.Step 1: Enter enable mode on the switch: Switch> enable
- 2.Step 2: Display the running configuration: Switch# show running-config
- 3.Step 3: Filter to show only ACLs: Switch# show running-config | include access-list
- 4.Step 4: Identify the ACL applied to Vlan10 interface: Switch# show running-config interface vlan10
- 5.Step 5: Review the ACL entries to see if the necessary permit statements are present.
! Partial running-config for ACL interface Vlan10 ip access-group BLOCK_SERVER in ! ip access-list extended BLOCK_SERVER deny tcp any host 192.168.10.100 eq 80 permit ip any any
Verify: Use 'show access-lists BLOCK_SERVER' to see hit counts. If the deny line has many hits, it is blocking traffic. Also use 'ping' from a test host to the server to confirm connectivity.
Watch out: A common mistake is applying the ACL in the wrong direction (in vs out). For traffic from hosts to server, the ACL should be applied inbound on the VLAN interface.
Troubleshooting with This Command
When troubleshooting network issues, 'show running-config' is often the starting point. A healthy running-config should reflect the intended configuration without errors. Key indicators of problems include missing or incorrect interface configurations, such as an interface being administratively down ('shutdown') when it should be up, or an IP address mismatch.
For routing issues, check for missing network statements under routing protocols, incorrect passive-interface settings, or redistribution errors. For security issues, review ACLs for missing permit statements or incorrect order. The command helps diagnose symptoms like no connectivity, high latency, or routing loops.
A step-by-step diagnostic flow: 1) Capture the running-config and save it for comparison. 2) Check interface status and IP addresses. 3) Verify routing protocol configuration. 4) Review ACLs and NAT rules. 5) Compare with the startup-config to see if unsaved changes are causing issues. Correlate with 'show ip interface brief' to verify interface states, 'show ip route' to confirm routing table, and 'debug ip packet' (with caution) for packet drops. For example, if a route is missing, check the routing protocol configuration in the running-config.
If an ACL is blocking traffic, examine the ACL entries and their order. The command is also useful for verifying that changes made during troubleshooting have been applied correctly. Always use 'terminal length 0' to avoid truncated output, and pipe to 'include' or 'section' to focus on relevant parts.
Remember that the running-config is volatile; if the device reloads without saving, changes are lost. Therefore, after troubleshooting, ensure the configuration is saved with 'copy running-config startup-config'.
CCNA Exam Tips
show running-config shows config in RAM — not saved until you copy to startup-config
Use show running-config | include [pattern] to filter output
Passwords shown as type 7 (service password-encryption) or type 5 (enable secret)
Compare with show startup-config to see unsaved changes
Common Mistakes
Forgetting to save with copy run start — config lost on reload
Confusing running-config (RAM) with startup-config (NVRAM)
Not checking running-config after changes to verify they applied correctly
show running-config vs show startup-config
Both commands display device configurations, but they differ in source and persistence: 'show running-config' shows the current active configuration in DRAM, while 'show startup-config' shows the configuration saved in NVRAM that is used upon reboot. Network engineers often confuse them because changes made to the running config take effect immediately but are lost on reload unless saved to startup config.
| Aspect | show running-config | show startup-config |
|---|---|---|
| Scope | Current active config | Saved boot config |
| Source | Running-config in DRAM | Startup-config in NVRAM |
| Visibility | Includes all non-default settings currently in effect | Includes non-default settings saved for next boot |
| Persistence | Lost on reload unless copied to startup | Persists across reboots |
| Precedence | Immediately affects device operation | Takes effect only after reload or copy running |
| Typical use | Verify live configuration changes | Verify configuration that will load on next boot |
Use show running-config when you need to inspect the currently active configuration and verify that changes have taken effect.
Use show startup-config when you need to check the configuration that will be applied after the next device reload.
Platform Notes
In IOS-XE, the 'show running-config' command behaves similarly to classic IOS, but the output format may include additional sections like 'platform' or 'service' that are specific to IOS-XE. The command is available in all IOS-XE versions. In NX-OS, the equivalent command is 'show running-config' as well, but the syntax for filtering differs; for example, 'show running-config | section ospf' works similarly.
However, NX-OS uses a different configuration hierarchy, and the output may include 'feature' commands that enable features. In ASA, the command is also 'show running-config', but the configuration is organized differently, with sections like 'interface', 'route', 'access-list', and 'nat'. ASA also supports 'show running-config all' to include default settings.
In IOS-XR, the command is 'show running-config' but the output is in a different format, using XML-like tags, and the configuration is committed in a two-phase process. The command is available in all IOS versions (12.x, 15.x, 16.x) with minor differences in output formatting; for example, older versions may not include interface descriptions in the same order. Always check the specific platform documentation for any nuances.
Related Commands
copy running-config startup-config
Saves the current running configuration to the startup configuration file in NVRAM, ensuring changes persist after a router reload.
show startup-config
Displays the saved configuration stored in NVRAM that loads on next device boot.
write memory
Saves the current running configuration to the startup configuration in NVRAM, ensuring changes persist after a reload.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions