Solved

Cisco Boot Startup Configuration

Posted on 2014-12-12
24
101 Views
Last Modified: 2015-08-16
Hello Experts,

Can someone please tell me how to configure the router to boot the startup config from the bootflash?

For example I copied a startup config to the bootflash called 'vanilla'. I want to be able to use that startup config in bootflash to be loaded in the router whenever the router reloads - even if I do a wr mem or copy run to startup.

I'm sure its possible but not sure how.

Cheers

Carlton
0
Comment
Question by:cpatte7372
  • 14
  • 7
  • 2
  • +1
24 Comments
 
LVL 6

Expert Comment

by:Matt
Comment Utility
copy flash:/vanilla startup-config
0
 

Author Comment

by:cpatte7372
Comment Utility
Thanks for responding, but how to I ensure that each time the router reloads it reloads with 'vanilla' configuration?

Cheers
0
 
LVL 28

Accepted Solution

by:
Jan Springer earned 500 total points
Comment Utility
if you want to boot into an alternate config file, i believe that you will have to use tftp and load it from the network.
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
If you want to boot every time with your "vanilla" config, you can use EEM (Cisco IOS Embedded Event Manager) and run script using CRON - I assume you have CISCO router?

For example this:
http://wiki.nil.com/Time-based_wireless_interface_activity

event manager applet ReloadFreshConfig
 event timer cron name ReloadFreshConfig cron-entry "0 7 * * *"
 action 1.0 cli command "enable"
 action 1.1 cli command "configure terminal"
 action 1.5 cli command "copy flash:/vanilla startup-config "
 action 1.6 cli command "reload"
0
 
LVL 28

Expert Comment

by:Jan Springer
Comment Utility
if you want to save your changes to "vanilla", you can create an alias

alias exec van copy running flash:/vanilla

and then when you do a "van" (or whatever you choose to call it, it gets saved to the appropriate file.
0
 

Author Comment

by:cpatte7372
Comment Utility
Hi Ian,

This might sound silly, but I don't want to save my changes for "vanilla", I want to boot every time from my "vanilla" config as highlighted by Matt.

But thanks a lot for responding.

Matt,  I'm going to try your suggestion.

I will let you know how I get on

Cheers
0
 

Author Comment

by:cpatte7372
Comment Utility
Hi Matt,

I get the following error when I apply the following command on my Nexus:
N7K-23(config-applet)#  event timer cron name ReloadFreshConfig cron-entry "0 7 * * *"
                              ^
0
 

Author Comment

by:cpatte7372
Comment Utility
Matt,

I have the following options:

N7K-23(config-applet)# event ?
  cli              Create a cli event specification
  counter          Create a counter event
  fanabsent        Create fanabsent event specification
  fanbad           Create fanbad event specification
  memory           Create memory thresholds event specification
  module           Create a 'module' event specification
  module-failure   Create a 'module-failure' event specification
  oir              Create Online-Insertion-Removal event specification
  policy-default   Use the event in the system policy being overridden
  poweroverbudget  Create poweroverbudget event specification
  snmp             Create a 'snmp' event specification.
  storm-control    Create a storm control event specification
  syslog           Create a syslog event specification
  sysmgr           System manager related events
  temperature      Create temperature event specification
  track
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
0
 

Author Comment

by:cpatte7372
Comment Utility
NK7
0
 

Author Comment

by:cpatte7372
Comment Utility
Matt,

Even without the command "N7K-23(config-applet)#  event timer cron name ReloadFreshConfig cron-entry "0 7 * * *"

If I save the config with copy run start the EEM won't bring back the  "vanilla" config when I do a reboot. However, it will work if I don't do a copy run start

I would really like "vanilla" config to be built each time, regardless of issuing the command copy run start.

Is that possible?

Cheers
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
Did you try

copy running-config startup-config

or

copy flash:/vanilla startup-config
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:cpatte7372
Comment Utility
Hi Matt,

Just to give you an example

The hostname of the nexus in the vanilla config is NK7-2. If I change the hostname to NK7-33 and do a reload without issuing the command copy running-config startup-config when the nexus comes back it will still have the hostname NK7-2.

However, If issue the command copy running-config startup-config before reloading it will comeback with the hostname NK7-33.

I would like the vanilla config (with NK7-2) to come back after reload regardless of whether copy running-config startup-config is issued or not.

Does that make sense?

Cheers
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
OK, it makes sense but why would you want to change hostname anyway? Hostname is defined in config file. If you change hostname and you have already defined RSA keys to SSH access, you will always get warning from SSH client that RSA keys do not match your FQDN of CISCO...

What is the purpose to change hostname anyway?

I'm now looking at CISCO documentation how to use EEM with NEXUS devices.
0
 

Author Comment

by:cpatte7372
Comment Utility
Matt,

I guess what I'm saying is that I would like the startup config to be taken from "vanilla" no matter what

Cheers
0
 

Author Comment

by:cpatte7372
Comment Utility
Hi Matt,

I was just using the hostname as an example - it could be any config change

Cheers
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
OK, then save you vanilla config like "base-config.txt" in flash or disk0 device on Nexus.

I will try to find EEM example how to copy base-config.txt to your startup-config and then reloads device. Example I gave you was used for CISCO routers.
0
 

Author Comment

by:cpatte7372
Comment Utility
Matt,

I'm basically trying to ensure that users can't overwrite the startup config with the command:

copy running-config startup-config

One way is to not allow the command copy running-config startup-config. Is that possible?

Cheers
0
 
LVL 6

Expert Comment

by:Matt
Comment Utility
If user has privilege 15, he/she can do anything with device. Who is managing this device, who can change config?
0
 

Author Comment

by:cpatte7372
Comment Utility
I'm managing the device.

I'm sure there is a way to prevent a command from being run not matter the privilege....
0
 

Author Comment

by:cpatte7372
Comment Utility
If that's not possible I therefore the startup config to boot from flash regardless...
0
 
LVL 26

Expert Comment

by:Predrag Jovic
Comment Utility
I'm sure there is a way to prevent a command from being run not matter the privilege....
I don't think that is possible. Even you would not be able to make changes to your router. It is the same logic as no one have password to router, but you are able to see config on piece of paper. :) Why don't you just change passwords, if you follow this logic?

You can copy your desired startup config to flash

#copy start flash://flashstart.cfg
Destination filename [flashstart.cfg]?

You can configure router to boot from that file
(config)#boot host flash://flashstart.cfg

In that case if someone change startup config and reboot router, after reboot rooter will start with configuration from flashstart.cfg. So, start config would be still the same as long as no one deletes this redirection.

In running config you will have redirection to flash
boot-start-marker
boot host flash://flashstart.cfg
boot-end-marker


I hope that's what you are looking for.

To remove redirection to boot router from flash
(config)#no boot host flash:
(config)#do copy run start
0
 

Author Comment

by:cpatte7372
Comment Utility
Hello Predrag,

I have a work around - I will simply prevent users from saving the running config to startup config :-)
0
 

Author Closing Comment

by:cpatte7372
Comment Utility
Thanks Jan
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article is a guide to configure bridging on Cisco Routers.  This is something I never knew was possible until after making a few phone calls to Cisco.  Using bridging saved our company money by not requiring us to purchase a new switch.  Bridgi…
Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now