分类: 系统运维
2008-05-22 10:27:31
现在C3750的文件系统做一个总结。
查看文件系统。默认是flash.
dir all (flash: )
show file system
更改目录:
cd xx
pwd (查看当前目录)
新建目录:
mkdir
xx
删除目录:
delete/force(不再询问确认)/recursive(删除目录下的子目录和文件)
如果是flash: (整个flash),如果是目录,则是整个目录。
不可恢复。
copy,还是复制。
创建一个tar文件:
archive tar/creat x...(目的) x...(源)
查看一个tar包含的文件:
archive tar/table xxx.tar
解压缩一个tar文件:
archive tar/xtract xxx.tar flash: (解压缩整个tar,只能解到当前flash)
archive tar/xtract xxx.tar flash:/xxxxx (指定解压缩整个tar,或其中某个文件,目录)
查看一个可读文件的内容:
more xxx (可以是远程的,如TFTP)
配置文件:
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
cisco.com上提供的ios为tar格式。包含的文件见文档。
升级IOS文件:
archive download-sw/overwrite(覆盖原IOS)/reload(重启)
或者
archive download-sw/leave-old-sw(保留原IOS)/reload(重启)
download时会有算法来验证新IOS是否适合当前模块和内存,否则会报错。
如查选用/overwrite,不管down的IOS是否与现在相同,都会被删除。
download完成后,会自动将boot参数指向新IOS。
(文档虽然没讲,但是我想,有足够flash空间的情况下,还是不要覆盖原IOS,传完再删)
上传IOS文件:
archive upload-sw
上传算法会自动把多个系统文件生成为.tar ,并上传。
(详细系统组成文件见文档937页):info, the Cisco IOS image, and the web management files.
IOS恢复参见文档里的Troubleshooting部分
升级前后对比:
升级前
Switch#dir flash:
Directory of flash:/
5 drwx 192 Mar 01 1993 00:03:52 c3750-i9-mz.121-19.EA1d
15998976 bytes total (9545728 bytes free)
Switch#
Switch#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C3750 Software (C3750-I9-M), Version 12.1(19)EA1d, RELEASE SOFTWARE (fc
1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Mon 05-Apr-04 22:40 by antonino
Image text-base: 0x00003000, data-base: 0x007CBC3C
ROM: Bootstrap program is C3750 boot loader
BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.1(19r)EA1b, RELEASE SOFTWA
RE (fc2)
Switch uptime is 16 minutes
System returned to ROM by power-on
System image file is "flash:c3750-i9-mz.121-19.EA1d/c3750-i9-mz.121-19.EA1d.bin"
cisco WS-C3750G-12S (PowerPC405) processor (revision H0) with 118776K/12288K byt
es of memory.
Processor board ID CAT0849N2YU
Last reset from power-on
1 Virtual Ethernet/IEEE 802.3 interface(s)
12 Gigabit Ethernet/IEEE 802.3 interface(s)
The password-recovery mechanism is enabled.
512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:129:97:7C:80
Motherboard assembly number : 73-8307-08
Power supply part number : 341-0048-01
Motherboard serial number : CAT084911NJ
Power supply serial number : DTH08441JZ5
Model revision number : H0
Motherboard revision number : A0
Model number : WS-C3750G-12S-S
System serial number : CAT0849N2YU
Top Assembly Part Number : 800-21966-01
Top Assembly Revision Number : L0
Version ID : N/A
Hardware Board Revision Number : 0x07
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 12 WS-C3750G-12S 12.1(19)EA1d C3750-I9-M
Configuration register is 0xF
Switch#
升级后:
Switch#sh flash:
Directory of flash:/
2 -rwx 1075 Mar 1 1993 00:24:27 +00:00 config.text
3 drwx 192 Mar 1 1993 00:23:48 +00:00 c3750-i5-mz.122-25.SEA
5 -rwx 5 Mar 1 1993 00:24:27 +00:00 private-config.text
15998976 bytes total (8053760 bytes free)
Switch#
Switch#sh ver
Cisco IOS Software, C3750 Software (C3750-I5-M), Version 12.2(25)SEA, RELEASE SO
FTWARE (fc)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Tue 25-Jan-05 20:26 by antonino
ROM: Bootstrap program is C3750 boot loader
BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.1(19r)EA1b, RELEASE SOFTWA
RE (fc2)
Switch uptime is 2 minutes
System returned to ROM by power-on
System image file is "flash:c3750-i5-mz.122-25.SEA/c3750-i5-mz.122-25.SEA.bin"
cisco WS-C3750G-12S (PowerPC405) processor (revision H0) with 118784K/12280K byt
es of memory.
Processor board ID CAT0849N2YU
Last reset from power-on
1 Virtual Ethernet interface
12 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:129:97:7C:80
Motherboard assembly number : 73-8307-08
Power supply part number : 341-0048-01
Motherboard serial number : CAT084911NJ
Power supply serial number : DTH08441JZ5
Model revision number : H0
Motherboard revision number : A0
Model number : WS-C3750G-12S-S
System serial number : CAT0849N2YU
Top Assembly Part Number : 800-21966-01
Top Assembly Revision Number : L0
Version ID : N/A
Hardware Board Revision Number : 0x07
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 12 WS-C3750G-12S 12.2(25)SEA C3750-I5-M
Configuration register is 0xF
Switch#