show running-config
Displays the current running configuration of the Cisco IOS-XR device.
Overview
The 'show running-config' command is a fundamental diagnostic and verification tool in Cisco IOS-XR. It displays the current configuration that is actively running on the device, which includes all configured features such as interfaces, routing protocols, security policies, and system parameters. Unlike Cisco IOS, where the running configuration is stored in RAM and can be modified directly, IOS-XR uses a candidate configuration model where changes are made to a candidate configuration and then committed to the running configuration. Therefore, 'show running-config' reflects the last committed configuration. This command is essential for network engineers to verify that intended changes have been applied correctly, to troubleshoot configuration errors, and to document the device state. It is typically used after making configuration changes, before reloading the device, or when comparing configurations across devices. In troubleshooting workflows, it helps identify missing or incorrect commands, such as a misconfigured IP address or a missing routing protocol statement. Platform-specific behavior for IOS-XR includes the ability to filter output by location (for distributed systems) or by feature, and the output is structured with clear hierarchical indentation. Understanding how to read this output is critical for effective network management and certification exams like CCNP.
show running-config [brief | full] [location <node-id>] [feature <feature-name>] [verbose]When to Use This Command
- Verify the current configuration after making changes to ensure they are applied correctly.
- Troubleshoot configuration issues by comparing the running config with the startup config.
- Audit the device configuration for compliance with security policies or best practices.
- Capture the configuration for backup or documentation purposes.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| brief | brief | Displays a condensed version of the running configuration, omitting default values and some details. Useful for a quick overview. |
| full | full | Displays the complete running configuration including default values. Useful for thorough audits. |
| location | location <node-id> | Specifies a specific node (line card or RP) to show the running configuration for. Used in multi-chassis or distributed systems. |
| feature | feature <feature-name> | Filters the output to show only the configuration for a specific feature, such as 'interface', 'router ospf', or 'bgp'. |
| verbose | verbose | Provides additional details in the output, such as internal parameters or timestamps. Not commonly used. |
Command Examples
Basic show running-config
show running-configBuilding configuration... !! IOS-XR configuration ! hostname Router-XR ! interface GigabitEthernet0/0/0/0 ipv4 address 192.168.1.1 255.255.255.0 ! router ospf 100 router-id 1.1.1.1 area 0 interface GigabitEthernet0/0/0/0 cost 10 ! ! ! end
The output shows the current running configuration. 'Building configuration...' indicates the config is being retrieved. The configuration is displayed in hierarchical blocks: hostname, interfaces, routing protocols. Each block starts with '!' and ends with '!' or 'end'.
Show running-config for a specific interface
show running-config interface GigabitEthernet0/0/0/0Building configuration... !! IOS-XR configuration ! interface GigabitEthernet0/0/0/0 ipv4 address 192.168.1.1 255.255.255.0 ! end
This filters the output to show only the configuration for the specified interface. Useful for quickly checking interface settings without scrolling through the entire config.
Understanding the Output
The output of 'show running-config' displays the current active configuration of the device. It begins with 'Building configuration...' and then lists configuration commands in a hierarchical format. Each major section (e.g., interface, router) starts with a '!' comment line. The configuration is organized by feature: hostname, interfaces, routing protocols, etc. Key fields include interface names, IP addresses, routing process IDs, and policy definitions. A healthy configuration shows consistent and expected values; problem values might include missing IP addresses, incorrect subnet masks, or duplicate router IDs. The output ends with 'end' to mark the end of the configuration. In IOS-XR, the configuration is structured with indentation to show hierarchy, and each block is closed with '!' or 'end'.
Configuration Scenarios
Verifying OSPF Configuration
After configuring OSPF on a router, you want to verify that the configuration is correct.
Topology
Router-XR --- Gig0/0/0/0 (192.168.1.0/24) --- Router-2Steps
- 1.Enter EXEC mode.
- 2.Type 'show running-config router ospf 100' to display only OSPF configuration.
!
Verify: Check that the router-id is set, area is correct, and interfaces are included in the OSPF process.
Watch out: If the interface is not showing under OSPF, ensure that the interface is not passive and that the network type is correct.
Checking Interface IP Configuration
You need to confirm the IP address on a specific interface.
Topology
Router-XR --- Gig0/0/0/0 (10.1.1.1/24) --- SwitchSteps
- 1.Use 'show running-config interface GigabitEthernet0/0/0/0'.
- 2.Review the output for the 'ipv4 address' line.
!
Verify: Ensure the IP address and subnet mask match the intended configuration.
Watch out: If the interface is shut down, the configuration may still appear but the interface will be administratively down.
Troubleshooting with This Command
When troubleshooting network issues on Cisco IOS-XR, 'show running-config' is often the first command to run. It provides a snapshot of the device's current state. For example, if a routing protocol is not forming neighbors, check the running configuration for the protocol to ensure correct network statements, router-id, and interface participation. If an interface is not passing traffic, verify that the interface is not shutdown, has an IP address, and is configured with the correct encapsulation. In IOS-XR, the running configuration is hierarchical; pay attention to indentation to understand parent-child relationships. For instance, an interface configuration block contains subcommands like 'ipv4 address'. If you suspect a configuration change was not applied, compare the running config with the startup config using 'show startup-config'. Additionally, use filters like 'show running-config | include <pattern>' to quickly find specific lines. In distributed systems, use the 'location' parameter to check configurations on specific line cards. Common issues include missing 'commit' after changes, which means the running config does not reflect intended changes. Always verify that the running config matches the expected configuration after any modification.
CCNA Exam Tips
Know that 'show running-config' in IOS-XR does not show default values unless they are explicitly configured.
Be aware that the output can be filtered using keywords like 'interface' or 'router' to focus on specific sections.
Remember that 'show running-config' is an EXEC command and requires appropriate privileges.
Common Mistakes
Mistake: Using 'show running-config' without any filter and getting overwhelmed by the output. Consequence: Difficulty in finding specific configuration lines.
Mistake: Assuming the running config is saved to startup config. Consequence: Changes are lost after reload if not saved with 'commit' or 'copy running-config startup-config'.
Mistake: Misinterpreting the output format; forgetting that IOS-XR uses a hierarchical structure with indentation. Consequence: Errors in reading or applying configuration.
Platform Notes
In Cisco IOS-XR, the 'show running-config' command differs from Cisco IOS in several ways. IOS-XR uses a candidate configuration model; changes are made to a candidate config and then committed. The running config reflects the last committed configuration. The output is structured with indentation to show hierarchy, and each configuration block is closed with '!' or 'end'. IOS-XR also supports filtering by location for multi-chassis systems. Equivalent commands on other platforms: On Juniper Junos, 'show configuration' displays the active configuration. On Arista EOS, 'show running-config' is similar. In IOS-XR, the command can be abbreviated as 'show run'. Version differences: In older IOS-XR versions, the output might not include default values unless 'full' is specified. Newer versions may have additional filtering options. Always refer to the specific version documentation for exact syntax.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions