CCNA 7.5.a: Cisco IOS upgrades and recovery (SCP, FTP, TFTP, and MD5 verify)

Overview:

TFTP, FTP and SCP are protocols that can be used to upgrade and recover Cisco IOS images.

Study Notes:

  • Several protocols are available to copy the Cisco IOS image into a Cisco router.
  • The most commonly used protocol is TFTP
  • Other protocols include SCP and FTP
  • MD5 is a way to verify the integrity of an IOS image by using a hash

 

Install or Upgrade a Cisco IOS image via TFTP

    • Select a Cisco IOS Software Image
      • Ensure the router has sufficient memory for the new image
      • Ensure the new IOS supports all the interfaces and modules on the router
      • Ensure the new IOS supports all the features of the current IOS
    • Download the Cisco IOS Software Image to the TFTP Server
    • Identify the File System to Copy the Image
      • Use the command “show file system”
      • The type will either be flash or disk
      • Use the command “dir flash:” to view the contents and free space
    • Prepare for the Upgrade
      • If the router has enough memory, keep the old IOS image on the router and upload the new IOS image
      • If the router doesn’t have enough memory for both IOS images, save a copy of the existing IOS image to the TFTP server
copy flash: tftp:
      • Save the running configuration on the router to the startup-configuration.
      • Backup the startup-configuration to the TFTP server
copy startup-config tftp:

 

  • Verify that the TFTP Server has IP Connectivity to the Router by pinging
  • Copy the IOS Image to the Router
copy tftp: flash:

 

  • Verify the Cisco IOS Image in the File System with MD5
dir flash:
verify flash:<IOS-image>

 

  • Verify the Configuration Register
config register 0x2102

 

  • Verify the Boot Variable
show run | include boot
config t
  no boot system
  boot system flash:<IOS-image> show run | include boot

 

  • Save the Configuration and Reload the Router
copy run start
reload

 

  • Verify the Cisco IOS Upgrade
show version

 

Recover a Cisco IOS image via TFTP

Perhaps your router didn’t have enough memory to store the old IOS image and the new IOS image.  You ran through the procedures above and saved the old IOS image to the TFTP server. Then you deleted the old IOS image from flash: to make room for the new IOS image.  You ran through the rest of the upgrade process and rebooted the router. Only the new IOS image is not booting properly and the old IOS image is no longer in the file system.  Follow these steps to recover a Cisco IOS image via TFTP

  • Without a valid IOS image, the router will boot into ROMMON mode
  • Set the environment variables for the router and the TFTP server
rommon 1> IP_ADDRESS=192.168.1.1
rommon 2> IP_SUBNET_MASK=255.255.255.0
rommon 3> DEFAULT_GATEWAY=192.168.1.2
rommon 4> TFTP_SERVER=192.168.1.2
rommon 5> TFTP_FILE=<old-IOS-image>

 

  • Tell the router to download the IOS image and run it
rommon 6> tftpdnld -r

 

  • After downloading the IOS, the router will load it into memory and either run the startup-configuration if one exists or prompt you for initial configuration

 

Upgrade a Cisco IOS image via SCP

  • SCP is based on SSH.  The SCP server will need to have port 22 open and have a username and password set.  Follow the same steps as TFTP to copy the IOS image from the SCP server to the router using this command on the router:
copy scp://<user>:<password>@<serverIP>/<filename> flash0://<filename>

 

Upgrade a Cisco IOS image via FTP

  • The router will need to be configured with an FTP username and password to login to the FTP server.
ip ftp username <username>
ip ftp password <password>

 

  • Follow the same steps as TFTP to copy the IOS image from the FTP server to the router using this command on the router:
copy ftp: flash:




PacketTracer Lab: CCNA-7.5.a-Cisco-IOS-upgrades-and-recovery-SCP-FTP-TFTP-and-MD5-verify.pkt

Subscribe Now for access to the labs!

 

Leave a Reply
s2Member®
Built by TrailSix