Upgrading Cisco switch IOS using tftp server
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
- Backup the present running configuration.
- Putty - To connect to the switch VTY/Console
- 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
- Verify coppied file.
- verify /md5 bootflash:<Coppied File Name>
- Validate the Image file on Flash
- show bootflash:
- Use 'show flash-2:' command in stack to check the IOS
- 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
- Reload the switch
- reload
- System configuration has been modified. Save? [yes/no]: yes
- After reboot Verify the IOS Version
- show version
Older steps for Catalyst 2950 switch
To upgrade IOS from telnet and tftp
- First delete html directory structure
- If still less space is left then take backup of old IOS image and delete it.
- Copy new IOS image from tftp server using 'copy tftp: flash:
- Then give command similar to 'boot system flash:/c3560-ipbasek9-mz.122-40.SE.bin' to boot from new bin image.
- 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:
- Clean Up
- install remove inactive
- Copy new image to flash
- copy tftp: flash:
- dir flash #Use this command to confirm that the image has been successfully copied to flash.
- 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 .
- Software install image to flash
- install add file activate commit
- Example
- install add file flash:cat9k_iosxe.17.06.03.SPA.bin activate commit
- 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