【说明】使用TFTP服务器的时候,只要把TFTP软件打开就行了,这里要特别要注意下,TFTP软件打开后不能关闭!如果关闭就没办法使用了。 (2) 将当前配置文件保存到本机
r14#copy running-config tftp:
Address or name of remote host []? 172.16.10.108 Destination filename [r14-confg]? !!
434 bytes copied in 10.056 secs (43 bytes/sec) r14#
【说明】高亮显示分别是保存当前配置文件到TFTP服务器,输入TFTP服务器的IP地址,是否对保存的配置文件进行重命名(这里使用默认的名字),你可以对它进行重命名也可以按默认方式保存,两个”!”号说明已经成功保存配置文件,也可以通过TFTP服务器显示来查看是否保存成功,如下图:
(3) 打开并修改所保存的配置文件
在TFTP的接收文件的文件夹下,可以使用windows自带的记事本程序打开配置文件,如图所示:
然后可以手动修改配置文件,并保存,这里我们将配置文件中路由器的命名由原来的r14修改成rr14以示区别之前的配置文件。 (4) 将当前配置文件保存到同学的PC上
操作很简单,这里不进行示范了,只需在配置时将TFTP主机的地址改成同学的地址就可以了,其他操作不变。 (5) 将保存在本机的配置导入所使用的设备
r14#copy tftp: running-config
Address or name of remote host []? 172.16.10.108 ? ?Invalid host address or name
%Error parsing filename (Bad file number) r14#copy tftp: running-config
Address or name of remote host []? 172.16.10.108 Source filename []? r14-confg
Destination filename [running-config]?
Accessing tftp://172.16.10.108/r14-confg...
Loading r14-confg from 172.16.10.108 (via Ethernet0): ! [OK - 435 bytes]
435 bytes copied in 5.476 secs (79 bytes/sec) rr14#
01:38:51: %SYS-5-CONFIG_I: Configured from tftp://172.16.10.108/r14-confg by console rr14#
【说明】高亮部分说明配置文件传送成功,高亮红色部分,说明配置文件成功覆盖并且生效了。
(6) 将同学保存的配置文件导入所使用的设备
这个就不用再操作了吧,相信大家都会操作了。这里就不浪费笔墨进行描述了。
【思考3】保存跟导入配置文件在实际工程项目中有什么应用吗?
5.
使用TFTP备份路由器的IOS文件
rr14#show flash //查看flash
System flash directory: File Length Name/status 1 15989548 c2501-3.bin
[15989612 bytes used, 787600 available, 16777212 total] 16384K bytes of processor board System flash (Read ON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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15989548 bytes copied in 416.212 secs (38417 bytes/sec) rr14#
6.
IOS文件的升级
【技术要点】在升级IOS之前要先备份IOS,以防止IOS升级失败,无论是备份还是升级都要确保你的电脑和你要升级的路由器能正常通信。
在升级IOS之前我们还是来查看下IOS的相关信息。 room-four#show flash: System flash directory: File Length Name/status 1 15989548 c2501-3.bin
[15989612 bytes used, 787600 available, 16777212 total] 16384K bytes of processor board System flash (Read ONLY) 【说明】这个flash显示read only。 在看下另外一台路由器的show flash输出: Router#sh flash System flash directory: File Length Name/status
3 50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin [51193823 bytes used, 12822561 available, 64016384 total] 63488K bytes of processor board System flash (Read/Write) 【说明】这个flash显示read/write。
【思考4】read only与read/write分别代表什么意思?flash显示为read only或read/write意味着什么?
【技术要点】Cisco2500路由器比较特殊,flash内的IOS默认是只读属性,需要用命令config-register 0x2141将寄存器值改成0x2141.
【思考5】比较路由器的寄存器值0x2142与0x2141?两个寄存器值分别有什么含义?
【说明】这里简述下思科2500路由器的升级,简要操作如下: Router(config)#config-register 0x2141 //修改配置寄存器值 Router#reload
//重新启动路由器后,修改的配置寄存器值才会生效 Router(boot)#copy tftp flash
//注意,将路由器的寄存器值改成0x2141后,提示符变成了”router(boot)#”
Address or name of remote host []? 192.168.1.99 Source file name? c2500.31.bin Destination file name [c2500.31.bin]?
Accessing file 'c2500.31.bin' on 192.168.1.99...
Loading c2500.31.bin from 192.168.1.99 (via Ethernet0): ! [OK] Erase flash device before writing? [confirm]