What does the command copy running-config startup-config do?

AOS-CX 10.07 Fundamentals Guide Help Center

data-mc-breadcrumbs-count=3 data-mc-toc=True>You are here:

Syntax

copy startup-config running-config

Description

Copies the startup configuration to the running configuration.

Command context

Manager (#)

Authority

Administrators or local user group members with execution rights for this command.

Examples

switch# copy startup-config running-config Success

AOS-CX 10.07 Fundamentals Guide Help Center

data-mc-breadcrumbs-count=3 data-mc-toc=True>You are here:

Syntax

copy running-config {startup-config | checkpoint <CHECKPOINT-NAME>}

Description

Copies the running configuration to the startup configuration or to a new checkpoint. If the startup configuration is already present, the command overwrites the existing startup configuration.

Command context

Manager (#)

Parameters

startup-config

Specifies that the startup configuration receives a copy of the running configuration.

checkpoint <CHECKPOINT-NAME>

Specifies the name of a new checkpoint to receive a copy of the running configuration. The checkpoint name can be alphanumeric. It can also contain underscores (_) and dashes (-).

Do not start the checkpoint name with CPC because it is used for system-generated checkpoints.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Copying the running configuration to the startup configuration:

switch# copy running-config startup-config Success

Copying the running configuration to a new checkpoint named ckpt1:

switch# copy running-config checkpoint ckpt1 Success

They essentially achieve the same things by saving the running configuration to the memory so that after a reload it retains the same configuration. Write memory is the "ancient" way, and copy running-config startup-config is the "newer way". Some newer platforms do not accept write memory, the Nexus platforms for instance. The workaround is to create an alias using cli alias name wr copy run start in global configuration mode.

The "copy run start" command is just a variation of the "copy" command. The copy command can be used to copy any files in or out of the flash etc. - as opposed to just saving the configuration. Just remember though, if you are in the wrong configuration register "wr" will lose your configuration after a reload/when you change the configuration register whereas "copy run start" will just copy the contents of the running configuration to the start-up configuration.

When doing CCNA exams, the command "write" is not allowed. It has to be the official "copy running-config startup-config".

The reason why the "wr" or "write" command is very popular are:

  1. A minimum of two characters to save a config;

  2. It is easy to confuse "copy start run" with "copy run start".

Source: https://community.cisco.com/t5/routing/difference-between-quot-copy-run-start-quot-and-wr/m-p/2943355

CIsco devices store commands in two configuration files:

  • startup configuration
  • running configuration

Immediately after you type a command in the global configuration mode, it will be stored in the running configuration. A running configuration resides in a device’s RAM, so if a device loses power, all configured commands will be lost.

To avoid this scenario, you need to copy your current configuration into the startup configuration. A startup configuration is stored in the nonvolatile memory of a device, which means that all configuration changes are saved even if the device loses power.

To copy your running configuration into the startup configuration you need to type the command copy running-configuration startup-configuration.

Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router#

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:

What does the command copy running-config startup-config do?

IOS and Configuration Basics

Cisco IOS Modes of Operation

Getting Context-Sensitive Help

Saving Configuration Changes

Manually Configuring RPM

Verifying Network Connectivity


This appendix contains basic information about the Cisco Internet Operating System (IOS) software and includes the following sections:

•Cisco IOS Modes of Operation

•Getting Context-Sensitive Help

•Saving Configuration Changes

Cisco IOS software provides access to several different command modes. Each command mode provides a different group of related commands.

For security purposes, Cisco IOS software provides two levels of access to commands: user and privileged. The unprivileged user mode is called user EXEC mode. The privileged mode is called privileged EXEC mode and requires a password. The commands available in user EXEC mode are a subset of the commands available in privileged EXEC mode.

Table C-1 describes some of the most commonly used modes, how to enter the modes, and the resulting prompts. The prompt helps you identify which mode you are in and, therefore, which commands are available to you.

Table C-1 Cisco IOS Operating Modes  

User EXEC

User EXEC commands allow you to connect to remote devices, change terminal settings on a temporary basis, perform basic tests, and list system information. The EXEC commands available at the user level are a subset of those available at the privileged level.

Log in.

MGX8850-RPM>

Privileged EXEC

Privileged EXEC commands set operating parameters. The privileged command set includes those commands contained in user EXEC mode, and also the configure command through which you can access the remaining command modes. Privileged EXEC mode also includes high-level testing commands, such as debug.

Enter the enable EXEC command from user EXEC mode.

MGX8850-RPM#

Global configuration

Global configuration commands apply to features that affect the system as a whole.

Enter the configure privileged EXEC command from global configuration mode.

MGX8850-RPM(config)#

Interface configuration

Interface configuration commands modify the operation of an interface such as an Ethernet or serial port. Many features are enabled on a per-interface basis. Interface configuration commands always follow an interface global configuration command, which defines the interface type.

Enter the interface type number command from global configuration mode. For example, enter the interface int switch 9/1 command to configure the ATM interface.

MGX8850-RPM(config-if)#

ROM monitor

ROM monitor commands are used to perform low-level diagnostics. You can also use the ROM monitor commands to recover from a system failure and stop the boot process in a specific operating environment.1

Enter the reload EXEC command from privileged EXEC mode. Click BREAK during the first 60 seconds while the system is booting.

ROMMON>


Almost every configuration command also has a no form. In general, use the no form to disable a feature or function. Use the command without the keyword no to reenable a disabled feature or to enable a feature that is disabled by default. For example, IP routing is enabled by default. To disable IP routing, enter the no ip routing command and enter ip routing to reenable it. The Cisco IOS software command reference publication provides the complete syntax for the configuration commands and describes what the no form of a command does.

In any command mode, you can list the available commands by entering a question mark (?).

To obtain a list of commands that begin with a particular character sequence, type in those characters followed immediately by the question mark (?). Do not include a space. This form of help is called word help because it completes a word for you.

To list keywords or arguments, enter a question mark in place of a keyword or argument. Include a space before the question mark. This form of help is called command syntax help, because it reminds you which keywords or arguments are applicable, based on the commands, keywords, and arguments you have already entered.

memory Configure from NV memory

network Configure from a TFTP network host

terminal Configure from the terminal

You can also abbreviate commands and keywords by entering just enough characters to make the command unique from other commands. For example, you can abbreviate the show command to sh.

Whenever you make changes to the RPM configuration, you must save the changes to memory so they will not be lost if the system is rebooted. There are two types of configuration files: the running (current operating) configuration and the startup configuration. The running configuration is stored in RAM; the startup configuration is stored in NVRAM.

To display the current running configuration, enter the show running-config command. Enter the copy running-config startup-config command to save the current running configuration to the startup configuration file in NVRAM.

MGX8850-RPM# copy running-config startup-config

To display the startup configuration, enter the show startup-config command. Enter the copy startup-config running-config command to write the startup configuration to the running configuration.

MGX8850-RPM# copy startup-config running-config

To erase both configuration files (and start over), enter the write erase and reload commands:

What does the command copy running-config startup-config do?

Warning This command sequence will erase the entire RPM configuration in RAM and NVRAM and reload the RPM.

You can configure the RPM manually if you prefer not to use AutoInstall or the prompt-driven System Configuration Dialog.

Take the following steps to configure the RPM manually:

Step 1 Connect a console terminal to the RPM.

Follow the instructions described in "Installing the MGX RPM," in the section "Connecting a Console Terminal or PC to the RPM Console Port," and then power on the RPM.

Step 2 When you are prompted to enter the initial dialog, enter no to go into the normal operating mode of the RPM:

Would you like to enter the initial dialog? [yes]: no

Step 3 After a few seconds you will see the user EXEC prompt (Router>).

By default, the host name is Router, but the prompt will match the current host name. In the following examples, the host name is MGX8850-RPM. Enter the enable command to enter enable mode. You can make configuration changes only in enable mode:

The prompt will change to the privileged EXEC (enable) prompt, MGX8850-RPM#.

Step 4 Enter the configure terminal command at the enable prompt to enter configuration mode:

MGX8850-RPM# config terminal

You can now enter any changes you want to the configuration. You will probably want to perform the following tasks:

1. Assign a host name for the RPM using the hostname command.

2. Enter an enable secret using the enable secret command.

3. Enter an enable password using the enable password command.

4. Assign addresses to the interfaces using the protocol address command.

5. Specify which protocols to support on the interfaces.

Refer to the Cisco IOS configuration and command reference publications for more information about the commands you can use to configure the RPM. You can also refer to the MGX 8850 Wide Area Switch Command Reference and MGX 8850 Wide Area Switch Installation and Configuration documents for information about the commands you can use to configure the RPM.

Step 5 When you finish configuring the RPM, enter the exit command until you return to the privileged EXEC prompt (MGX8850-RPM#).

Step 6 To save the configuration changes to NVRAM, enter the copy run start command at the privileged EXEC prompt:

MGX8850-RPM# copy run start

The RPM is now configured and will boot with the configuration you entered.

This concludes the initial RPM configuration.

When you have installed and configured the RPM, you can use the following commands in user EXEC mode to verify network connectivity:

ping—Sends a special datagram to the destination device, then waits for a reply datagram from that device
See "Verifying Network Connectivity" of Chapter 5 in this manual for a detailed ping procedure.

telnet—Logs in to a remote node

traceroute—Discovers the routes that packets take when traveling from one RPM to another

If there is a problem with network connectivity, see "Maintaining the MGX RPM" in the section "Reading Front Panel LEDs," and check the cable connections. If there is still a problem, check the RPM configuration. Contact customer service for further assistance.