|
思科CCNA辅导:路由器配置和文件管理(4) 1.11. 删除Flash中的文件
提问 删除Flash中的文件
回答
Router1#erase slot1:
Erasing the slot1 filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeee ...erased
Erase of slot1: complete
Router1#
或者删除单个文件
Router1#delete slot1:c3620-ik9s-mz.122-13.bin
Delete filename [c3620-ik9s-mz.122-13.bin]?
Delete slot1:c3620-ik9s-mz.122-13.bin? [confirm]
Router1#
注释 并不是所有的路由器都支持erase命令,不行的话可以尝试format命令,有些路由器在使用delete命令以后还可以使用undelete来恢复,同时也需要使用squeeze来彻底删除文件
1.12. 对Flash进行分区
提问 对Flash进行分区
回答
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#partition slot1: 2 8 8
Router1(config)#end
Router1#
注释 如果erase不支持也可以试试partition命令
1.13. 配置路由器为TFTP服务器
提问 配置路由器为TFTP服务器
回答
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#tftp-server flash:c2600-ik9o3s-mz.122-12a.bin
Router1(config)#end
Router1#
注释 使用此命令并不能把路由器配置为全功能的TFTP服务器,此服务器只能用于文件下载,而不能进行上传
1.14. 在路由器上使用FTP
提问 在路由器上使用FTP来进行文件的下载
回答
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip ftp username neoshi
Router1(config)#ip ftp password ioscookbook
Router1(config)#end
Router1#copy ftp: running-config
Address or name of remote host [172.25.1.1]? 172.25.1.1
Source filename []? test
Destination filename [running-config]?
Accessing ftp://172.25.1.1/test...
Loading /test
[OK - 24/4096 bytes]
24 bytes copied in 0.276 secs (87 bytes/sec)
Router1#
当然也可以使用下面的简化命令
copy ftp://neoshi:ioscookbook@172.25.1.1/c3620-ik9s-mz.122-10a.binslot1:
注释 如果没有指定用户名和密码,路由器缺省会使用匿名登录
|