Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Cisco Boot Startup Configuration

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
cpatte7372
Asked:
cpatte7372
  • 14
  • 7
  • 2
  • +1
1 Solution
 
MattCommented:
copy flash:/vanilla startup-config
0
 
cpatte7372Author Commented:
Thanks for responding, but how to I ensure that each time the router reloads it reloads with 'vanilla' configuration?

Cheers
0
 
Jan SpringerCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MattCommented:
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
 
Jan SpringerCommented:
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
 
cpatte7372Author Commented:
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
 
cpatte7372Author Commented:
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
 
cpatte7372Author Commented:
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
 
cpatte7372Author Commented:
NK7
0
 
cpatte7372Author Commented:
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
 
MattCommented:
Did you try

copy running-config startup-config

or

copy flash:/vanilla startup-config
0
 
cpatte7372Author Commented:
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
 
MattCommented:
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
 
cpatte7372Author Commented:
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
 
cpatte7372Author Commented:
Hi Matt,

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

Cheers
0
 
MattCommented:
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
 
cpatte7372Author Commented:
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
 
MattCommented:
If user has privilege 15, he/she can do anything with device. Who is managing this device, who can change config?
0
 
cpatte7372Author Commented:
I'm managing the device.

I'm sure there is a way to prevent a command from being run not matter the privilege....
0
 
cpatte7372Author Commented:
If that's not possible I therefore the startup config to boot from flash regardless...
0
 
PredragNetwork EngineerCommented:
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
 
cpatte7372Author Commented:
Hello Predrag,

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 14
  • 7
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now