Thursday 8 December 2016

upgrade your IOS in cisco, FTP, verify, and boot variable

Today we will comment about something simple that sometime we don't remember and we have to go back to the reference.

This is one small example we use a  CAT4506e, where I was unable to setup the ssh , because it was not available in the IOs originally.

So in this example we will upgrade the IOS using a ftp server that we have access using the inband connection, we will see , how to check the image that we just download , then how to tell the system to use that image. 
setup of the ftp in the CLI

cisco#configt
cisco(config)#ip ftp username lab
cisco(config)#ip ftp password 7 060D0E2F595AC
cisco(config )#end

then we use 
 #copy ftp:/IOS/filename bootflash: <cr>
the system will ask for ip of the server  copy ip of the server
ask for name of the destination file <the same propose

 see example
cisco(config)#   
cisco#
*Dec  8 14:09:55.873 UTC: %SYS-5-CONFIG_I: Configured from console by console
cisco#$OS/cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin bootflash:  
Address or name of remote host []? 172.19.249.117
Destination filename [cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin]?
Accessing ftp://172.19.249.117//IOS/cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin...
Loading /IOS/cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[OK - 126060564/4096 bytes]

126060564 bytes copied in 148.648 secs (848047 bytes/sec)
cisco#
cisco#verify /md5 bootflash: (filename )
cisco#$ bootflash:cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin   
........................................................................................................................................................................
...........................................................................................................................................................................
............................................................................................................................................................................
...........................................................................................................................................................................
............................................................................................................................................................................
..........................................................................................................................................................................
.........................................................................................................................................................................
Done!
verify /md5 (bootflash:cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin) = c5a3c8c690150799089aa1bd024c6ac8
this number can be obtained to compare from cisco, when you buy the license , sometime if you check in google will appear .

 then we will have to check what is the boot variable


before was 

BOOT variable = ;bootflash:cat4500e-universal.SPA.03.08.01.E.152-4.E1.bin,1;
CONFIG_FILE variable does not exist
BOOTLDR variable does not exist
Configuration register is 0x2102

cisco#
after we enter 
 cisco#(config )boot system flash bootflash:cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin
config # 

show bootvar 
 BOOT variable = bootflash:cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin,1;bootflash:cat4500e-universal.SPA.03.08.01.E.152-4.E1.bin,1;
CONFIG_FILE variable does not exist
BOOTLDR variable does not exist
Configuration register is 0x2102
we will see two image 

we have to tell the system what will be the first 
to be sure 

do sh run 
 we will see 
in the newer IOS when there is multiple option to boot 
we will see something like this 

boot-start-marker
boot system flash bootflash:cat4500e-universalk9.SPA.03.04.04.SG.151-2.SG4.bin
boot system flash bootflash:cat4500e-universal.SPA.03.08.01.E.152-4.E1.bin
boot-end-marker

also remember 
with sh version to check the register 
should be 0x2102

 for more information please check a good reference 
https://www.safaribooksonline.com/library/view/cisco-ios-cookbook/0596527225/ch01s08.html
and cisco  as usually 

regards