Cisco 2960X Switch 更新韌體
2019, Aug 07
Cisco 2960X Switch 更新韌體
至官網https://software.cisco.com/download/home 輸入型號下載對應韌體
查看目前IOS版本:
show version
查看目前資料夾內檔案
Switch>enable #進入管理模式
Switch#show flash:
Directory of flash:/
2 -rwx 520 Dec 28 2018 21:56:15 +08:00 express_setup.debug
4 -rwx 676 Jul 8 2019 00:45:36 +08:00 vlan.dat.renamed
5 -rwx 676 Aug 7 2019 01:25:59 +08:00 vlan.dat
6 -rwx 5 Aug 7 2019 02:09:27 +08:00 private-config.text
7 drwx 512 Jul 5 2019 19:58:06 +08:00 c2960x-universalk9-mz.152-4.E8 #韌體資料夾檔案
695 drwx 512 Jul 5 2019 19:58:07 +08:00 dc_profile_dir
697 -rwx 3403 Jul 8 2019 05:39:36 +08:00 private-config.text.renamed
698 -rwx 3096 Aug 7 2019 02:09:27 +08:00 config.text
699 -rwx 2072 Aug 7 2019 18:53:21 +08:00 multiple-fs
下載檔案 從TFTP
本機需先架設TFTP 將檔案放置TFTP 再從switch 使用以下指令下載 官網http://tftpd32.jounin.net/
Switch#copy tftp flash: #將檔案從TFTP Server 下載下來
Address or name of remote host []? 10.10.10.3 #TFTP server IP
Source filename []? c2960x-universalk9-mz.152-7.E0a.bin #檔案名稱
Destination filename [c2960x-universalk9-mz.152-7.E0a.bin]? c2960x-universalk9-mz.152-7.E0a.bin #目的地檔案名稱
Accessing tftp://10.10.10.3/c2960x-universalk9-mz.152-7.E0a.bin...
Loading c2960x-universalk9-mz.152-7.E0a.bin from 10.10.10.3 (via Vlan10): !OO!OO!OO!OO!OO!OO!OO!
OOO!OO!OO!O!OO!OO!OOO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!
OOO!OO!OO!O!OO!OO!OOO!OO!OO!OO!OO!OO
---(略過)
[OK - 26534912 bytes]
上傳檔案時 TFTP 畫面
再次查看檔案
Switch#show flash:
Directory of flash:/
2 -rwx 520 Dec 28 2018 21:56:15 +08:00 express_setup.debug
3 -rwx 26534912 Aug 7 2019 19:15:49 +08:00 c2960x-universalk9-mz.152-7.E0a.bin #新韌體
4 -rwx 676 Jul 8 2019 00:45:36 +08:00 vlan.dat.renamed
5 -rwx 676 Aug 7 2019 01:25:59 +08:00 vlan.dat
6 -rwx 5 Aug 7 2019 02:09:27 +08:00 private-config.text
7 drwx 512 Jul 5 2019 19:58:06 +08:00 c2960x-universalk9-mz.152-4.E8 #舊韌體
695 drwx 512 Jul 5 2019 19:58:07 +08:00 dc_profile_dir
697 -rwx 3403 Jul 8 2019 05:39:36 +08:00 private-config.text.renamed
698 -rwx 3096 Aug 7 2019 02:09:27 +08:00 config.text
699 -rwx 2072 Aug 7 2019 18:53:21 +08:00 multiple-fs
指定開機影像檔
Switch(config)#boot system flash:c2960x-universalk9-mz.152-7.E0a.bin #指定開機影像檔
Switch(config)#exit
Switch#
000024: Aug 7 11:33:44.318: %SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#write #寫入記憶體
Building configuration...
[OK]
Switch#reload #重開機
Proceed with reload? [confirm] #Enter
查看目前版本
Switch>show version
Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(7)E0a, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Fri 12-Apr-19 04:09 by prod_rel_team
ROM: Bootstrap program is C2960X boot loader
BOOTLDR: C2960X Boot Loader (C2960X-HBOOT-M) Version 15.2(6r)E, RELEASE SOFTWARE (fc1)
Switch uptime is 26 minutes
System returned to ROM by power-on
System restarted at 19:42:33 UTC Wed Aug 7 2019
System image file is "flash:c2960x-universalk9-mz.152-7.E0a.bin"
Last reload reason: Reload command
Version 15.2(7) #目前版本
"flash:c2960x-universalk9-mz.152-7.E0a.bin" #目前載入韌體檔案名稱
刪除不需要的影像檔
若一般要刪除flash中的檔案,
會執行delete
或rmdir
delete主要是刪除檔案非資料夾。
rmdir是刪除資料夾,但資料夾內要為空。
rmdir flash:<path>
列出資料夾內檔案(可略過)
Switch#dir flash:/c2960x-universalk9-mz.152-4.E8
Directory of flash:/c2960x-universalk9-mz.152-4.E8/
7 -rwx 687 Jul 5 2019 19:43:02 +08:00 info
8 drwx 6144 Jul 5 2019 19:43:02 +08:00 html
693 -rwx 24359936 Jul 5 2019 19:46:31 +08:00 c2960x-universalk9-mz.152-4.E8.bin
刪除不需要的影像檔
Switch#delete /recursive /force flash:/c2960x-universalk9-mz.152-4.E8
Switch#show flash:
Directory of flash:/
2 -rwx 520 Dec 28 2018 21:56:15 +08:00 express_setup.debug
3 -rwx 26534912 Aug 7 2019 19:15:49 +08:00 c2960x-universalk9-mz.152-7.E0a.bin #新的韌體名稱
4 -rwx 676 Jul 8 2019 00:45:36 +08:00 vlan.dat.renamed
5 -rwx 676 Aug 7 2019 01:25:59 +08:00 vlan.dat
700 -rwx 2072 Aug 7 2019 19:44:20 +08:00 multiple-fs
694 drwx 512 Jul 5 2019 19:58:07 +08:00 dc_profile_dir
696 -rwx 3403 Jul 8 2019 05:39:36 +08:00 private-config.text.renamed
697 -rwx 5 Aug 7 2019 19:33:54 +08:00 private-config.text
699 -rwx 3096 Aug 7 2019 19:33:54 +08:00 config.text
/recursive 刪除指定資料夾下的檔案及資料夾
/force 刪除並不給出提示