07-14-2021 12:35 PM
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?
07-16-2021 12:29 PM
@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!
07-16-2021 05:38 PM
@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?
07-17-2021 06:05 AM
@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.
07-17-2021 06:54 AM
@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.
07-17-2021 07:22 AM
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.
07-20-2021 08:23 AM
@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.
07-20-2021 08:56 AM
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.
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.
07-15-2021 02:19 AM
>...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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide