SystemEXEC

show running-config

Displays the current running configuration of the Cisco NX-OS device.

Overview

The 'show running-config' command is a fundamental diagnostic and verification tool in Cisco NX-OS. It displays the current active configuration of the device, which is the configuration that the device is currently using to operate. This command is essential for network engineers to verify that changes have been applied correctly, to troubleshoot configuration issues, and to document the device's state. The running configuration is stored in RAM and is lost upon reboot unless saved to the startup configuration using 'copy running-config startup-config'. In NX-OS, the running configuration is structured similarly to IOS but includes NX-OS-specific commands such as 'feature' for enabling protocols. The command can be filtered to show specific sections or interfaces, making it efficient for targeted troubleshooting. It is typically the first command used when investigating configuration-related problems, as it provides a complete picture of the device's current settings.

Syntax·EXEC
show running-config [all | diff | interface <interface> | section <regex> | vlan <vlan-id>]

When to Use This Command

  • Verify current configuration after changes before saving to startup-config.
  • Troubleshoot configuration issues by comparing running-config with startup-config.
  • Extract specific configuration sections for documentation or audit.
  • Check interface-specific configuration when diagnosing connectivity problems.

Parameters

ParameterSyntaxDescription
allshow running-config allDisplays all configuration commands, including default settings that are normally hidden. Useful for auditing or when default values are critical.
diffshow running-config diffShows differences between the running configuration and the startup configuration. Helps identify uncommitted changes.
interfaceshow running-config interface <interface>Displays only the configuration for a specific interface. The interface must be specified in the format <type><number>, e.g., Ethernet1/1.
sectionshow running-config section <regex>Filters the output to show only lines that match a regular expression. Useful for extracting configuration blocks like 'ospf' or 'bgp'.
vlanshow running-config vlan <vlan-id>Displays configuration for a specific VLAN. The VLAN ID must be specified (1-4094).

Command Examples

Basic show running-config

show running-config
!Command: show running-config
!Time: Mon Mar 10 14:22:33 2025

version 9.3(10)
hostname Nexus-1
feature ospf
feature bgp

interface Ethernet1/1
  description Link to Core
  switchport mode trunk
  no shutdown

interface Ethernet1/2
  description Link to Server
  switchport access vlan 10
  spanning-tree portfast
  no shutdown

vlan 10
  name Servers

line console
  exec-timeout 0

line vty
  exec-timeout 30

end

The output shows the current running configuration. The first line indicates the command and timestamp. The configuration includes version, hostname, enabled features, interface configurations, VLAN definitions, and line settings.

Show running-config for a specific interface

show running-config interface Ethernet1/1
!Command: show running-config interface Ethernet1/1
!Time: Mon Mar 10 14:25:00 2025

interface Ethernet1/1
  description Link to Core
  switchport mode trunk
  no shutdown

This variant displays only the configuration for the specified interface, useful for quick verification without scrolling through the entire config.

Understanding the Output

The output of 'show running-config' lists all configuration commands currently active on the device. Each line represents a command that has been applied. The output begins with a header showing the command and timestamp. Key sections include version, hostname, enabled features (e.g., 'feature ospf'), interface configurations (starting with 'interface <type><number>'), VLAN definitions, and line settings. The configuration is presented in the order it would be applied. A healthy running-config should be consistent with the intended design, with no missing or conflicting commands. Problematic values include missing 'no shutdown' on interfaces, incorrect VLAN assignments, or missing feature enablement. The output ends with 'end' to mark the end of the configuration.

Configuration Scenarios

Verifying OSPF Configuration

After configuring OSPF on a Nexus switch, verify the running configuration to ensure OSPF is enabled and interfaces are correctly assigned.

Topology

Nexus-1 --- OSPF Area 0 --- Nexus-2

Steps

  1. 1.Enter EXEC mode on Nexus-1.
  2. 2.Type 'show running-config | section ospf' to display OSPF-related configuration.
  3. 3.Verify that 'feature ospf' is present and that router ospf configuration includes correct router-id and network statements.
Configuration
! Expected OSPF configuration
feature ospf
router ospf 1
  router-id 10.1.1.1
  area 0.0.0.0
  interface Ethernet1/1
    ip router ospf 1 area 0.0.0.0

Verify: Check that the output matches the expected configuration. Ensure no interfaces are missing the 'ip router ospf' command.

Watch out: If 'feature ospf' is missing, OSPF will not operate even if router ospf is configured. Always verify features are enabled.

Troubleshooting with This Command

When troubleshooting configuration issues on Cisco NX-OS, 'show running-config' is the starting point. For example, if an interface is not coming up, check the running configuration for that interface to ensure it has 'no shutdown' and correct switchport settings. If a routing protocol is not forming adjacencies, use 'show running-config | section ospf' to verify that the protocol is enabled and interfaces are correctly assigned. Compare the running configuration with the startup configuration using 'show running-config diff' to identify uncommitted changes that may have caused issues. If a feature is not working, check that the corresponding 'feature' command is present. For security issues, examine access-lists and port-security settings. The command can also be used to verify that changes made during maintenance windows are correctly applied before saving. In NX-OS, the running configuration is case-sensitive and uses spaces for indentation; pay attention to syntax errors like missing spaces or incorrect keywords. Use the 'all' option to see default settings that might be overridden. For complex issues, combine with 'show startup-config' to compare configurations.

CCNA Exam Tips

1.

Know that 'show running-config' is used in EXEC mode and does not require privilege escalation.

2.

Be familiar with filtering options like 'section' to isolate specific configuration blocks.

3.

Understand that NX-OS uses 'feature' commands to enable protocols, unlike IOS where protocols are enabled globally.

Common Mistakes

Mistake: Forgetting to use 'copy running-config startup-config' after changes. Consequence: Configuration is lost on reload.

Mistake: Assuming 'show running-config' shows all default settings. Consequence: Missing default values not displayed.

Mistake: Using 'show running-config' in configuration mode. Consequence: Command not recognized; must exit to EXEC mode.

Platform Notes

In Cisco NX-OS, the 'show running-config' command behaves similarly to Cisco IOS but with some differences. NX-OS uses 'feature' commands to enable protocols (e.g., 'feature ospf'), whereas IOS uses 'router ospf' directly. NX-OS also supports 'show running-config all' to display default settings, which is not available in IOS. The output format in NX-OS includes a header with the command and timestamp. NX-OS does not support the 'include' keyword; instead, use 'section' for filtering. On other platforms like Arista EOS, the equivalent command is 'show running-config' with similar syntax. On Juniper Junos, the equivalent is 'show configuration'. Version differences: NX-OS 9.3(10) introduced new features like VXLAN and EVPN, which appear in the running config. Always check the specific NX-OS version for command syntax variations.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions