Upgrading Cisco switch IOS using tftp server

From Notes_Wiki

Home > Switch configuration notes > Upgrading Cisco switch IOS using tftp server

Normally if the previous image of switch IOS has web interface (flash:/html directory present) then we can use Cisco Network Assistant(CNA) available freely from Cisco website to upgrade switch IOS safely.

But sometimes the web interface would not be there (either to save space or corrupted). Then we can use following method to upgrade switch IOS using telnet / console connection to switch and tftp server. (Note that switch must be connected to tftp server through network.)

Updates steps for Catalyst 9000 series switches

  1. Backup the present running configuration.
  2. Putty - To connect to the switch VTY/Console
  3. Copy IOS Image file to the switches using:
    copy ftp:<File Name> bootflash:<SameFile Name>
    # ---OR---
    dir usbflash0: ---Copy New ISO File---
    copy usbflash0:< Paste File Name> bootflash:<Same File Name> ---Form USB Drive---
    • Make sure ISO copied to all switch in stack
  4. Verify coppied file.
    verify /md5 bootflash:<Coppied File Name>
  5. Validate the Image file on Flash
    show bootflash:
    • Use 'show flash-2:' command in stack to check the IOS
  6. Install the new image
    request platform software package install switch all file bootflash:<New ISO File Name> ---For all Switch in Stack---
    # ---OR---
    request platform software package install file bootflash:<New ISO File Name> ---For individual Switch in Stack---
    # ---OR---
    install add file bootflash:<New ISO File Name> activate commit
  7. Reload the switch
    reload
    System configuration has been modified. Save? [yes/no]: yes
  8. After reboot Verify the IOS Version
    show version



Older steps for Catalyst 2950 switch

To upgrade IOS from telnet and tftp

  1. First delete html directory structure
  2. If still less space is left then take backup of old IOS image and delete it.
  3. Copy new IOS image from tftp server using 'copy tftp: flash:
  4. Then give command similar to 'boot system flash:/c3560-ipbasek9-mz.122-40.SE.bin' to boot from new bin image.
  5. Give reload command to load new IOS

Information related to tftp server configuration is available at tftp server configuration


Upgrading IOS by booting into install mode

Refer:

By booting into install mode using 'boot flash:packages.conf . ' we can upgrade IOS using:

  1. Clean Up
    install remove inactive
  2. Copy new image to flash
    copy tftp: flash:
    dir flash #Use this command to confirm that the image has been successfully copied to flash.
  3. Set boot variable. Use this command to set the boot variable to flash:packages.conf .
    config t
    no boot sys
    boot system flash:packages.conf
    exit
    write memory
    show boot system
    • The output should display BOOT variable = flash:packages.conf .
  4. Software install image to flash
    install add file activate commit
    Example
    install add file flash:cat9k_iosxe.17.06.03.SPA.bin activate commit
  5. After the software has been successfully installed, use this command to verify that the flash partition has ten new .pkg files and two .conf files.
    dir flash:



Home > Switch configuration notes > Upgrading Cisco switch IOS using tftp server