📜 ⬆️ ⬇️

Update iOS

Sooner or later, we all face the fact that we need to upgrade iOS. If you have never done this, but you have to do it, then this post is for you!

For the update we need:
1. TFTP server
2. Fresh iOS
3. Access to the router console
As a TFTP server, you can use Tftpd32 . In addition to the TFTP server, it performs the TFTP client, DHCP server, Syslog server functions. Its settings are simple - you need to specify the folder root folder with files and the interface on which our TFTP server will respond.
Fresh IOS is taken on cisco.com. True, you first need to pay SmartNet (it costs different money for different pieces of hardware). You can go the other way and visit one of the many torrent trackers to find the one you need.
So, TFTP is configured, IOS is put in the appropriate folder. We start the console client (I use putty) and log in to the router.
The first thing you need to do is whether our TFTP works; to do this, simply copy our current configuration to it:
  RTR001 # copy run tftp
 Address or name of remote host []?  10.10.10.10
 Destination filename [rtr001-confg]?
 !!
 28345 bytes copied in 1.980 secs (14316 bytes / sec)
 RTR001 # 

In the TFTP logs, we see approximately the following:
  Connection received from 10.10.10.1 on port 59968 [30/09 12: 57: 15.775]
 Write request for file <rtr001-confg>.  Mode octet [30/09 12: 57: 15.775]
 Using local port 4706 [30/09 12: 57: 15.791]
 <rtr001-confg>: rcvd 56 blks, 28345 bytes in 0 s.  0 blk resent [30/09 12: 57: 15.978] 

And on the disk, we will have the file rtr001-confg.
Immediately after checking the link, find out how much space we have on the flash drive:
  RTR001 # sho flash:
 - # - --length-- ----- date / time ------ path
 1 27624324 Apr 21 2009 03:48:56 c2801-ipbasek9-mz.124-24.T.bin
 2 2746 Apr 29 2008 13:22:40 sdmconfig-2801.cfg
 3 931840 Apr 29 2008 13:23:02 es.tar
 4 1505280 Apr 29 2008 13:23:24 common.tar
 5 1038 Apr 29 2008 13:23:42 home.shtml
 6 112640 Apr 29 2008 13:24:00 home.tar
 7 1697952 Apr 29 2008 13:24:32 securedesktop-ios-3.1.1.45-k9.pkg
 8 415956 Apr 29 2008 13:24:58 sslclient-win-1.1.4.176.pkg

 31686656 bytes available (32309248 bytes used)

 RTR001 # 

In this example, there is enough space to fill in a new ipbase IOS, but this is not always the case, quite often there is not enough space on the flash drive, as in the following example:
  RTR002 # sho fla
 - # - --length-- ----- date / time ------ path
 1 869 Apr 01 2009 11:52:28 XMLDefaultCIPC.cnf.xml
 2 281506 Mar 20 2008 09:23:50 ATA030100SCCP040211A.zup
 3 638 Mar 20 2008 09:23:50 CME_GUI_README.TXT
 4 331101 Mar 20 2008 09:23:50 CP7902060000SCCP050124A.sbin
 5 338897 Mar 20 2008 09:23:52 CP7905060000SCCP050124A.sbin
 6 338481 Mar 20 2008 09:23:54 CP7905060000SCCP050124A.zup
 7 340247 Mar 20 2008 09:23:54 CP7912060000SCCP050124A.sbin
 8 1602 Mar 20 2008 09:23:54 CiscoLogo.gif
 9 953 Mar 20 2008 09:23:54 Delete.gif
 10 128792 Mar 20 2008 09:23:56 P00307020200.bin
 11 458 Mar 20 2008 09:23:56 P00307020200.loads
 12 680394 Mar 20 2008 09:23:58 P00307020200.sb2
 13 129196 Mar 20 2008 09:23:58 P00307020200.sbn
 14 333822 Mar 20 2008 09:24:00 P00403020214.bin
 15 1347 Mar 20 2008 09:24:00 Plus.gif
 16 47904 Mar 20 2008 09:24:00 S00103020002.bin
 17 49169 Mar 20 2008 09:24:00 S00104000100.sbn
 18 174 Mar 20 2008 09:24:02 Tab.gif
 19 4448 Mar 20 2008 09:24:02 admin_user.html
 20 656913 Mar 20 2008 09:24:04 admin_user.js
 21 1045952 Mar 20 2008 09:24:08 cmterm_7920.4.0-02-00.bin
 22 16948 Mar 20 2008 09:24:08 dom.js
 23 864 Mar 20 2008 09:24:08 downarrow
 24 6315 Mar 20 2008 09:24:10 ephone_admin.html
 25 4658 Mar 20 2008 09:24:10 logohome.gif
 26 496521 Mar 20 2008 09:24:12 music-on-hold.au
 27 3831 Mar 20 2008 09:24:12 normal_user.html
 28 78819 Mar 20 2008 09:24:12 normal_user.js
 29 843 Mar 20 2008 09:24:12 sxiconad.gif
 30 2453 Mar 20 2008 09:24:12 telephony_service.html
 31 870 Mar 20 2008 09:24:12 uparrow
 32 10230 Mar 20 2008 09:24:12 xml-test.html
 33 3389 Mar 20 2008 09:24:12 xml.template
 34 1823 Mar 20 2008 09:25:30 sdmconfig-2811.cfg
 35 6036480 Mar 20 2008 09:26:24 sdm.tar
 36 861696 Mar 20 2008 09:26:48 es.tar
 37 1164288 Mar 20 2008 09:27:20 common.tar
 38 1038 Mar 20 2008 09:27:40 home.shtml
 39 113152 Mar 20 2008 09:28:02 home.tar
 40 1697952 Mar 20 2008 09:28:36 securedesktop-ios-3.1.1.45-k9.pkg
 41 416354 Mar 20 2008 09:29:02 sslclient-win-1.1.3.173.pkg
 42 61 Apr 02 2009 08:11:56 SEP000ea6a11782.cnf.xml
 43 61 Apr 01 2009 11:48:58 SEP0014f2721179.cnf.xml
 44 11181 May 18 2009 05:39:36 conf180509.txt
 45 59846440 Sep 14 2009 08:08:38 c2800nm-adventerprisek9_mz.124-24.T.bin

 54026240 bytes available (75726848 bytes used)

 RTR002 # 

And in order to fill in the new adventerprisek9 there, there is not enough space for iOS. What to do? There are 2 options:
- copy the old IOS to TFTP, delete from the router, fill in the new
or
- remove from the router and upload a new one.
Why keep the old? It happens that under the new edition of IOS something may not work, and you will have to roll back :(
What do you do you decide for yourself. I do this - if this is my local router to which in case of anything, I can choose point 2, if this is a remote site, then point 2 is still depending on the channel width :)

Delete old ios:
  RTR002 # delete c2800nm-adventerprisek9_mz.124-24.T.bin
 Delete filename [c2800nm-adventerprisek9_mz.124-24.T.bin]?
 Delete flash: /c2800nm-adventerprisek9_mz.124-24.T.bin?  [confirm]
 RTR002 # 

File deleted, fill in new:
  RTR002 # copy tftp flash:
 Address or name of remote host []?  10.10.10.10
 Source filename []?  ios / c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin
 Destination filename [c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin]?
 Accessing tftp: //10.10.10.10/ios/c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin ...
 Loading ios / c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin from 10.10.10.10 (via FastEthernet0 / 1.10): !!!!!!!!!!!!!!!!!!!!!!
 [OK - 59971380 bytes] 

IOS on a flash drive, but no need to hurry. We need to check MD5, for this we use the command:
  RTR002 # verify / md5 flash: c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin
 .................................................. .................................................. ..........
 [part of the line is deleted]
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 .................................................. .................................................. ......... Done!
 verify / md5 (flash: c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin) = e8fab98a72c1516538da7686f8404fcf

 RTR001 # 

And if the MD5 matches (the correct MD5 is shown when downloading the file from cisco.com) you can complete the job started :)
It remains only to change the boot command with
boot system flash: c2800nm-adventerprisek9_mz.124-24.T.bin
on
boot system flash: c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin
and send the router to reboot
  RTR002 # reload
 Verifying file integrity of flash: /c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin ................................ ................
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 [part of the line is deleted]
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 .................................................. .................................................. ..........
 Done!
 Embedded Hash MD5: 564526F4D154F7BEC08F89309A633AE9
 Computed Hash MD5: 564526F4D154F7BEC08F89309A633AE9
 CCO Hash MD5: E8FAB98A72C1516538DA7686F8404FCF
 Signature Verified

 Proceed with reload?  [confirm] 


After the reboot, it remains to log in and check if everything is fine:
  RTR002 # sho ver |  inc bin
 System image file is "flash: c2800nm-adventerprisek9_ivs_mz.124-24.T1.bin"
 RTR002 # 

')

Source: https://habr.com/ru/post/71058/


All Articles