【网络管理】网络管理-第一章+路由器配置和文件管理

上传人:M****1 文档编号:568683456 上传时间:2024-07-26 格式:PDF 页数:12 大小:96.69KB
返回 下载 相关 举报
【网络管理】网络管理-第一章+路由器配置和文件管理_第1页
第1页 / 共12页
【网络管理】网络管理-第一章+路由器配置和文件管理_第2页
第2页 / 共12页
【网络管理】网络管理-第一章+路由器配置和文件管理_第3页
第3页 / 共12页
【网络管理】网络管理-第一章+路由器配置和文件管理_第4页
第4页 / 共12页
【网络管理】网络管理-第一章+路由器配置和文件管理_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《【网络管理】网络管理-第一章+路由器配置和文件管理》由会员分享,可在线阅读,更多相关《【网络管理】网络管理-第一章+路由器配置和文件管理(12页珍藏版)》请在金锄头文库上搜索。

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.

2、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

3、Freebsd% telnet Router1 Trying 172.25.1.5. Connected to Router1. Escape character is . User Access Verification Password: Router1enable 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 cop

4、ied 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

5、)#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 wi

6、th 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

7、#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.

8、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. eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

9、eeeeeeeeeeeeeeeeeeeeeeeeeeeeee .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 注释 无

10、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.1

11、22-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-m

12、z.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.bi

13、n 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 Ro

14、uter1. Escape character is . User Access Verification Password: Router1enable 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#

15、 注释 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

16、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 i

17、mage 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

18、)#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#

19、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 te

20、rminal 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

21、. 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 ft

22、p 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 byt

23、es copied in 0.276 secs (87 bytes/sec) Router1# 当然也可以使用下面的简化命令 copy ftp:/neoshi:ioscookbook172.25.1.1/c3620-ik9s-mz.122-10a.bin slot1: 注释 如果没有指定用户名和密码,路由器缺省会使用匿名登录 1.15. 批量产生路由器配置文件 1.16. 同时改变多台路由器的配置 1.17. 获得设备的硬件信息 1.18. 备份路由器的配置 以上都是使用 perl 脚本来进行批量化操作,建议使用我推荐的图形话绿色免费工具软件 1.19. 热重启 提问 重启路由器而对业务影响减

24、少到最低 回答 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 termina

25、l 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 wi

26、th 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 archiv

27、e 命令来显示当前的配置存档,缺省保存 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

28、, 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 来查看当前的配置锁定信息,如果你确实需要进行配置,就把看到锁定的人踢掉吧。

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号