聊聊Cisco 3650交換機系統升級那點事兒!

說起思科的交換機升級,大多數人想到的是以下幾步:

(1)把系統.bin文件通過TFTP或是FTP上傳到交換機中

(2)將原有.bin文件刪除,重啓(或是手動設置引導順序)

(3)重啓後升級完成。

的確,2960、3560、3750等等交換機的升級都可以通過以上幾點來完成。可是思科的3650交換機升級跟以前的有些不同。

在升級之前,先看一下3650中的dir信息

Switch#dir
Directory of flash:/
15490  -rw-         15954556  Feb 13 2018 00:53:01 +00:00  cat3k_caa-guestshell.16.03.05b.SPA.pkg
15491  -rw-         22301472  Feb 13 2018 00:52:59 +00:00  cat3k_caa-rpbase.16.03.05b.SPA.pkg
15492  -rw-        266035828  Feb 13 2018 00:53:01 +00:00  cat3k_caa-rpcore.16.03.05b.SPA.pkg
15493  -rw-          9089660  Feb 13 2018 00:53:00 +00:00  cat3k_caa-srdriver.16.03.05b.SPA.pkg
15494  -rw-        212812400  Feb 13 2018 00:53:00 +00:00  cat3k_caa-wcm.16.03.05b.SPA.pkg
15495  -rw-         13423224  Feb 13 2018 00:53:00 +00:00  cat3k_caa-webui.16.03.05b.SPA.pkg
15496  -rw-             4748  Feb 13 2018 00:53:24 +00:00  packages.conf
15497  -rw-              629  Jul 31 2018 02:09:08 +00:00  bootloader_evt_handle.log
15498  drwx             4096  Feb 13 2018 00:59:14 +00:00  core
54209  drwx             4096  Feb 13 2018 00:55:52 +00:00  .prst_sync
69697  drwx             4096  Feb 13 2018 00:55:53 +00:00  .rollback_timer
77441  drwx             4096  Jul 31 2018 02:09:22 +00:00  dc_profile_dir
77443  drwx             4096  Feb 13 2018 00:56:02 +00:00  gs_script
15499  -rw-            65301  Jul 31 2018 02:09:39 +00:00  memleak.tcl
15500  drwx             4096  Feb 13 2018 00:56:31 +00:00  .installer
15502  -rw-          2097152  Jul 31 2018 02:12:32 +00:00  nvram_config
15503  -rw-          2097152  Jul 31 2018 02:12:32 +00:00  nvram_config_bkup
15504  -rw-               35  Jul 30 2018 06:29:18 +00:00  pnp-tech-time
15505  -rw-            54759  Jul 30 2018 06:29:21 +00:00  pnp-tech-discovery-summary

在這裏你會發現這裏沒有.bin文件了。

雖然如此,但是在這裏升級仍然需要使用到.bin文件,因爲你從思科網站上下載的升級文件就是.bin的。下面我們說一下具體步驟:

1、從網站上下載所需要的升級文件,文件擴展名是.bin。

2、通過TFTP上傳到交換機中,如下:

Switch#copy tftp://10.0.0.2/cat3k_caa-universalk9.16.03.06.SPA.bin flash:
Destination filename [cat3k_caa-universalk9.16.03.06.SPA.bin]?
Accessing tftp://10.0.0.2/cat3k_caa-universalk9.16.03.06.SPA.bin...
Loading cat3k_caa-universalk9.16.03.06.SPA.bin from 10.0.0.2 (via GigabitEthernet1/0/2): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 537577577 bytes]
537577577 bytes copied in 211.316 secs (2543951 bytes/sec)

3、與之前升級不同的就是在這裏,執行以下命令進行安裝

Switch#request platform software package install switch all file flash:cat3k_caa-universalk9.16.03.06.SPA.bin

--- Starting install local lock acquisition on switch 1 ---
Finished install local lock acquisition on switch 1

Expanding image file: flash:cat3k_caa-universalk9.16.03.06.SPA.bin
[1]: Expanding file
[1]: Finished expanding all-in-one software package in switch 1
SUCCESS: Finished expanding all-in-one software package.
[1]: Performing install
  SUCCESS: install Finished
[1]: install package(s) on switch 1
--- Starting list of software package changes ---
Old files list:
  Removed cat3k_caa-guestshell.16.03.05b.SPA.pkg
  Removed cat3k_caa-rpbase.16.03.05b.SPA.pkg
  Removed cat3k_caa-rpcore.16.03.05b.SPA.pkg
  Removed cat3k_caa-srdriver.16.03.05b.SPA.pkg
  Removed cat3k_caa-wcm.16.03.05b.SPA.pkg
  Removed cat3k_caa-webui.16.03.05b.SPA.pkg
New files list:
  Added cat3k_caa-guestshell.16.03.06.SPA.pkg
  Added cat3k_caa-rpbase.16.03.06.SPA.pkg
  Added cat3k_caa-rpcore.16.03.06.SPA.pkg
  Added cat3k_caa-srdriver.16.03.06.SPA.pkg
  Added cat3k_caa-wcm.16.03.06.SPA.pkg
  Added cat3k_caa-webui.16.03.06.SPA.pkg
Finished list of software package changes
SUCCESS: Software provisioned.  New software will load on reboot.
[1]: Finished install successful on switch 1
Checking status of install on [1]
[1]: Finished install in switch 1
SUCCESS: Finished install: Success on [1]


其實到這裏升級就完成了一半兒,因爲上面提示:New software will load on reboot.也就是說重啓之後就是以新的系統啓動了。


這時我們再用dir查看一下:

Switch#dir
Directory of flash:/

15490  -rw-         15954556  Feb 13 2018 00:53:01 +00:00  cat3k_caa-guestshell.16.03.05b.SPA.pkg
15491  -rw-         22301472  Feb 13 2018 00:52:59 +00:00  cat3k_caa-rpbase.16.03.05b.SPA.pkg
15492  -rw-        266035828  Feb 13 2018 00:53:01 +00:00  cat3k_caa-rpcore.16.03.05b.SPA.pkg
15493  -rw-          9089660  Feb 13 2018 00:53:00 +00:00  cat3k_caa-srdriver.16.03.05b.SPA.pkg
15494  -rw-        212812400  Feb 13 2018 00:53:00 +00:00  cat3k_caa-wcm.16.03.05b.SPA.pkg
15495  -rw-         13423224  Feb 13 2018 00:53:00 +00:00  cat3k_caa-webui.16.03.05b.SPA.pkg
15509  -rw-             4737  Jul 31 2018 02:37:29 +00:00  packages.conf
15497  -rw-              666  Jul 31 2018 02:21:44 +00:00  bootloader_evt_handle.log
15498  drwx             4096  Feb 13 2018 00:59:14 +00:00  core
54209  drwx             4096  Feb 13 2018 00:55:52 +00:00  .prst_sync
69697  drwx             4096  Feb 13 2018 00:55:53 +00:00  .rollback_timer
77441  drwx             4096  Jul 31 2018 02:21:58 +00:00  dc_profile_dir
77443  drwx             4096  Feb 13 2018 00:56:02 +00:00  gs_script
15499  -rw-            65301  Jul 31 2018 02:22:15 +00:00  memleak.tcl
15500  drwx             4096  Feb 13 2018 00:56:31 +00:00  .installer
15502  -rw-          2097152  Jul 31 2018 02:25:06 +00:00  nvram_config
15503  -rw-          2097152  Jul 31 2018 02:25:06 +00:00  nvram_config_bkup
15504  -rw-               35  Jul 30 2018 06:29:18 +00:00  pnp-tech-time
15505  -rw-            54759  Jul 30 2018 06:29:21 +00:00  pnp-tech-discovery-summary
15496  -rw-                0  Jul 31 2018 02:37:52 +00:00  .onreboot
15511  -rw-         15950464  Jul 31 2018 02:36:20 +00:00  cat3k_caa-guestshell.16.03.06.SPA.pkg
15516  -rw-         22302593  Jul 31 2018 02:36:25 +00:00  cat3k_caa-rpbase.16.03.06.SPA.pkg
15512  -rw-        265124472  Jul 31 2018 02:36:21 +00:00  cat3k_caa-rpcore.16.03.06.SPA.pkg
15514  -rw-          9095808  Jul 31 2018 02:36:23 +00:00  cat3k_caa-srdriver.16.03.06.SPA.pkg
15510  -rw-             4737  Jul 31 2018 02:37:15 +00:00  cat3k_caa-universalk9.16.03.06.SPA.conf
15515  -rw-        211675764  Jul 31 2018 02:36:25 +00:00  cat3k_caa-wcm.16.03.06.SPA.pkg
15513  -rw-         13423228  Jul 31 2018 02:36:23 +00:00  cat3k_caa-webui.16.03.06.SPA.pkg
15508  -rw-             4748  Jul 31 2018 02:37:29 +00:00  packages.conf.00-

1621966848 bytes total (453984256 bytes free)


通過上面的顯示可以看出flash中已經安裝了新版本的系統,但是老版本的系統仍然在。那麼該如何刪除老版本的系統釋放系統空間呢?我們往下繼續

4、重啓交換機,重啓之後交換機會以新版本的系統啓動

Cisco IOS Software [Denali], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.3.6, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Wed 28-Feb-18 15:23 by mcpre

上面顯示已經從16.3.6啓動了,緊接着我們可以通過下面的命令來釋放系統空間:

Switch#request platform software package clean switch all file flash:
Running command on switch 1
Cleaning up unnecessary package files
  Scanning boot directory for packages ... done.
  Preparing packages list to delete ...
    packages.conf
      File is in use, will not delete.
    cat3k_caa-guestshell.16.03.06.SPA.pkg
      File is in use, will not delete.
    cat3k_caa-rpbase.16.03.06.SPA.pkg
      File is in use, will not delete.
    cat3k_caa-rpcore.16.03.06.SPA.pkg
      File is in use, will not delete.
    cat3k_caa-srdriver.16.03.06.SPA.pkg
      File is in use, will not delete.
    cat3k_caa-wcm.16.03.06.SPA.pkg
      File is in use, will not delete.
    cat3k_caa-webui.16.03.06.SPA.pkg
      File is in use, will not delete.
  done.
 
The following files will be deleted:
[1]:
/flash/cat3k_caa-guestshell.16.03.05b.SPA.pkg
/flash/cat3k_caa-rpbase.16.03.05b.SPA.pkg
/flash/cat3k_caa-rpcore.16.03.05b.SPA.pkg
/flash/cat3k_caa-srdriver.16.03.05b.SPA.pkg
/flash/cat3k_caa-universalk9.16.03.06.SPA.conf
/flash/cat3k_caa-wcm.16.03.05b.SPA.pkg
/flash/cat3k_caa-webui.16.03.05b.SPA.pkg
/flash/packages.conf.00-

Do you want to proceed? [y/n]y
[1]:
Deleting file flash:cat3k_caa-guestshell.16.03.05b.SPA.pkg ... done.
Deleting file flash:cat3k_caa-rpbase.16.03.05b.SPA.pkg ... done.
Deleting file flash:cat3k_caa-rpcore.16.03.05b.SPA.pkg ... done.
Deleting file flash:cat3k_caa-srdriver.16.03.05b.SPA.pkg ... done.
Deleting file flash:cat3k_caa-universalk9.16.03.06.SPA.conf ... done.
Deleting file flash:cat3k_caa-wcm.16.03.05b.SPA.pkg ... done.
Deleting file flash:cat3k_caa-webui.16.03.05b.SPA.pkg ... done.
Deleting file flash:packages.conf.00- ... done.
SUCCESS: Files deleted.
Switch#

這時再用dir查看就會發現老版本的系統已經刪除了,這時3650已經升級完成了。


說明:升級系統前最好先查看一下官方文檔,不過我查看3650升級的官方文檔時發現,文檔中把第四步放在了上傳文件之前,按照他們的說法是先發釋放一下系統空間,不過如果你真按照那樣做了就會發現,那樣釋放空間是行不通的!爲什麼行不通,留給你思考了,不過其實答案就在這篇文章中……


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章