Difference between revisions of "Upgrading Cisco switch IOS using tftp server"

From Notes_Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb self="Upgrading Cisco switch IOS using tftp server">Switch configuration notes|Switch configuration notes</yambe:breadcrumb>
[[Main Page|Home]] > [[Switch configuration notes]] > [[Upgrading Cisco switch IOS using tftp server]]
=Upgrading switch IOS from telnet and 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.
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.)
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:
#:<pre>
#:: 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---
#:</pre>
#* Make sure ISO copied to all switch in stack
# Verify coppied file.
#:<pre>
#:: verify /md5 bootflash:<Coppied File Name>
#:</pre>
# Validate the Image file on Flash
#:<pre>
#:: show bootflash:
#:</pre>
#* Use '<tt>show flash-2:</tt>' command in stack to check the IOS
# Install the new image
#:<pre>
#:: 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
#:</pre>
# Reload the switch
#:<pre>
#:: reload
#:: System configuration has been modified. Save? [yes/no]: yes
#:</pre>
# After reboot Verify the IOS Version
#:<pre>
#:: show version
#:</pre>
==Older steps for Catalyst 2950 switch==


To upgrade IOS from telnet and tftp
To upgrade IOS from telnet and tftp
Line 16: Line 59:




<yambe:breadcrumb self="Upgrading Cisco switch IOS using tftp server">Switch configuration notes|Switch configuration notes</yambe:breadcrumb>
=Upgrading IOS by booting into install mode=
 
Refer:
* https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9500/software/release/17-6/release_notes/ol-17-6-9500.html#task_p3r_f21_jmb
 
By booting into install mode using '<tt>boot flash:packages.conf . </tt>' we can upgrade IOS using:
# Clean Up
#:<pre>
#:: install remove inactive
#:</pre>
# Copy new image to flash
#:<pre>
#:: copy tftp: flash:
#:: dir flash  #Use this command to confirm that the image has been successfully copied to flash.
#:</pre>
# Set boot variable.  Use this command to set the boot variable to flash:packages.conf .
#:<pre>
#:: config t
#:: no boot sys
#:: boot system flash:packages.conf
#:: exit
#:: write memory
#:: show boot system
#:</pre>
#* The output should display BOOT variable = flash:packages.conf .
# Software install image to flash
#:<pre>
#:: install add file activate commit
#:</pre>
#:Example
#::<pre>
#::: install add file flash:cat9k_iosxe.17.06.03.SPA.bin activate commit
#::</pre>
# 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.
#:<pre>
#:: dir flash:
#:</pre>
 
 
 
 
 
[[Main Page|Home]] > [[Switch configuration notes]] > [[Upgrading Cisco switch IOS using tftp server]]

Latest revision as of 05:29, 5 July 2022

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