电信主站 网通分站
购买流程 付款方式 常见问题 在线提问 续租服务 购物车
用户名: 密 码: 忘记密码?
首 页
域名注册
虚拟主机
双线主机
服务器租用
VPS主机
企业邮局
代理专区
客服中心
虚拟主机行业资讯 虚拟主机评测对比 互联网最新动态 技术学院 站长资讯 在线教程 网站运营
搜索优化 服务器 网络编程 图形图象 站长之家 网页制作 操作系统
冲浪宝典 软件教学 视频通信 办公软件 邮件系统 网络安全 认证考试
您当前位置:西部数码->资讯中心-> 认证考试-> Cisco认证
思科ccna辅导:路由器配置和文件管理_cisco认证
作者:网友供稿 点击:0
  西部数码-全国虚拟主机10强!20余项虚拟主机管理功能,全国领先!第6代双线路虚拟主机,南北访问畅通无阻!虚拟主机可在线rar解压,自动数据恢复设置虚拟目录等.虚拟主机免费赠送访问统计,企业邮局.Cn域名注册10元/年,自助建站480元起,免费试用7天,满意再付款!P4主机租用799元/月.月付免压金!
文章页数:[1] 

  路由器配置和文件管理

  1.1. 通过TFTP来配置路由器

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

  回答

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

  Destination filename [running-config]?

  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:

  Router1>enable

  Password:

  Router1#copy running-config tftp://172.25.1.1/router1-confg

  Address or name of remote host [172.25.1.1]?

  Destination filename [router1-confg]?

  !!!

  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]

  [OK]

  Erase of nvram: complete

  Router1#reload

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

  Proceed with reload? [confirm]

  注释 无

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

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

  Erase flash: before copying? [confirm]

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

  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]

  注释 无

  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#

  注释 无

  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:

  Router1>enable

  Password:

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

  !!!!!!

  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]

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

  Erase slot1: before copying? [confirm]

  Use crc block checksumming? [confirm]

  Max Retry Count [10]:

  Perform image validation checks? [confirm]

  Xmodem download using crc checksumming with image validation

  Continue? [confirm]

  Ready to receive file...........CC

  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]

  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://neoshiioscookbook@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.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
相关主题
文章页数:[1] 
Google
热门文章
·思科路由器安装维护步骤及命令_cisco认证
·ccie routing & switching备考指南(2006版)_cisco认证
·photoshop美女肖像照片靓肤技巧 把她变漂亮_photoshop教程
·linux程式设计-11.shellscript(bash)--(9)流程控制if_shell教程
·vb从零开始编外挂(十一)_visualbasic教程
·vb中winsock控制的udp协议的使用_visualbasic教程
·为vb窗口增添平铺贴图背景_visualbasic教程
·文件系统控件方案_visualbasic教程
·mscomm文字传输_visualbasic教程
·ccie routing & switching备考指南(2006版)_cisco认证

最新文章
·fireworks表现vista毛玻璃朦胧效果_fireworks教程
·photoshop钻戒金属质感完美修复_photoshop教程
·photoshop图层样式引申绘制玉兔_photoshop教程
·photoshop处理花卉水粉画特效_photoshop教程
·ccna认证英文词汇中文解析--最新最全版_cisco认证
·让windows xp更安全的几招超级必杀技_windows xp
·php中文乱码问题_php技巧
·思科ccna认证培训辅导:路由器的管理_cisco认证
·思科cisco认证最新真题50道:tcp/ip_cisco认证
·思科ccna辅导:路由器配置和文件管理_cisco认证


 
 


版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。
  打印  刷新  关闭
返回首页 |关于我们 | 联系我们 | 付款方式 | 创业联盟 | 虚拟主机 | 资讯中心 | 友情链接 | 网站地图

版权所有 西部数码(www.west263.com)
CopyRight (c) 2002~2006 west263.com all right reserved.
公司地址:四川成都市万和路90号天象大厦4楼 邮编:610031
电话总机:028-86262244 86263048 86263408 86263960 86264018 86267838
售前咨询:总机转201 202 203 204 206 208
售后服务:总机转211 212 213 214
财务咨询:总机转224 223 传真:028-86264041 财务QQ:点击发送消息给对方635483282
售前咨询QQ:点击发送消息给对方2182518 点击发送消息给对方241975952 点击发送消息给对方275026793 点击发送消息给对方408235859
售后服务QQ:点击发送消息给对方17708515 点击发送消息给对方307742704 点击发送消息给对方287976517 点击发送消息给对方363783715
《中华人民共和国增值电信业务经营许可证》编号:川B2-20030065号