Cisco CCENT Advanced IOS Management Part I


In this chapter, you will learn how to manage Cisco routers on an internetwork.

The Internetwork Operating System (IOS) and configuration files reside in different locations in a Cisco device, and it’s important to understand where these files are located and how they work.

You’ll also learn about the main components of a router, the router boot sequence, and the configuration register.


Cisco CCENT Backing up the Cisco IOS and Config


This slide lists the various commands that can be used to both backup and restore the IOS and configuration of a device.


Cisco CCENT Verifying IOS Image


Before you upgrade or restore a Cisco IOS, you really should copy the existing file to a TFTP host as a backup just in case the new image crashes and burns.

And you can use any TFTP host to accomplish this. By default, the flash memory in a router is used to store the Cisco IOS.

But before you backup an IOS image to a network server, you’ve got to do these three things:

-Make sure you can access the network server.

-Ensure the network server has adequate space for the code image.

-Verify the file naming and path requirement

Cisco CCENT Copy IOS to TFTP server


To back up the Cisco IOS to a TFTP host, you use the “copy flash tftp” command.  It’s a straightforward command that requires only the source filename and the IP address of the TFTP host.

The key to success in this backup routine is to make sure that you’ve got good, solid connectivity to the TFTP host.  Check this by pinging the device from the router prompt.

Backing up IOS to the TFTP server is a good practice since in many cases, the IOS will need to be erased to support an upgrade.  If problems are incurred with the upgrade, having the image on a TFTP server will make restoring the image much easier than having to locate and download it again.

The full syntax is:

copy flash-url tftp:


You can also use ftp versus tftp using the following syntax:

copy flash-filesystem:filename ftp:[[[//username[:password]@]


Cisco CCENT Copy TFTP Flash


What happens if you  need to restore the Cisco IOS to flash memory to replace an original file that has been damaged, or if you want to upgrade the IOS?

No worries—you just download the file from a TFTP host to flash memory by using the “copy tftp flash” command.  This command requires the IP address of the TFTP host and the name of the file you want to download.

But before you begin, make sure that the file you want to place in flash memory is in the default TFTP directory on your host since when you issue the command, TFTP won’t not ask you where the file is.

In many cases, files will end in .bin, and some operating systems like Windows will truncate or hide the file extension.  You will still need to specify this when prompted during the download.

If you don’t have enough room in flash memory to store both copies, or if the flash memory is new and no file has been written to flash memory before, the router will ask to erase the contents of flash memory before writing the new file into flash memory. Make sure you have a copy of the image file somewhere on your TFTP server in case restore becomes necessary.

The full syntax of the command is as follows:

copy tftp:[[[//location]/directory]/filename] flash-filesystem:[filename]

You can also use ftp versus tftp using the following command:

copy ftp:[[[//[username[:password]@]location]/directory]/filename]


Cisco CCENT Backing up the configuration


To copy the router’s configuration from a router to a TFTP host, you can use either the “copy running-config tftp” or the “copy startup-config tftp” command.

Either one will back up the router configuration that’s currently running in DRAM, or that’s stored in NVRAM.  Note: In order to save off the most current configuration, make sure the startup file matches the running configuration if you plan on utilizing the “copy startup-config tftp” command.

If you’ve changed your router’s running-config and want to restore the configuration to the version in startup-config, the easiest way to do this is to use the “copy startup-config running-config” command (“copy start run” for short).

Note: When you copy or paste a configuration into RAM, the interfaces are shutdown by default.  This is especially important if you are configuring the router for the first time, and will be shipping it out to a location where you will not have access to it unless the interface is up.  To prevent this, insert “no shutdown” commands under each interface needed to at least obtain access to the device.

Cisco CCENT Fallback


Cisco routers, by default, load the IOS from Flash memory.  However, what happens if the flash memory fails or the file in flash memory becomes corrupted?

By default, the Cisco routers will look for a TFTP server to load an IOS from, and if that fails, some routers, depending on the model, will load a mini-ios from ROM so that an IOS can be restored into flash memory.

Command syntax and parameter descriptions:

boot system flash [flash-fs:] [partition-number:] [filename]

flash-fs: (Optional) Flash file system containing the system image to load at startup. The colon is required.

partition-number: (Optional) Number of the flash memory partition that contains the system image to boot, specified by the optional filename argument. If you do not specify a filename, the router loads the first valid file in the specified partition of flash memory. This argument is only valid on routers that can be partitioned.

filename (Optional when used with the boot system flash command) Name of the system image to load at startup. This argument is case sensitive. If you do not specify a filename, the router loads the first valid file.

Command syntax is similar for boot system tftp and boot system rom commands.

Cisco CCENT ROM Monitor Mode


In the above example, the router was rebooted and the ctrl-break key stroke was pressed, which took the router into ROM monitor mode.

You would do this to provide password recovery by changing the configuration register to 0x2142, as shown above.

When you have completed the password recovery, set the configuration register back to 0x2102 for normal operation.

The default for a router is to look in flash memory for the IOS, NVRAM for the startup-config

If this fails, the default is to look in flash, then look for a TFTP server on a network, then run a mini-ios from ROM.

If all this fails, then the router will load ROM monitor mode.

Cisco CCENT Flash Problem…


ROMMON mode has limited features of the full blown IOS image.

Cisco CCENT Auto-Install


The auto-install “feature” is annoying at best.  If a router is powered up, has no configuration and sees Carrier Detect on an interface, it will look for an IP address by using ARP on a LAN and/or SLARP (Serial Line ARP) on a serial interface.

You can disable this feature with the “no service config” command and the “no boot network” command from global configuration mode.

Cisco CCENT Making Your Router a TFTP Server


Now this is a great feature of a Cisco router!  If you do not have a laptop or other host that can provide TFTP services, you can make a router a TFTP server with the global configuration command “tftp-server flash:”.  You will then need to make sure the file (i.e. IOS image) is available on the router you configured as a tftp server.  It is as simple as that, you can now copy the image from the router configured as a tftp server allowing upgrade or downgrade of your other router.

Cisco CCENT Dynamic Host Configuration Protocol


Dynamic Host Control Protocol (DHCP) is a way to administer network parameter assignment at a single DHCP server, or a group of such servers arranged in a fault-tolerant manner accomplished with DHCP. Even in a network which has a few machines, DHCP is useful, because a machine can be added by the local network with little effort.

Cisco CCENT Dynamic Host Configuration Protocol


DHCP is used to assign IP addresses automatically and to set TCP/IP stack configuration parameters, such as the subnet mask, default router, and Domain Name System (DNS) servers. DHCP is also used to provide other configuration information as necessary, including the length of time the address has been allocated to the host. DHCP consists of two components: a protocol for delivering host-specific configuration parameters from a DHCP server to a host, and a mechanism for allocating network addresses to hosts.

Using DHCP, a host can obtain an IP address quickly and dynamically. All that is required is a defined range of IP addresses on a DHCP server. As hosts come online, they contact the DHCP server and request address information. The DHCP server selects an address and allocates it to that host. The address is only leased to the host, so the host will periodically contact the DHCP server to extend the lease. This lease mechanism ensures that hosts that have been moved or are switched off for extended periods of time do not hold on to addresses that they do not use. The addresses are returned to the address pool by the DHCP server, to be reallocated as necessary.

Cisco CCENT Dynamic Host Configuration Protocol


DHCP service is enabled on a Cisco router by default.

An external DHCP database can be configured.

Cisco CCENT Dynamic Host Configuration Protocol


You can specify addresses within a range to exclude when assigning DHCP addresses.


Cisco CCENT Dynamic Host Configuration Protocol


You can specify the subnet that DHCP uses to assign addresses.

The “domain-name domain” command defines the domain name to assign to the client.

The “dns-server” command defines the DNS server to assign to the client.

Cisco CCENT Dynamic Host Configuration Protocol


Assigns Microsoft NETBIOS information via DHCP.

Cisco CCENT Dynamic Host Configuration Protocol


Defines the “default router” and duration of the DHCP lease.


Cisco CCENT Making Your Router a DHCP Server (Example)


This is another great Cisco router feature.

It is important that you understand that the router maps the pool to the interface which has an IP address in the same subnet as the pool.

In the example above, the Fa1/1 interface must be assigned the IP address or the pool will not hand out IP addresses to clients.

Note: The IP address of is excluded from the pool since it is assigned to the router.  Additional addresses can be excluded if they are specifically assigned to other devices.

Note: The network, default gateway and DNS server is defined as that information will be passed in the DHCP message to the host requesting to be assigned an address via DHCP.