1

How do I rewrite startup-config on a Cisco 1602 router without affecting the running-config? Outgoing connections from the router (scp, http) are not allowed. I'm not connected to the serial port, that excludes xmodem and ymodem. Ideally, I want to cut and paste a file from my local system in a way similar to "config terminal". But it's OK to create a temporary file on the router.

3
  • Could you elaborate about why outbound connections are not allowed? That makes this a nontrivial problem to solve
    – This
    Jan 16 '14 at 22:14
  • I'm not a Cisco guru but this article details how to copy a config file to the startup-config. 1. download a copy of the startup-config or running-config to your computer. 2. Edit the downloaded config file. 3. copy it to the startup-config. - cisco.com/en/US/docs/ios/fundamentals/configuration/guide/…
    – joeqwerty
    Jan 16 '14 at 22:30
  • The goal is to simplify the instructions for technicians. They are taught to cut-and-paste to "config terminal". But they have to erase the configuration first, and that means they cannot do the upgrade remotely, as the default config won't connect. It would take time to teach them to upload the config for to some server. They would need to ensure that the server is accessible from their machine and the router. They are on Windows machines with putty, I can tell them to use xmodem, but Cisco only uses it over serial lines.
    – proski
    Jan 17 '14 at 15:39
1

Here's my solution that worked perfectly on a Cisco 800-series router. Without resorting to silly blue serial cables or external TFTP servers.

The secret sauce here is the built-in tcl scripting language in Cisco IOS. This allows you to stuff all the commands in one go and configure the interfaces as you please. The reload in 10 is just a safety net.

enable

reload in 10

tclsh

ios_config "int vlan1" "ip address 10.1.1.1 255.255.255.0" "int fa4" "ip address 192.168.20.72 255.255.255.0" "end"

This will indeed cut off your live connection to the router, but the new interface changes are all in effect and there's no need to reboot the router even. I simply walked over to the router, swapped the ethernet cable from the LAN port to the WAN port and voila, this time I was able to connect to the Cisco over the WAN port.

After confirming that everything was looking good, I did a final

wr mem

..and the new configuration is permanently stored as the new startup-config.

Original answer here: cisco config delayed apply?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.