CCNA 3 - Managing Cisco Devices

By Sheldon L Published at 2020-05-13 Updated at 2020-05-13


Managing the Configuration Register

        Console line speed (0x0600–0x1000)
         |    |                  |
15 14 13 12   11 10 9  8   7  6  5  4    3  2  1  0
0  0  1  0    0  0  0  1   0  0  0  0    0  0  1  0
|  |  |          |     |   |  |         |          |
|  |  |          |     |   |  |          Boot field (0x0000 - 0x000F)
|  |  |          |     |   |  Ignore NVRAM contents (0x0040)
|  |  |          |     |   OEM bit enabled (0x0060)
|  |  |          |     Break disabled (0x0101)
|  |  |          IP broadcast with all zeros (0x0400)
|  |  Boot default ROM software if network boot fails (0x2000)
|  IP broadcasts do not have net numbers (0x4000)
Enable diagnostic messages and ignore NVRAM contents (0x6000)

Boot Field

! Checking the Current Configuration Register Value
Router> sh version

! To change the confi guration register
Router(config)# config-register 0x2142
Router(config)# do sh ver

! Boot System
Router(config)# boot ?
bootstrap Bootstrap image file
config Configuration file
host Router-specific config file
network Network-wide config file
system System image file

! All boot options
Router(config)# boot system ?
WORD TFTP filename or URL
flash Boot from flash memory
ftp Boot from a server via ftp
mop Boot from a Decnet MOP server
rcp Boot from a server via rcp
rom Boot from rom
tftp Boot from a tftp server

! Boot from flash
Router(config)# boot system flash c2600nm-advsecurityk9-mz.151-4.M6.bin

! Boot from tftp
Router(config)# boot system tftp ?
WORD System image filename
Router(config)# boot system tftp c2600nm-advsecurityk9-mz.151-4.M6.bin ?
Hostname or A.B.C.D Address from which to download the file
Router(config)# boot system tftp c2600nm-advsecurityk9-mz.151-4.M6.bin 1.1.1.2

! As your last recommended fallback option, boot from rom
Router(config)# boot system rom

! Try to boot from the TFTP server if flash fails.
! The mini-IOS will load after six attempts of trying to locate the TFTP server.
Router(config)# do show run | include boot system
boot system flash c2600nm-advsecurityk9-mz.151-4.M6.bin
boot system tftp c2600nm-advsecurityk9-mz.151-4.M6.bin 1.1.1.2
boot system rom

Recovering Passwords (Ignore NVRAM contents)

Backing Up and Restoring the Cisco IOS

Backing Up the Cisco IOS

Router# ping 1.1.1.2

Router# copy flash tftp
Source filename []?c2600nm-advsecurityk9-mz.151-4.M6.bin
Address or name of remote host []?1.1.1.2
Destination filename [c2600nm-advsecurityk9-mz.151-4.M6.bin]?[enter]

Restoring or Upgrading the Cisco Router IOS

! It’s a good idea to use something other than TFTP
! because it’s unreliable and can only transfer smaller files
Corp#copy ?
/erase Erase destination file system.
/error Allow to copy error file.
/noverify Don't verify image signature before reload.
/verify Verify image signature before reload.
archive: Copy from archive: file system
cns: Copy from cns: file system
flash: Copy from flash: file system
ftp: Copy from ftp: file system
http: Copy from http: file system
https: Copy from https: file system
null: Copy from null: file system
nvram: Copy from nvram: file system
rcp: Copy from rcp: file system
running-config Copy from current system configuration
scp: Copy from scp: file system
startup-config Copy from startup configuration
system: Copy from system: file system
tar: Copy from tar: file system
tftp: Copy from tftp: file system
tmpsys: Copy from tmpsys: file system
xmodem: Copy from xmodem: file system
ymodem: Copy from ymodem: file system

Router#copy tftp flash
Address or name of remote host []?1.1.1.2
Source filename []?c2600nm-advsecurityk9-mz.151-4.M6.bin
Destination filename [c2600nm-advsecurityk9-mz.151-4.M6.bin]?[enter]
rommon 1 > tftpdnld
Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.
usage: tftpdnld [-hr]
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
"ctrl-c" or "break" stops the transfer before flash erase begins.
The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch
The following variables are OPTIONAL:
[unneeded output cut]

rommon 2 >set IP_Address:1.1.1.1
rommon 3 >set IP_SUBNET_MASK:255.0.0.0
rommon 4 >set DEFAULT_GATEWAY:1.1.1.2
rommon 5 >set TFTP_SERVER:1.1.1.2
rommon 6 >set TFTP_FILE: flash:c2600nm-advipservicesk9-mz.124-12.bin
rommon 7 >tftpdnld

Using the Cisco IOS File System (Cisco IFS)

dir
dir usbflash0:

copy [sorce] [dest]

more [file]
show [file|dir]
show flash
show file info [file]

delete [file]

erase
format

cd [dir]
pwd

mkdir [dir]
rmdir [dir]

Using the Cisco IFS to Upgrade an IOS

R1# pwd
flash:

R1# dir
Directory of flash:/
1 -rw- 13938482 Dec 20 2006 19:56:16 +00:00 c1641-ipbase-
mz.124-1c.bin
2 -rw- 1621 Dec 20 2006 20:11:24 +00:00 sdmconfig-16xx.cfg
3 -rw- 4834464 Dec 20 2006 20:12:00 +00:00 sdm.tar
4 -rw- 633024 Dec 20 2006 20:12:24 +00:00 es.tar
[Unimportant...]

R1# show file info flash:c1641-ipbase-mz.124-1c.bin
flash:c1641-ipbase-mz.124-1c.bin:
type is image (elf) []
file size is 13938482 bytes, run size is 14103140 bytes
Runnable image, entry point 0x6000F000, run from ram

! With a file that size, we’ll use the delete command
R1# delete flash:c1641-ipbase-mz.124-1c.bin
Delete filename [c1641-ipbase-mz.124-1c.bin]?[enter]
Delete flash:c1641-ipbase-mz.124-1c.bin? [confirm][enter]
R1# sh flash
[Unimportant...]
R1# sh file info flash:c1641-ipbase-mz.124-1c.bin
%Error opening flash:c1641-ipbase-mz.124-1c.bin (File not found)

! We’ll add the new file with the copy
R1# copy tftp://1.1.1.2/c1641-advipservicesk9-mz.124-12.bin/ flash:/c1641-advipservicesk9-mz.124-12.bin

R1# sh flash
R1# sh file information flash:c1641-advipservicesk9-mz.124-12.bin
flash:c1641-advipservicesk9-mz.124-12.bin:
type is image (elf) []
file size is 22103052 bytes, run size is 22266836 bytes
Runnable image, entry point 0x6000F000, run from ram

! Remember that the IOS is expanded into RAM when the router boots
! so the new IOS will not run until you reload the router

Licensing

Router# sh license udi
Device# PID SN UDI
-----------------------------------------------------------------------
*0 CISCO2901/K9 FTX1641Y08J CISCO2901/K9:FTX1641Y08J
Router# license install ?
Router# license install flash:FTX1626636P_201302111432454160.lic
Router# reload

Right-To-Use Licenses (Evaluation Licenses)

Router(config)#license boot module c2900 technology-package securityk9
Router# reload

Router# show license
Router# sh license feature
Router# show version

Backing Up and Uninstalling the License

! Save your current license to flash
Router# license save flash:Todd_License.lic
! Restore
Router# license install

! Uninstall licence
Router#license boot module c2900 technology-package securityk9 disable
! Clear licence
Router# license clear securityk9
Router# config t
Router(config)# no license boot module c2900 technology-package securityk9 disable
Router(config)# exit
Router# reload