cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1806
Views
30
Helpful
5
Replies

copying new run-config on cisco router

G3261
Level 4
Level 4

This topic probably discussed gazillion times..my apologies but things are not making sense to me!!!

Lets say I have Cisco 29xx router running and I want to change the run-config to a new modify one. How do I do this using usb stick? Is new run-config file needs to have specific extension like .cfg? Can I just have file with an extension .txt?

I can copy the file from usb to flash and then how do I tell the router to use the new one?

Is it a better practice to copy the file from usb to nvram (startup-config) directly and then do copy run to start?

After all the changes, when I reload the router, it goes back to default config even though I copied the new run-config!!! Thankyou

1 Accepted Solution

Accepted Solutions

You are welcome. It seems that there is still some confusion about the files and about copying. So let me try to explain from a slightly different perspective. You have created a new config file in notepad, and this file has the txt extension. You then copy the contents of the file into running config. Note that running config does not have a file extension. After the copy the new content is in running config which still has exactly the same name.

Some people think of copying a new config into running config as a replacement of running config. As I tried to explain in my previous post it is really not a replacement of running config but is more of a melding of new into old. Note that startup config is different. If you copy a new file into startup config it is a replacement - all of the old content is removed and new content is inserted.

There are a couple other things to keep in mind about reloading/rebooting the router and what happens with the config file. When the router is reloaded the existing running config goes away and the router will use the startup config to create the new running config. So if you are making changes to the running config (copying a new config into running config) you need to be sure to save running config into startup config, or else your changes in the config will be lost. Another thing to be aware of is the config register. An IOS router has a config register and you can see what it is in the output of show version. A typical config register would be 0x2102. If the config register is changed and the next to last digit is 4 (like 0x2142) then that is a signal that at boot time the router will ignore what is in startup config and will boot what is essentially an empty config (no IP addresses, no user names, no routing protocol, etc). The most common way that the config register changes is when someone has to perform password recovery on the router.

HTH

Rick

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

If you have a new config on a usb you could do a copy from the file on usb to the running config. Bear in mind that doing a copy of a file to running config has these results:

- if the file on usb has a command that is not in the current running config the new command is inserted into the running config.

- if the file on usb has a command that is changed from what is in the running config the command in running config is changed.

- if the running config has a command and that command is not present in the file on usb the command remains in running config (you can not delete a command in running config when you copy a file to running config).

That last point surprises some people.

You ask "I can copy the file from usb to flash and then how do I tell the router to use the new one?" If you copy the file from usb to flash it simply transfers the file from one media to another. If you want the router to use the new file you must copy it to running config.

You also ask "After all the changes, when I reload the router, it goes back to default config" Bear in mind that when you reload a router it discards the current running config and after booting it will load what is in startup config. An important thing to remember is that after making changes to running config (if you want them to be remembered and used after reload) you must copy running config to startup config.

HTH

Rick

Hello Rick, thank you so much for taking  time and writing  excellent explanation. I am going to try this again tomorrow morning and let you know. If I have new run-config (ex.I used notepad to make a new one), obviously, it will have .txt extension. Does this creates any issue when I  copy  new file in .txt format and use it as new running config on the router? Is that makes sense?

 

You are welcome. It seems that there is still some confusion about the files and about copying. So let me try to explain from a slightly different perspective. You have created a new config file in notepad, and this file has the txt extension. You then copy the contents of the file into running config. Note that running config does not have a file extension. After the copy the new content is in running config which still has exactly the same name.

Some people think of copying a new config into running config as a replacement of running config. As I tried to explain in my previous post it is really not a replacement of running config but is more of a melding of new into old. Note that startup config is different. If you copy a new file into startup config it is a replacement - all of the old content is removed and new content is inserted.

There are a couple other things to keep in mind about reloading/rebooting the router and what happens with the config file. When the router is reloaded the existing running config goes away and the router will use the startup config to create the new running config. So if you are making changes to the running config (copying a new config into running config) you need to be sure to save running config into startup config, or else your changes in the config will be lost. Another thing to be aware of is the config register. An IOS router has a config register and you can see what it is in the output of show version. A typical config register would be 0x2102. If the config register is changed and the next to last digit is 4 (like 0x2142) then that is a signal that at boot time the router will ignore what is in startup config and will boot what is essentially an empty config (no IP addresses, no user names, no routing protocol, etc). The most common way that the config register changes is when someone has to perform password recovery on the router.

HTH

Rick

I am sure there is a good reason having 'Guru' in your name!!! Much appreciated... very clear explanation. Thank you

You are welcome. I am glad that my explanations have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick
Review Cisco Networking for a $25 gift card