text stringlengths 0 6.55k |
|---|
the running-config file. However, if the switch lost power right after that example, all that configuration would be lost. If you want to keep that configuration, you have to copy the running-config file into NVRAM, overwriting the old startup-config file. |
Example 4-5 demonstrates that commands used in configuration mode change only the run-ning configuration in RAM. The example shows the following concepts and steps: |
Step 1. The example begins with both the running and startup-config having the same hostname, per the hostname hannah command. |
|||||||||||||||||||| Technet24 |
|||||||||||||||||||| |
Chapter 4: Using the Command-Line Interface 101 |
Step 2. The hostname is changed in configuration mode using the hostname harold command. |
Step 3. The show running-config and show startup-config commands show the fact that the hostnames are now different, with the hostname harold command found only in the running-config. |
Example 4-5 How Configuration Mode Commands Change the Running-Config File, Not the Startup-Config File |
! Step 1 next (two commands) |
! |
hannah# show running-config 4 ! (lines omitted) |
hostname hannah |
! (rest of lines omitted) |
hannah# show startup-config |
! (lines omitted) |
hostname hannah |
! (rest of lines omitted) |
! Step 2 next. Notice that the command prompt changes immediately after |
! the hostname command. |
hannah# configure terminal |
hannah(config)# hostname harold |
harold(config)# exit |
! Step 3 next (two commands) |
! |
harold# show running-config |
! (lines omitted) - just showing the part with the hostname command |
hostname harold |
! |
harold# show startup-config |
! (lines omitted) - just showing the part with the hostname command |
hostname hannah |
Copying and Erasing Configuration Files |
The configuration process updates the running-config file, which is lost if the router loses power or is reloaded. Clearly, IOS needs to provide us a way to copy the running |
configuration so that it will not be lost, so it will be used the next time the switch reloads or powers on. For instance, Example 4-5 ended with a different running configuration (with the hostname harold command) versus the startup configuration. |
|||||||||||||||||||| |
|||||||||||||||||||| |
102 CCNA 200-301 Official Cert Guide, Volume 1 |
In short, the EXEC command copy running-config startup-config backs up the running-config to the startup-config file. This command overwrites the current startup-config file with what is currently in the running-configuration file. |
In addition, in the lab, you may want to just get rid of all existing configuration and start over with a clean configuration. To do that, you can erase the startup-config file using three different commands: |
write erase |
erase startup-config |
erase nvram: |
Once the startup-config file is erased, you can reload or power off/on the switch, and it will boot with the now-empty startup configuration. |
Note that Cisco IOS does not have a command that erases the contents of the running-config file. To clear out the running-config file, simply erase the startup-config file, and then reload the switch, and the running-config will be empty at the end of the process. |
NOTE Cisco uses the term reload to refer to what most PC operating systems call reboot-ing or restarting. In each case, it is a re-initialization of the software. The reload EXEC com-mand causes a switch to reload. |
Chapter Review |
One key to doing well on the exams is to perform repetitive spaced review sessions. Review this chapter’s material using either the tools in the book or on the book’s companion web-site. Refer to the “Your Study Plan” element section titled “Step 2: Build Your Study Habits Around the Chapter” for more details. Table 4-... |
Table 4-6 Chapter Review Tracking |
Review Element Review key topics |
Review key terms |
Repeat DIKTA questions |
Review memory tables |
Review command tables |
Review Date(s) Resource Used Book, website |
Book, website |
Book, PTP |
Book, website |
Book |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.