交換機IOS升級實例及相關文件命令

1.查看文件系統,默認是flash.
dir all (flash: )
show file system

2.
更改目錄:
cd xx
pwd (
查看當前目錄)
3.新建目錄:
mkdir xx
4.
刪除目錄:
delete/force(不再詢問確認)/recursive(刪除目錄下的子目錄和文件)
如果是flash: (整個flash),如果是目錄,則是整個目錄.
不可恢復.
5.創建一個tar文件:
archive tar/creat x...(目的) x...(源)
6.查看一個tar包含的文件:
archive tar/table xxx.tar
7.
解壓縮一個tar文件:
archive tar/xtract xxx.tar flash: (解壓縮整個tar,只能解到當前flash)
archive tar/xtract xxx.tar flash:/xxxxx (指定解壓縮整個tar,或其中某個文件,目錄)
8.查看一個可讀文件的內容:
more xxx (可以是遠程的,如TFTP)
9.配置文件:
Switch# copy tftp://172.16.2.155/tokyo-confg system:running-config (多了個system
Switch# copy system:running-config tftp://172.16.2.155/tokyo-confg (多了個system
10.升級IOS文件:
archive download-sw/overwrite(覆蓋原IOS)/reload(重啓) ftp://x.tar
archive download-sw/leave-old-sw(保留原IOS)/reload(重啓) ftp://x.tar時會有算法來驗證新IOS是否適合當前模塊和內存,否則會報錯.
如查選用/overwrite,不管down的IOS是否與現在相同,都會被刪除.

download
download完成後,會自動將boot參數指向新IOS.
11.上傳IOS文件:
archive upload-sw ftp://x.tar
上傳算法會自動把多個系統文件生成爲.tar ,並上傳.

 升級實例:

 

Cat3550-24#dir
Directory of flash:/
    2  -rwx      ;     0   Jan 1 1970 00:01:22 +00:00  env_vars
    3  -rwx         344   Jan 1 1970 00:01:22 +00:00  system_env_vars
    4  -rwx         616   Mar 1 1993 06:05:47 +00:00  vlan.dat
    5  -rwx           5   Mar 1 1993 04:51:45 +00:00  private-config.text
    8  drwx          64   Mar 1 1993 00:06:05 +00:00  c3550-i9q3l2-mz.121-19.EA1a
    7  -rwx        4051   Mar 1 1993 04:51:45 +00:00  config.text
Cat3550-24#cd c3550-i9q3l2-mz.121-19.EA1a
Cat3550-24#dir

Directory of flash:/c3550-i9q3l2-mz.121-19.EA1a/
    9  drwx        2688   Mar 1 1993 00:03:20 +00:00  html
   91  -rwx     3447390   Mar 1 1993 00:04:24 +00:00  c3550-i9q3l2-mz.121-19.EA1a.bin
   92  -rwx         255   Mar 1 1993 00:04:24 +00:00  info
15998976 bytes total (9356800 bytes free)
Cat3550-24#delete c3550-i9q3l2-mz.121-19.EA1a.bin
Delete filename [/c3550-i9q3l2-mz.121-19.EA1a/c3550-i9q3l2-mz.121-19.EA1a.bin]?
Delete flash:/c3550-i9q3l2-mz.121-19.EA1a/c3550-i9q3l2-mz.121-19.EA1a.bin? [confirm]
Cat3550-24#dir
Directory of flash:/c3550-i9q3l2-mz.121-19.EA1a/
    9  drwx        2688   Mar 1 1993 00:03:20 +00:00  html
   92  -rwx         255   Mar 1 1993 00:04:24 +00:00  info
15998976 bytes total (12804608 bytes free)
Cat3550-24#del html
Delete filename [/c3550-i9q3l2-mz.121-19.EA1a/html]?
Cat3550-24#delete info
Delete filename [/c3550-i9q3l2-mz.121-19.EA1a/info]?
Delete flash:/c3550-i9q3l2-mz.121-19.EA1a/info? [confirm]
Cat3550-24#delete /force recursive  c3550-i9q3l2-mz.121-19.EA1a
Cat3550-24#archive download-sw /overwrite tftp://10.49.0.4/c3550-i5q3l2-tar.122-25.SEE.tar
examining image...
Loading c3550-i5q3l2-tar.122-25.SEE.tar from 10.49.0.4 (via Vlan1): !
extracting info (252 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<omit>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 7748608 bytes]
Image info:
    Version Suffix: i5q3l2-122-25.SEE
    Image Name: c3550-i5q3l2-mz.122-25.SEE.bin
    Version Directory: c3550-i5q3l2-mz.122-25.SEE
    Ios Image Size: 6089728
    Total Image Size: 7746048
    Image Feature: LAYER_3|MIN_DRAM_MEG=64
    Image Family: C3550
Extracting files...
Loading c3550-i5q3l2-tar.122-25.SEE.tar from 10.49.0.4 (via Vlan1): !
extracting info (252 bytes)
c3550-i5q3l2-mz.122-25.SEE/ (directory)
c3550-i5q3l2-mz.122-25.SEE/html/ (directory)
extracting c3550-i5q3l2-mz.122-25.SEE/html/more.txt (62 bytes)
extracting c3550-i5q3l2-mz.122-25.SEE/html/menu.css (1654 bytes)!
extracting c3550-i5q3l2-mz.122-25.SEE/html/back.htm (435 bytes)
extracting c3550-i5q3l2-mz.122-25.SEE/html/images/tab_left_active.gif (852 bytes)
extracting c3550-i5q3l2-mz.122-25.SEE/html/images/122353.gif (3132 bytes)!
extracting c3550-i5q3l2-mz.122-25.SEE/c3550-i5q3l2-mz.122-25.SEE.bin (6087424 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
extracting c3550-i5q3l2-mz.122-25.SEE/info (252 bytes)!
extracting info.ver (252 bytes)
[OK - 7748608 bytes]
New software image installed in flash:c3550-i5q3l2-mz.122-25.SEE
Configuring system to use new image...done.
Cat3550-24#verify c3550-i5q3l2-mz.122-25.SEE.bin
Verified c3550-i5q3l2-mz.122-25.SEE.bin
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章