close
TFTP是一種簡單型FTP服務,和FTP一樣可作為檔案傳輸用,FTP是使用TCP協定傳輸,而TFTP是使用UDP,因此TFTP不需經過驗證,通常用於網路設備之間的檔案傳輸,我們可使用TFTP更新網路設備的韌體(Firmware)或設定。
在PacketTracert新增TFTP Server
在左下角之"End Device"選擇"Server PT",設定好IP後和R1連線即可。
將設定檔備份至TFTP伺服器
R1#copy running-config tftp #將設定檔備份至TFTP伺服器 Address or name of remote host []? 192.168.0.254 #輸入TFTP伺服器IP Destination filename [R1-confg]? #輸入要存檔之檔名,若不輸作即使用預設檔名(R1-confg) Writing running-config....!! [OK - 415 bytes] 415 bytes copied in 3.033 secs (136 bytes/sec) #備份完成
在"Services"標纖的TFTP服務中即可看到剛才上傳的設定檔
將設定檔由TFTP還原
R1#copy tftp: running-config #將設定檔由TFTP伺服器還原 Address or name of remote host []? 192.168.0.254 #輸入TFTP伺服器IP Source filename []? R1-confg #輸入要伺服器端之檔名 Destination filename [running-config]? #詢問是否要覆蓋目前設定檔(running-config) Accessing tftp://192.168.0.254/R1-confg.... Loading R1-confg from 192.168.0.254: ! [OK - 415 bytes] 415 bytes copied in 3.014 secs (137 bytes/sec) #還原完成
備份Cisco設備之IOS至TFTP伺服器
查看目前IOS版本:show version
R1>show version #查看目前ISO版本 Cisco IOS Software, 1841 Software (C1841-IPBASE-M), Version 12.3(14)T7, RELEASE SOFTWARE (fc2) #目前載入的IOS版本為12.3(14)T7 Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc. Compiled Mon 15-May-06 14:54 by pt_team ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1) System returned to ROM by power-on System image file is "flash:c1841-ipbase-mz.123-14.T7.bin" #影像檔檔名為"c1841-ipbase-mz.123-14.T7.bin"
在檔名前有看到"flash:"代表這個影像檔是存放於flash內
查看flahs內容:show flash:
R1#show flash: System flash directory: File Length Name/status 3 13832032 c1841-ipbase-mz.123-14.T7.bin #目前IOS的影像檔就在這 2 28282 sigdef-category.xml 1 227537 sigdef-default.xml [13832032 bytes used, 50184352 available, 64016384 total] #目前已使用了約13.8M,還剩約50M容量可用,flash總容量為約64M 63488K bytes of processor board System flash (Read/Write)
備份IOS至TFTP Server
R1#copy flash: tftp #將IOS備份至TFTP Server Source filename []? c1841-ipbase-mz.123-14.T7.bin #輸入要備份影像檔之檔名(大小寫需一致) Address or name of remote host []? 192.168.0.254 #輸入TFTP伺服器IP Destination filename [c1841-ipbase-mz.123-14.T7.bin]? c1841-ipbase-mz.123-14.T7.mybackup.bin #輸入要存檔之檔名,若不輸入即使用原檔名 Writing c1841-ipbase-mz.123-14.T7.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 13832032 bytes] 13832032 bytes copied in 0.212 secs (4467594 bytes/sec) #備份完成
檔案已上傳至TFTP Server上了
在TFTP Server上發現了新的ISO版本的影像檔
從TFTP Server更新IOS版本
R1#copy tftp flash: #將新的影像檔下載至flash Address or name of remote host []? 192.168.0.254 #輸入IP Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin #輸入要下載影像檔之檔名(大小寫需一致) Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? #輸入要存檔之檔名,若不輸入即使用原檔名 Accessing tftp://192.168.0.254/c1841-advipservicesk9-mz.124-15.T1.bin... Loading c1841-advipservicesk9-mz.124-15.T1.bin from 192.168.0.254: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 33591768 bytes] 33591768 bytes copied in 0.517 secs (6822044 bytes/sec) #下載完成
查看下載下來之影像檔
R1#show flash: System flash directory: File Length Name/status 4 33591768 c1841-advipservicesk9-mz.124-15.T1.bin #檔案已下載下來了 3 13832032 c1841-ipbase-mz.123-14.T7.bin 2 28282 sigdef-category.xml 1 227537 sigdef-default.xml [47679619 bytes used, 16336765 available, 64016384 total] 63488K bytes of processor board System flash (Read/Write)
指定開機影像檔
R1#configure terminal #進任全域模式 Enter configuration commands, one per line. End with CNTL/Z. R1(config)#boot system flash c1841-advipservicesk9-mz.124-15.T1.bin R1(config)#exit #切換回enable模式 %SYS-5-CONFIG_I: Configured from console by console R1#write #存檔 Building configuration... [OK] R1#reload #重新開機 Proceed with reload? [confirm] System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1) Initializing memory for ECC .. c2811 processor with 524288 Kbytes of main memory Main memory is configured to 64 bit mode with ECC enabled Readonly ROMMON initialized Self decompressing the image : ########################################################################## [OK] (略) R1>enable #進入enable模式 R1#sho R1#show version #查看目前版本 Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2) #IOS版本更新為12.4(15)T1 Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Wed 18-Jul-07 04:52 by pt_team ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1) System returned to ROM by power-on System image file is "flash:c1841-advipservicesk9-mz.124-15.T1.bin" #影像檔也更新了
刪除不需要的影像檔
R1#show flash: #列出flash內之檔案 System flash directory: File Length Name/status 4 33591768 c1841-advipservicesk9-mz.124-15.T1.bin 3 13832032 c1841-ipbase-mz.123-14.T7.bin #要刪除舊版之影像檔 2 28282 sigdef-category.xml 1 227537 sigdef-default.xml [47679619 bytes used, 16336765 available, 64016384 total] 63488K bytes of processor board System flash (Read/Write) R1#delete flash: c1841-ipbase-mz.123-14.T7.bin #flash:後不可有空格,有空格會出現錯誤訊息 ^ % Invalid input detected at '^' marker. R1#delete flash:c1841-ipbase-mz.123-14.T7.bin #刪除檔案(大小寫需一致) Delete filename [c1841-ipbase-mz.123-14.T7.bin]? #確認刪除檔案 Delete flash:/c1841-ipbase-mz.123-14.T7.bin? [confirm] #再次確認 R1#show flash: #再列出flash內之檔案 System flash directory: File Length Name/status 4 33591768 c1841-advipservicesk9-mz.124-15.T1.bin #舊版影像檔已被刪除 2 28282 sigdef-category.xml 1 227537 sigdef-default.xml [33847587 bytes used, 30168797 available, 64016384 total] 63488K bytes of processor board System flash (Read/Write)
文章標籤
全站熱搜
留言列表