在IOS-XE平台,开始引入install升级模式, 该模式也是IOS-XE平台出厂默认使用的模式
它将.bin文件分解成更小的.pkg文件,这些文件必须独立加载到内存中,这样可以使启动速度更快,内存利用率更高。
install模式升级大致分以下几个步骤:
1、前期准备:
1)到官网找到所需要的版本号,下载对应的.bin文件
2) clean up确保flash有足够的空间来安装image
Switch# request platform software package clean switch all
3) 通过FTP/TFTP 或者U盘将Bin文件上传到flash下
命令如下:switch# copy ftp/tftp/usbflash:cat9k_iosxe...bin flash:
note: 选用FTP或者TFTP时,建议设置sourinterface,ftp的用户名和密码
(config)#ip ftp source-interface x >>>>> 选择对应的接口或者SVI
(config)#ip tftp source-interface x >>>>> 选择对应的接口或者SVI
(config)#ip ftp username xxx >>>>> 用户名
(config)#ip ftp password yyy >>>>> 密码
4)进行MD5校验镜像文件的完整性,
switch#verify /md5 flash:cat9k_iosxe.xxx.SPA.bin
...........................................................................................................
...........................................................................................................
...........................................................................................................
...........................................................................................................
...........................................................................................................
...........................................................................................................
........................................................................Done!
verify /md5 (flash:cat9k_iosxe.17.06.04.SPA.bin) = dae85d113b3438d4f00e49ccdd1ec611 <<<<<<<<<< 与官网的MD5值进行比对
2、install 步骤
1)设置boot variable
a.boot system flash:packages.conf
Use this command to set the boot variable to flash:packages.conf .
Switch(config)# boot system flash:packages.conf
Switch(config)# exit
b.write memory
Switch# write memory
c.show boot system
Use this command to verify the boot variable is set to flash:packages.conf .
The output should display BOOT variable = flash:packages.conf .
Switch# show boot system
2) show boot确认路径是否正常:
#show boot
---------------------------
Switch 1
---------------------------
Current Boot Variables:
BOOT variable = flash:packages.conf; <<<<<<<<
Boot Variables on next reload:
BOOT variable = flash:packages.conf;
Manual Boot = no <<<<<<< 如果是yes,建议使用(config)#no boot manual 关闭
Enable Break = no
Boot Mode = DEVICE
iPXE Timeout = 0
3)安装image到flash,有两种方式可以install
a) IOS-XE 16.5.1a/16.6.1 升级命令
b) IOS-XE 16.6.2 以及之后的版本
request platform software package install
request platform 和install add都可以用
a. request platform 命令
Switch# request platform software package install switch all file flash:cat9k_iosxe.17.01.01.SPA.bin auto-copy
eg: stack环境下,开始install后会将bin文件copy到其他member switch中
--- Starting install local lock acquisition on switch 1 ---
Finished install local lock acquisition on switch 1
Expanding image file: flash:cat9k_iosxe.17.01.01.SPA.bin
[1]: Copying flash:cat9k_iosxe.17.01.01.SPA.bin from switch 1 to switch 2 3
[2 3]: Finished copying to switch 2 3
[1 2 3]: Expanding file
[1 2 3]: Finished expanding all-in-one software package in switch 1 2 3
SUCCESS: Finished expanding all-in-one software package.
[1 2 3]: Performing install
SUCCESS: install finished
...
[1 2 3]: Finished install in switch 1 2 3
SUCCESS: Finished install: Success on [1 2 3] <<<<<<
b. install 命令
Switch# install add file flash:cat9k_iosxe.16.12.03.SPA.bin activate commit
eg:stack环境下,开始install后会将bin文件copy到其他member switch中
Switch#$ file flash:cat9k_iosxe.16.12.03.SPA.bin activate commit
install_add_activate_commit: START
%INSTALL-5-INSTALL_START_INFO: R0/0: install_engine: Started install one-shot flash:cat9k_iosxe.16.12.03.SPA.bin
%INSTALL-5-INSTALL_START_INFO: Switch 1 R0/0: install_engine: Started install one-shot flash:cat9k_iosxe.16.12.03.SPA.bininstall_add_activate_commit: Adding PACKAGE
install_add_activate_commit: Checking whether new add is allowed ....
--- Starting initial file syncing ---
[1]: Copying flash:cat9k_iosxe.16.12.03.SPA.bin from switch 1 to switch 2 3
[2 3]: Finished copying to switch 2 switch 3
Info: Finished copying flash:cat9k_iosxe.16.12.03.SPA.bin to the selected switch(es)
Finished initial file syncing
...
This operation may require a reload of the system. Do you want to proceed? [y/n]y <<<<<<<选择yes后,安装成功后会进行重启
--- Starting Activate ---
Performing Activate on all members
...
Install will reload the system now!
SUCCESS: install_add_activate_commit <<<<<<<install成功将执行重启
4) 确认pkg文件是否正常
会同时存在新版本和旧版本的PKG文件,以及两个.conf文件
Switch# dir flash:*.pkg
Directory of flash:/*.pkg
Directory of flash:/
475140 -rw- 2012104 Jul 31 2019 09:52:41 -07:00 cat9k-cc_srdriver.16.05.01a.SPA.pkg
475141 -rw- 70333380 Jul 31 2019 09:52:44 -07:00 cat9k-espbase.16.05.01a.SPA.pkg
475142 -rw- 13256 Jul 31 2019 09:52:44 -07:00 cat9k-guestshell.16.05.01a.SPA.pkg
475143 -rw- 349635524 Jul 31 2019 09:52:54 -07:00 cat9k-rpbase.16.05.01a.SPA.pkg
475149 -rw- 24248187 Jul 31 2019 09:53:02 -07:00 cat9k-rpboot.16.05.01a.SPA.pkg
475144 -rw- 25285572 Jul 31 2019 09:52:55 -07:00 cat9k-sipbase.16.05.01a.SPA.pkg
475145 -rw- 20947908 Jul 31 2019 09:52:55 -07:00 cat9k-sipspa.16.05.01a.SPA.pkg
475146 -rw- 2962372 Jul 31 2019 09:52:56 -07:00 cat9k-srdriver.16.05.01a.SPA.pkg
475147 -rw- 13284288 Jul 31 2019 09:52:56 -07:00 cat9k-webui.16.05.01a.SPA.pkg
475148 -rw- 13248 Jul 31 2019 09:52:56 -07:00 cat9k-wlc.16.05.01a.SPA.pkg
491524 -rw- 25711568 Nov 20 2019 11:49:33 -07:00 cat9k-cc_srdriver.17.01.01.SPA.pkg
491525 -rw- 78484428 Nov 20 2019 11:49:35 -07:00 cat9k-espbase.17.01.01.SPA.pkg
491526 -rw- 1598412 Nov 20 2019 11:49:35 -07:00 cat9k-guestshell.17.01.01.SPA.pkg
491527 -rw- 404153288 Nov 20 2019 11:49:47 -07:00 cat9k-rpbase.17.01.01.SPA.pkg
491533 -rw- 31657374 Nov 20 2019 11:50:09 -07:00 cat9k-rpboot.17.01.01.SPA.pkg
491528 -rw- 27681740 Nov 20 2019 11:49:48 -07:00 cat9k-sipbase.17.01.01.SPA.pkg
491529 -rw- 52224968 Nov 20 2019 11:49:49 -07:00 cat9k-sipspa.17.01.01.SPA.pkg
491530 -rw- 31130572 Nov 20 2019 11:49:50 -07:00 cat9k-srdriver.17.01.01.SPA.pkg
491531 -rw- 14783432 Nov 20 2019 11:49:51 -07:00 cat9k-webui.17.01.01.SPA.pkg
491532 -rw- 9160 Nov 20 2019 11:49:51 -07:00 cat9k-wlc.17.01.01.SPA.pkg
Switch# dir flash:*.conf
Directory of flash:/*.conf
Directory of flash:/
434197 -rw- 7406 Nov 20 2019 10:59:16 -07:00 packages.conf
516098 -rw- 7406 Nov 20 2019 10:58:08 -07:00 cat9k_iosxe.17.01.01.SPA.conf
注:
- packages.conf—新安装的 .pkg 文件重新编写的文件
- cat9k_iosxe.17.01.01.SPA.conf— 新安装的 packages.conf 文件的备份副本
5) 执行重启
Switch# reload
可以参考对应版本的release note中的 Upgrading in Install Mode