2020年12月14日 星期一

SWITCH IOS進行導入與導出備份,SWITCH 更新IOS版本:( 備份及更新) Backup and Restore Cisco IOS





Backup and Restore Cisco IOS


1.First you have to setup a pc, and know the IP address of the machine it’s on!Connect to the switch, either via console cable, Telnet or SSH.


2.Log in > Go to enable mode > issue a “copy running-config tftp”* command > Supply the IP address of the TFTP server > Give the backup file a name.



用中文介紹:如下


當有一台新的switch需要備份ios版本或者是有一台switch需要更新ios版本時可以透過tftp來進行跟新或者備份,以下為模擬Lab使用Packet Tracer進行模擬。


  1. 環境建置

本篇教學為透過Packet Tracer模擬使用首先建立一台PC與一台switch環境設定(完整圖示)

拉一台PC及一台SWITCH如下圖:

Step1:點選工具列的PC

選擇一台PC:


Step2:點選工具列的switch(這邊以2950-24port為例)



Step3:點選一條Console線與交叉線,CROSSOVER)串接PC與Switch

,CROSSOVER網路線,是要傳送IOS檔案用。

設定交叉線CROSSOVER


對PC點及兩下進入編輯頁面後選取IP Configuration進行IP設定

以下為IP設定參考:

之後點選Terminal登入switch進行設定

Switch設定:

#En  \\登入

#Conf t \\進入配置模式

#Hostname 2950-24 \\更改主機名稱為2950-24

#Enable secret user1234 \\更該密碼為user1234

#int vlan 1 \\設定vlan1

#ip address 192.168.100.2 255.255.255.0 \\設定vlan1 ip

#no shutdown \\重啟vlan

#exit \\離開vlan設定

#exit \\離開配置模式

#ping 192.168.100.1 \\測試與PC之間的網路連線有沒有通

  1. 查看ios版本設定

#show version \\查看版本

show flash \\查看flash

  1. 備份ios檔案到PC端(透過TFTP)

#Copy flash tftp \\將flash檔案

#Source filename []? c2950-i6q4l2-mz.121-22.EA4.bin \\要複製的檔案

#Address or name of remote host []? 192.168.199.1 \\複製到(PC端)

#Destination filename [c2950-i6q4l2-mz.121-22.EA4.bin]? c2950-i6q4l2-mz.121-22.EA4.bin.bak \\複製後的檔名


關掉Termanal到TFTP Server查看是否有備份成功

  1. 模擬損壞IOS檔案(刪除):

#delete flash \\刪除flash檔

Delete filename []?c2950-i6q4l2-mz.121-22.EA4.bin \\確認刪除的檔案(c2950-i6...)

#show flash \\先是flash 確認是否有刪除


  1. 更新/導入IOS檔案

#copy tftp flash \\從tftp下載flash

Address or name of remote host []? 192.168.100.1 \\下載位子

Source filename []? c2950-i6q4l2-mz.121-22.EA4.bin.bak \\下載的檔名

Destination filename [c2950-i6q4l2-mz.121-22.EA4.bin.bak]? c2950-i6q4l2-mz.121-22.EA4.bin \\下載後儲存的檔名


#Show flash \\確認是否有下載檔案


沒有留言:

張貼留言

搜尋此網誌