Nvram

copy startup-config running-config A

copy tftp startup-config copy startup-config tftp

The commands can be summarized as follows:

copy {tftp | running-config | startup-config} {tftp | running-config | startup-config}

The first parameter is the "from" location; the next one is the "to" location. (Of course, choosing the same option for both parameters is not allowed.)

The copy command always replaces the existing file when the file is copied into NVRAM or into a TFTP server. In other words, it acts like the destination file was erased and the new file completely replaced the old one.

When the copy command copies a configuration file into RAM, the configuration file in RAM is not replaced. Effectively, any copy into RAM works just as if you typed the commands in the "from" configuration file in the order listed in the config file. In other words, it works as if the RAM configuration file and the newly copied files were merged.

So, who cares? Well, we do. If you change the running config and then decide that you want to revert to what's in the startup-config file, the only way to guarantee that is to issue the reload command, which reloads, or reboots, the router.

Three key commands can be used to erase the contents of NVRAM. The write erase and erase startup-config commands are older, whereas the erase nvram: command is the more recent, and recommended, command. All three commands simply erase the contents of the NVRAM configuration file. Of course, if the router is reloaded at this point, there is no initial configuration.

Viewing the Configuration and Old-Style Configuration Commands

Once upon a time, commands that were used to display and move configuration files among RAM, NVRAM, and TFTP did not use easy-to-recall parameters such as startup-config and running-config. In fact, most people could not remember the commands or got the different ones confused. Figure 7-6 shows both the old and the new commands used to view configurations.

Figure 7-6 Configuration show Commands

Figure 7-6 Configuration show Commands

Initial Configuration (Setup Mode)

Setup mode leads a router administrator to a basic router configuration by using questions that prompt the administrator for basic configuration parameters. Instead of using setup mode, a Cisco router can be configured using the CLI in configuration mode. In fact, most networking personnel do not use setup at all, but new users sometimes like to use setup mode, particularly until they become more familiar with the CLI configuration mode.

Figure 7-7 and Example 7-5 describe the process used by setup mode. Setup mode is used most frequently when the router boots, and it has no configuration in NVRAM. Setup mode also can be entered by using the setup command from privileged mode.

Figure 7-7 Getting into Setup Mode

Example 7-5 shows a screen capture of using setup mode after booting a router with no configuration in NVRAM.

Example 7-5 Router Setup Configuration Mode

— System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: yes At any point you may enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.Basic management setup configures connectivity for management of the system, extended setup will ask you to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: no

First, would you like to see the current interface summary? [yes]:

Any interface listed with OK? value "NO" does not have a valid configuration only enough

Interface Ethernet0 Serial0 Seriall

IP-Address unassigned unassigned unassigned

OK? Method Status NO unset up NO unset down NO unset down

Protocol down down down continues

Example 7-5 Router Setup Configuration Mode (Continued)

Configuring global parameters:

Enter host name [Router]: R1

The enable secret is a password used to protect access to privileged EXEC and configuration modes. This password, after entered, becomes encrypted in the configuration. Enter enable secret: cisco The enable password is used when you do not specify an enable secret password, with some older software versions, and some boot images. Enter enable password: fred The virtual terminal password is used to protect access to the router over a network interface. Enter virtual terminal password: barney Configure SNMP Network Management? [yes]: no Configure bridging? [no]: Configure DECnet? [no]: Configure AppleTalk? [no]: Configure IPX? [no]: Configure IP? [yes]: Configure IGRP routing? [yes]: Your IGRP autonomous system number [1]: Configuring interface parameters:

Do you want to configure Ethernet0 interface? [yes]: Configure IP on this interface? [yes]: IP address for this interface: 172.16.1.1

Subnet mask for this interface [255.255.0.0] : 255.255.255.0 Class B network is 172.16.0.0, 24 subnet bits; mask is /24 Do you want to configure Serial0 interface? [yes]:

Configure IP on this interface? [yes]: Configure IP unnumbered on this interface? [no]: IP address for this interface: 172.16.12.1

Subnet mask for this interface [255.255.0.0] : 255.255.255.0 Class B network is 172.16.0.0, 24 subnet bits; mask is /24 Do you want to configure Serial1 interface? [yes]: Configure IP on this interface? [yes]: Configure IP unnumbered on this interface? [no]: IP address for this interface: 172.16.13.1

Subnet mask for this interface [255.255.0.0] : 255.255.255.0 Class B network is 172.16.0.0, 24 subnet bits; mask is /24

The following configuration command script was created:

hostname R1

enable secret 5 $1$VOLh$pkIe0Xjx2sgjgZ/Y6Gt1s. enable password fred

Example 7-5 Router Setup Configuration Mode (Continued)

line vty 0 4 password barney no snmp-server !

no bridge 1 no decnet routing no appletalk routing no ipx routing ip routing !

interface Ethernet0 ip address 172.16.1.1 255.255.255.0 no mop enabled !

interface Serial0

ip address 172.16.12.1 255.255.255.0 no mop enabled !

interface Serial1

ip address 172.16.13.1 255.255.255.0 no mop enabled dialer-list 1 protocol ip permit dialer-list 1 protocol ipx permit !

router igrp 1 redistribute connected network 172.16.0.0 !

[0] Go to the IOS command prompt without saving this config.

[1] Return back to the setup without saving this config.

[2] Save this configuration to nvram and exit.

Enter your selection [2]: 2 Building configuration...

[OK]Use the enabled mode 'configure' command to modify this configuration. Press RETURN to get started!

Setup behaves like Example 7-5 illustrates, whether setup was reached by booting with an empty NVRAM or whether the setup privileged exec command was used. First, the router asks whether you want to enter the initial configuration dialog. Answering y or yes puts you in setup mode.

When you are finished with setup, you select one of three options for what to do next. Option 2 tells the router to save the configuration to NVRAM and exit; this option is used in Example 7-5. The router places the config in both NVRAM and RAM. This is the only operation in IOS that changes both configuration files to include the same contents based on a single action by the user. Options 0 and 1 tell the router to ignore the configuration that you just entered and to either exit to the command prompt (option 0) or start over again with setup (option 1). You can also abort the setup process before answering all the questions, and get to a CLI prompt by pressing CNTL-C.

0 0

Post a comment