Upgrading IOS code over the network!

Unanswered Question
Aug 21st, 2008

Is it possible to upgrade IOS code on a remote router or switch over the network from your desk, without having to go to that location?

If so, please provide the commands to do so. This is not your standard TFTP from the console connection.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Edison Ortiz Thu, 08/21/2008 - 17:22

Well, all upgrades are performed over IP, not over the console connection. The only way to upgrade the IOS over the console is by using xmodem.

TFTP is done via IP and it works the same way being in the same building as being on a remote location.

It's recommended to upgrade the IOS near the device in case something happens.

The procedure is the same, no special commands.




Richard Burts Thu, 08/21/2008 - 17:46


Edison has focused in his response on the aspect of your question about upgrading IOS from the console. I interpret your question slightly differently. If you are at your desk somewhere that is remote from the router it should still be possible to upgrade the code.

If you are remote:

- the first step is to remotely access the router (using telnet or ssh or whatever remote access you wish).

- The second step is to access privilege mode (using the enable command)

- the third step is to copy the IOS image from some server in your network to the router. Many people use TFTP for this. I advocate using FTP for this (if you have an FTP server which has a copy of the code).

- the fourth step is to configure boot system commands so that the router will boot the new image when it boots.

- the fifth step is to save the running config to startup config so that the boot system commands are saved.

- at this point you can either manually initiate a reboot, or you can schedule a reboot, or you can wait for some event which will cause the router to reboot.

- when the router reboots it should be running the new code.

I have done this process many times and it works quite well when you are remote from the router that needs to be upgraded.



Edison Ortiz Thu, 08/21/2008 - 18:27

Edison has focused in his response on the aspect of your question about upgrading IOS from the console

No, I did not.

stephenshaw Fri, 08/22/2008 - 04:42


I've done many, many IOS upgrades over slow bandwidth connections. i.e. transfers that take well over an hour to complete. FTP is the better way but can also be done using TFTP. I highly recommend that the "line vty 0 4" be set to either "exec-timeout 0 0" or to a high value to ensure your telnet or ssh session remains open so that you always retain the connection during the transfer.



misramanish Fri, 08/22/2008 - 09:45

Thank you both for your replies. Rick, I found your response more accurate in terms of what I was looking for. Edison is correct if I'm sitting by the router doing the upgrade.

So, to do a remote TFTP or FTP, I have to ensure correct routing etc? Would you still do a standard "copy tftp flash" and instead of specifying the local PC/TFTP address, you will now specify the remote TFTP server which holds the code? Is it a fairly foolproof way to go about for sites you can't get to on a short notice?

Thanks again!

Edison Ortiz Fri, 08/22/2008 - 09:55

Edison is correct if I'm sitting by the router doing the upgrade.

Hmm.. It seems my post wasn't clear enough as I already confused 2 individuals.

My post was referring to the fact the upgrade is the same procedure whether it takes place from remote or in the same building.

TFTP or FTP uses IP so you must be concerned about reachability via IP from/to the device being upgrade and the device running the TFTP/FTP service.

I mentioned console in my post just to correct the assumption that you were upgrading the IOS via console while doing the task in a local segment. Your admin session may have been via the console connection but I'm sure you issued the "copy ftfp: flash: - or copy ftp: flash:" - if so, this was a TCP/IP session not a console session.

Hope this clear any misunderstanding and good luck with the upgrade.




Richard Burts Fri, 08/22/2008 - 10:06


Other than the fact that Edison mentions that doing xmodem is the main thing that differentiates doing upgrades from the console or doing them remotely, and that I spell out steps more explicitly, I think there really is not so much difference between his response and mine.

Other than the step of how you access the router the process of doing an upgrade is pretty much the same whether you are remote or are on the console. You still need to have acquired the new version of code, you still have to have the new code available on a server, you must still verify the content of flash, you must still copy the new code from the server to flash, you must still configure boot system statements and save the config, and you must still reboot the router. And the way that you do these steps is the same whether you are on the local console session or are accessing the router remotely.

Yes you must ensure correct routing from the router to the server on which the new code is stored (and that would be the same requirement whether you are remote or are on the console). You still need to do a copy tftp: (or ftp) flash: (and it does not make much difference whether the server is on the local subnet or remote - just as long as the server is reachable).




This Discussion