Chinaunix

标题: 路由器作TFTP服务器 IOS巧升级 [打印本页]

作者: 剑心通明    时间: 2008-05-21 19:50
标题: 路由器作TFTP服务器 IOS巧升级
笔者有一台2501路由器的IOS是坏的(cisocB),另外一台2501路由器IOS是好的(ciscoA),好的IOS在我的PC上面己经没有了,但是通过在PC上面做一个TFTP,把好的传到PC上面,再传到坏的上面就太浪费时间了。后来想到一个办法,直接把好的路由器配置成TFTP服务器。
我的连接方式是两台路由器是通过E0口连接的,我先是在好的路由器上面(cisocA )把
E0口配置好IP是192.168.10.90(IP地址随便配置,只要两个E0口都能互相PING通就行)再到配置模式下面输入 tftp-server c2500-js-l.122-7a.bin(这是你好的IOS里面的IOS文件名,用show version 来查看你的IOS文件名
这台A己经配置好了以后,再到B这台来配置,首先让这台启动到BOOT模式,在全局配置模式下面输入config-register 0x2101 再重启路由器,启动到BOOT模式以后,同样配置你的E口,到了BOOT模式以后,输入copy tftp flash ,提示你输入TFTP服务器,再输入文件名,就可以了,具体操作步骤如下:
cisocA#conf t
cisocA(config)#tftp-server c2500-js-l.122-7a.bin
cisocA(config)#int e0
cisocA(config-if)#ip add 192.168.10.90 255.255.255.0
cisocA(config-if)#no shut
ciscoB(config)#conf t
ciscoB(config)#config-register 0x2101
ciscoB(config)#end
ciscoB#reload
System configuration has been modified. Save? [yes/no]: y
ciscoB(boot)>enable
ciscoB(boot)#conf terminal
ciscoB(boot)(config)#int e0
ciscoB(boot)(config-if)#ip add 192.168.10.80 255.255.255.0
ciscoB(boot)(config-if)#no shut
ciscoB(boot)(config-if)#end
ciscoB(boot)#erase flash
System flash directory:
File Length Name/status
1 15533612 c2500-js-l.122-7a.bin
[15533676 bytes used, 1243540 available, 16777216 total]
Erase flash device? [confirm]
Are you sure? [yes/no]: y
Address or name of remote host [192.168.10.80]? 192.168.10.90
Source file name? c2500-js-l.122-7a.bin
Destination file name [c2500-js-l.122-7a.bin]?
Erase flash device before writing? [confirm](回车)
Copy 'c2500-js-l.122-7a.bin' from server
as 'c2500-js-l.122-7a.bin' into Flash WITH erase? [yes/no]y
输入Y以后,程序就自动COPY IOS,等成功以后,你再如下配置
ciscoB(config)#config-register 0x2102
ciscoB(config)#reload  


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_697785.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2