Automation & Tools

Remote Configuration Tip

Need to change a remote router's config when the commands will cut off your session? Put them in a file on a TFTP server and copy it into the running-config.

Tony Mattke · 2011.04.18 · 1 min read

I got asked a rather interested question the other day. An engineer needed to make remote configuration changes to a router, but do the commands he needed to run, he would be disconnected in the middle of his configuration. He asked me if I could write an EEM, or TCL script to make the changes for him. This seemed like a reasonable request, until I thought about it for a bit.

The solution I came up with is much, much simpler than doing any scripting. Create a file with the changes you wish to make, place it within the scope of your TFTP server and once its there, simply issue a copy tftp: running-config making sure to pass the correct IP and file name. Even so the command states its doing a copy, it will not over write your current running configuration. This will simply merge the contents of your file with the current running-config. Tada!

Topics

Related Posts

Security · 8 min read

Best Practices and Securing Cisco IOS

2011.09.06

Everyone has different views on hardening IOS, and while I do not claim to be an expert, these are the practices that I commonly use when bringing up a new device.

Security · 2 min read

Time-based ACLs

2011.04.25

Ever since Cisco released IOS 12.0.1T we’ve had the ability to broaden the reach of the extended ACL to allow the influence of time.

Networking · 7 min read

IOS Embedded Packet Capture

2011.02.14

Tired of setting up SPAN sessions? Need to do some packet analysis? Since IOS 12.4(20)T Cisco has made Embedded Packet Capture (EPC) available.

Comments

2 archived comments from Disqus 2011
Ziyad Basheer
heh, you can also use the configure overwrite-network <protocol of your choice> :)
@zztoppingdc

I’ve used this trick a ton of times.

Combine with the following for remote control bliss:

write mem reload in 5 copy tftp://x.x.x.x/config.txt running-config

If you are still able to connect after your config upload, login and do “reload cancel”, if not, just wait the 5 minutes and the reboot will reset the config :-)