SoFunction
Updated on 2025-04-12

The process of upgrading IOS between two Cisco routers

The author has a 2501 router that has a bad IOS (cisocB), and the other 2501 router that has a good IOS (ciscoA). The good IOS has disappeared on my PC, but it is a waste of time to pass the good to the PC and then to the bad ones. Later, I thought of a way to directly configure a good router as a TFTP server.

My connection method is that the two routers are connected through the E0 port. I first configure the E0 port on the good router (cisocA) to have the IP address 192.168.10.90 (configure the IP address at will, as long as the two E0 ports can PING each other) and then enter tftp-server c2500-js-l in the configuration mode. (This is the IOS file name in your good IOS. Use show version to view your IOS file name.

After this A has been configured, then go to B to configure it. First, let this machine boot into BOOT mode. Enter config-register 0x2101 in the global configuration mode. Then restart the router. After starting to BOOT mode, configure your E port. After entering BOOT mode, enter copy tftp flash, prompt you to enter the TFTP server, and then enter the file name.

The specific operation steps are as follows:

 cisocA#conf t

cisocA(config)#tftp-server c2500-js-l.

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.
[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.
Destination file name [c2500-js-l.]?

Erase flash device before writing? [confirm] (Enter)

Copy 'c2500-js-l.' from server
  as 'c2500-js-l.' into Flash WITH erase? [yes/no]y

After entering Y, the program will automatically COPY IOS. After successful, you can configure it as follows

ciscoB(config)#config-register 0x2102

ciscoB(config)#reload

The steps are completed

Article entry: csh     Editor in charge: csh