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

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

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

<!--[if !supportLists]-->第一章    <!--[endif]-->路由器配置和文件管理

1.1.  通过TFTP来配置路由器

提问 使用TFTP来加载路由器的配置文件

回答

Router1#copy tftp://172.25.1.1/NEWCONFIG running-config

Destination filename [running-config]? <enter>

Accessing tftp://172.25.1.1/NEWCONFIG...

Loading NEWCONFIG from 172.25.1.1 (via FastEthernet0/0.1): !

[OK - 24 bytes]

24 bytes copied in 0.192 secs (125 bytes/sec)

Router1#

注释 IOS12.0版本以前使用的configure network命令,另外拷贝至路由器的配置文件应该以End结尾,否则会出现下面的错误提示信息:%PARSER-4-BADCFG: Unexpected end of configuration file.

1.2.  保存路由器配置到服务器

提问 保存路由器当前配置文件到TFTP服务器作为备份

回答

Freebsd% touch /tftpboot/router1-confg

Freebsd% chmod 666 /tftpboot/router1-confg

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 running-config tftp://172.25.1.1/router1-confg

Address or name of remote host [172.25.1.1]? <enter>

Destination filename [router1-confg]? <enter>

!!!

9640 bytes copied in 3.956 secs (2437 bytes/sec)

Router1#

注释 确保TFTP服务器上的目录和文件可写

1.3.  使用远端配置文件启动路由器

提问 使用另外的配置文件来启动路由器

回答

Router1#configure terminal

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

Router1(config)#service config

Router1(config)#boot network tftp Network-auto 172.25.1.1

Router1(config)#boot host tftp Router8-auto 172.25.1.1

Router1(config)#end

Router1#

注释 service config缺省是关闭的,如果打开缺省会去查找的文件名为network-config, cisconet.cfg, router1-confg, router1.cfg等

1.4.  保存大于NVRAM大小的配置文件

提问 配置文件过大,超过了可用的NVRAM大小

回答

Router1#configure terminal

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

Router1(config)#service compress-config

Router1(config)#end

Router1#

注释 可以使用show startup-config来验证

Router1#show startup-config

Using 5068 out of 29688 bytes, uncompressed size = 9969 bytes

Uncompressed configuration from 5068 bytes to 9969 bytes

1.5.  清除启动配置文件

提问 清除配置文件恢复到出厂设置

回答

Router1#erase nvram:  (erase startup-config

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

[OK]

Erase of nvram: complete

Router1#reload

System configuration has been modified. Save? [yes/no]: no

Proceed with reload? [confirm] <enter>

 

注释 无

1.6.  加载新的IOS镜像

提问 升级当前的IOS

回答

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

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

Accessing tftp://172.25.1.1/c2600-ik9o3s-mz.122-12a.bin...

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

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

Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased

Erase of flash: complete

Loading c2600-ik9o3s-mz.122-12a.bin from 172.25.1.1 (via FastEthernet0/0.1):!!!!!!!!!!!!!!

[OK - 11135588 bytes]

Verifying checksum...  OK (0xE643)

11135588 bytes copied in 82.236 secs (135410 bytes/sec)

Router1# reload

Proceed with reload? [confirm] <enter>

注释 无

1.7.  以另一个IOS镜像文件启动

提问 使用其它的IOS镜像启动

回答

Router1#configure terminal

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

Router1(config)#boot system flash:c3620-jk9o3s-mz.122-7a.bin

Router1(config)#boot system flash:c3620-jos56i-l.120-11.bin

Router1(config)#boot system slot0:c3620-ik9s-mz.122-13.bin

Router1(config)#boot system rom

Router1(config)#end

注释 boot system命令的顺序非常重要,如果使用新的IOS,建议先进行no boot system的操作。从IOS 12.3(4)T 后思科引入了boot markers的概念,所有的boot systme命令都会放在boot markers之间,比如:

Router1#show running-config | include ^boot

boot-start-marker

boot system slot0:c3745-ipbasek9-mz.124-6.T.bin

boot system slot0:c3745-ipbasek9-mz.124-7.bin

boot system flash:

boot-end-marker

Router1#

 

1.8.  通过网络启动

提问 IOS太大本地Flash无法保存,使用保存在网络上的IOS启动

回答

Router1#configure terminal

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

Router1(config)#boot system tftp c2500-io-l.122-7a.bin 172.25.1.1

Router1(config)#boot system flash

Router1(config)#end

Router1#

注释 无

来自:http://www.qqread.com/cisco/p302337.html 更多文章 更多内容请看路由器设置专题交换机与路由器密码恢复路由故障处理手册专题,或进入讨论组讨论。
下一页 1 2 
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章