Exploring Cisco Nexus Device Configuration

The Cisco NX-OS software has two types of configuration files: running configuration and startup configuration. The device uses the startup configuration (startup-config) during device startup to configure the software features. The running configuration (running-config) contains the current changes you make to the startup configuration file. The two configuration files can be different. You might want to change the device configuration for a short time period rather than permanently. In this case, you would change the running configuration by using commands in global configuration mode but not save the changes to the startup configuration.

To change the running configuration, use the configure terminal command to enter global configuration mode. As you use the Cisco NX-OS configuration modes, commands generally are executed immediately and are saved to the running configuration file either immediately after you enter them or when you exit a configuration mode.

To change the startup configuration file, you can either save the running configuration file to the startup configuration using the copy running-config startup-config command or copy a configuration file from a file server to the startup configuration.

Example 2-13 illustrates various Nexus device configurations and their impact on running configuration and startup configuration files.

Example 2-13 Nexus Device Configuration

Click here to view code image

! Currently running-config and startup-config doesn’t have any description configured
under interface Ethernet 1/5

N9K#
show running-config interface Ethernet 1/5
interface Ethernet1/5
N9K#
show startup-config interface Ethernet 1/5
interface Ethernet1/5
! Configuring description TEST for interface Ethernet 1/5
N9K#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
N9K(config)#
interface Ethernet 1/5
N9K(config-if)#
description TEST
N9K(config-if)#
end
! Once the description is configured, only running-config reflects the description

  
under interface Ethernet 1/5
N9K#
show running-config interface Ethernet 1/5
interface Ethernet1/5
  description TEST
N9K#
show startup-config interface Ethernet 1/5
interface Ethernet1/5

! Once the configuration is saved on startup-config using
copy running-config
startup-config
 command, the description is reflected under interface Ethernet 1/5
in startup-config also.
N9K#
copy running-config startup-config
[########################################] 100%
Copy complete, now saving to disk (please wait)…
Copy complete.
N9K#
show startup-config interface Ethernet 1/5
interface Ethernet1/5
  description TEST
N9K#

The write erase command erases the entire startup configuration, except for the following:

  • Boot variable definitions
  • The IPv4 and IPv6 configuration on the mgmt0 interface, including the following:
    • Address
    • Subnet mask
    • Default gateway/route in the management VRF

To remove the boot variable definitions and the IPv4/IPv6 configuration on the mgmt0 interface, use the write erase boot command. To remove all application persistency files (such as patch rpms, third party rpms, and application configuration) in the /etc directory other than configuration, use ‘install reset’.

,


Leave a Reply

Your email address will not be published. Required fields are marked *