cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6063
Views
0
Helpful
22
Replies

Boot from startup-config only if TFTP fails?

brianjmurrell
Level 1
Level 1

I was successfully booting my 3750 switch from DHCP and TFTP.  I discovered that during a power outage though that the TFTP server can race with the switch and the switch might come up before the TFTP server and not have a valid configuration as a result.  So I did a:

#copy running-config startup-config

to provide a local configuration the switch should fall-back to if the TFTP boot fails.

 

But it seems now that the switch won't even try a TFTP boot.

 

Is there any way to achieve the above?  First attempt a TFTP boot, and only if that fails, fall-back to the startup-config?

 

22 Replies 22


@balaji.bandi wrote:

If all same, Switch need to boot as expected from Local config right, why it is looking for TFTP for config ?


Hrm.  I thought this part was made clear already.  I prefer to edit configurations in a local editor (i.e. and not have to learn forth-eleven configuration UIs, one for each different type/brand of devices, etc.), where changes can tracked with source-code management tools (i.e. git), and backed up/archived in regular system backups, etc.

 

Logging into devices and making changes on devices offer none of those benefits.  There is no change tracking, no backup, etc.

 

In any case, I think the original question has been answered and we are really just beating a dead horse here.

 

Thanks for all of the input everyone!


@brianjmurrell wrote:

But it would be nice to also have a startup-config as a fallback in case the TFTP server is unavailable.


So every time the switch boots up, you want the switch to grab the config from the TFTP server and not from the startup-config.  Is this what you want to achieve?


@Leo Laohoo wrote:

So every time the switch boots up, you want the switch to grab the config from the TFTP server and not from the startup-config.  Is this what you want to achieve?


Yes, plus, if the TFTP fetch fails, for any reason, fall-back to the startup-config.  But it seems that this is not actually possible with the 3570 switch's IOS.


@brianjmurrell wrote:
Yes, plus, if the TFTP fetch fails, for any reason, fall-back to the startup-config.


I have not heard of any Cisco appliance that can do "if-then-else" with the config boot variable string.

we understand you already got the solution working, but something is not clear to us here. Not to make a circle on this topic.

 

1. You do dynamically do changes config using TFTP to the device. and save the config on the device - is this correct?

2. if so when the device saved the config, even it power off and on that should boot with a known good config ? it should not look for TFTP (this what my point here).

 

As Long as you are happy with your environment, we only give suggestions, apologies digging deep, ( since we are not clear so we asked many questions, are we doing the right way? that is the point here )

 

appreciated your inputs.

 

 

 

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help


@balaji.bandi wrote:

we understand you already got the solution working,

Well, not really. I have what I think is a kludgy work-around. Not really a solution. I don't think a solution exists on the device/firmware I am using.

 

1. You do dynamically do changes config using TFTP to the device. and save the config on the device - is this correct?

As my work-around, yes.

 

2. if so when the device saved the config, even it power off and on that should boot with a known good config ? it should not look for TFTP (this what my point here).

Correct. Unfortunately.

 

As Long as you are happy with your environment

Well not really happy, but working within the constraints.

Spoiler

2. if so when the device saved the config, even it power off and on that should boot with a known good config ? it should not look for TFTP (this what my point here).

Correct. Unfortunately.

Not sure, But switch has save config, so all the time it boots with known good config.

 

Spoiler

As Long as you are happy with your environment

Well not really happy, but working within the constraints.

Not sure what is the end goal you able meet 100% what you looking, only automation can meet the requirement.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

 

 >...Because it appears to be the only way to force it to boot from TFTP.  As I described, it would be better to have a startup-config but only fall-back to that if the TFTP boot fails.  Ultimately, I want to control/store switch configs on a server where editing the config is simple and not having to mess around with configuration UIs.

 - I would consider that bad practice in context of good Intranet network-servicing , the network must have a priority 'on boot' , hence file services may not be available leading to a race condition in  the context of what you are doing. I would never manage a bunch of switches in that way , startup-config boot leads to knowing-result in  the context of what the device will be doing when it is 'servicing the network again'.   Configuration management and archiving can be obtained by tools such as Cisco Prime (e.g.)

 

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Review Cisco Networking for a $25 gift card