频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

Cisco IOS Cookbook 中文精简版第一章路由器配置和文件管理

来源: 作者: 出处:巧巧读书 2007-03-17 进入讨论组
上一页 1 2 

1.9.  拷贝IOS镜像文件到服务器

提问 保存一份IOS到TFTP服务器作为备份

回答

Freebsd% touch /tftpboot/c2600-ik9o3s-mz.122-12a.bin

Freebsd% chmod 666 /tftpboot/c2600-ik9o3s-mz.122-12a.bin

Freebsd% telnet Router1

Trying 172.25.1.5...

Connected to Router1.

Escape character is '^]'.

User Access Verification

Password: <vtypassword>

Router1>enable

Password: <enablepassword>

Router1#copy flash:c2600-ik9o3s-mz.122-12a.bin  tftp

Address or name of remote host []? 172.25.1.1

Destination filename [c2600-ik9o3s-mz.122-12a.bin]? <enter>

!!!!!!

11135588 bytes copied in 52.588 secs (211752 bytes/sec)

Router1#

注释

1.10.  通过控制台口拷贝IOS镜像文件

提问 通过控制台口和AUX端口来加载IOS

回答

Router1#copy xmodem: slot1:

                        **** WARNING ****

x/ymodem is a slow transfer protocol limited to the current speed

settings of the auxiliary/console ports. The use of the auxilary

port for this download is strongly recommended.

During the course of the download no exec input/output will be

available.

                        ---- ******* ----

Proceed? [confirm] <enter>

Destination filename []? c3620-ik9s-mz.122-12a.bin

Erase slot1: before copying? [confirm] <enter>

Use crc block checksumming? [confirm] <enter>

Max Retry Count [10]: <enter>

Perform image validation checks? [confirm] <enter>

Xmodem download using crc checksumming with image validation

Continue? [confirm]  <enter>

Ready to receive file...........CC  <start xmodem file transfer here>

4294967295 bytes copied in 1450.848 secs (1271445669961 bytes/sec)

Router1#

注释 思科建议使用AUX口进行此步骤,因为AUX口支持硬件流控。为了提高拷贝速度,建议提前使用下述命令来设置端口速度

Router1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#line aux 0

Router1(config-line)#speed 115200

Router1(config-line)#end

Router1#

1.11.  删除Flash中的文件

提问 删除Flash中的文件

回答

Router1#erase slot1:

Erasing the slot1 filesystem will remove all files! Continue? [confirm] <enter>

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]? <enter>

Delete slot1:c3620-ik9s-mz.122-13.bin? [confirm] <enter>

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]? <enter>

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.bin slot1:

注释 如果没有指定用户名和密码,路由器缺省会使用匿名登录

1.15.  批量产生路由器配置文件

1.16.  同时改变多台路由器的配置

1.17.  获得设备的硬件信息

1.18.  备份路由器的配置

以上都是使用perl脚本来进行批量化操作,建议使用我推荐的图形话绿色免费工具软件

1.19.  热重启

提问 重启路由器而对业务影响减少到最低

回答

Router1#configure  terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#warm-reboot

Router1(config)#end

Router1#

注释 要使用热启动必须先冷启动一次…无语了吧哈哈。此特性开始于12.3(2)T,根据实验冷启动要比热启动慢4分钟。可以使用reload warm命令进行人工的热重启

1.20.  热升级

提问 升级路由器IOS而对业务影响最小

回答

Router1#configure  terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#warm-reboot

Router1(config)#end

Router1#reload warm file slot0:c3745-ipbasek9-mz.124-7.bin

注释 12.3(11)T开始支持此特性

1.21.  配置存档特性

提问 自动对路由器配置进行存档

回答

Router1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#archive

Router1(config-archive)#path slot0:/configs/$h

Router1(config-archive)#write-memory

Router1(config-archive)#time-period 1440

Router1(config-archive)#end

Router1#

注释 从12.3(4)T开始思科引入配置存档特性,每次使用wr对配置进行保存的时候都会在路由器上生成一个存档配置文件,当然也可以像示例那样每1440分钟保存一次,使用show archive命令来显示当前的配置存档,缺省保存14个文件,并且提供了配置比较命令 show archive config differences slot0:/configs/Router1-1 更提供了配置回滚的命令configure replace slot0:/configs/Router1-1 方便的回滚到以前的配置。对于保存的配置文件名可以$h来代表设备主机名$t来代表时间

1.22.  路由器配置锁定

提问 防止同时多个用户对路由器配置文件进行修改

回答

自动进行配置锁定

Router1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#configuration mode exclusive auto

Router1(config)#end

Router1#

按需进行配置锁定

Router1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router1(config)#configuration mode exclusive manual

Router1(config)#end                                

Router1#

注释 12.3(14)T引入了此特性防止多个用户同时对路由器配置进行修改,在配置为auto的模式下,如果有用户进入了配置模式就自动对配置进行锁定,在manual模式下可以使用configure terminal lock进行配置锁定,可以使用show configuration lock来查看当前的配置锁定信息,如果你确实需要进行配置,就把看到锁定的人踢掉吧。静态页面:http://www.qqread.com/cisco/p302337.html 更多文章 更多内容请看路由器设置专题交换机与路由器密码恢复路由故障处理手册专题,或进入讨论组讨论。
上一页 1 2 
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章