PackeTsar / freeztp

An Open-Source Zero-Touch Provisioning System for Cisco IOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help with stacking configuration

DanielB1456 opened this issue · comments

I'm not sure if anyone checks these issues on here, but here I am :)

I've managed to get the configuration working for a single switch perfectly fine. I understand how this works and how to set them up for other switches. What I can't get working for some bizarre reason is the stacking aspect.

For example: Lets say I have 4 switches I wanted to setup and configure. I want to be able to plug it onto the network like the singular switch and it to download the configuration for all the switches and setup the stack.

My issue: I've tried following the guides and tips but it doesn't seem to work will. What I've been doing is using the "idarray" command and adding the serial numbers into an array, I've then created a configuration to test and associated it with the array. But every time I let the switch reboot and initialise it just goes to the default configuration. I'm not sure if this is me missing something or doing it wrong but I don't seem to be getting anywhere with it. Could someone give a working example and explain how it works so I can get mine working?

EDIT

Also had another question, with the configuration how can you get it so it applies the interface commands for 1/x/x, 2/x/x, 3/x/x etc

Thank you, any help would be very much appreciated :)

commented

What switch model(s) are you working with? Are you connecting the stack cables to all switches before powering them up?

...every time I let the switch reboot and initialise it just goes to the default configuration...

During testing, make sure you do a write erase before re-attempting the ZTP process.

Also had another question, with the configuration how can you get it so it applies the interface commands for 1/x/x, 2/x/x, 3/x/x etc

You put the interface or interface range commands in your template as you would during normal configuration.

They are all Cisco C9200's series switches. Every time I've tried to boot them I've plugged the stacking cables in before. They work fine in terms of stacking if I dont set them up with ZTP so that bit seems okay. For every test run I've done, I have done a write erase every time. Thank you for the last bit!

I think the bit I'm most confused about is what commands are needed for the stacking to work. Is it just the idarray bit I need and then assigning that to a template or do I need more than that? I also assume you boot both switches at the same time or do I need to stagger them?

Thanks the speedy reply!

Are you doing regular stacking (with stack cables on the back of the switch), or virtual stackwise?

For regular stacking, you will likely want to completely connect the stacking cables before powering the switches up, so they boot up as a single "logical" switch and pulls down its configuration. This happens outside configuration/ZTP; i.e. the stacking/election process happens during the boot process before the switch attempts to pull anything from FreeZTP.

The tricky part is setting the stack numbers on the member switches. There are some tricks to doing that written by @derek-shnosh and @pschapman here and here

commented

OK so are you:

  1. Just wanting the config to set a stack priority on each member?
  2. Wanting to get ZTP to successfully set the stack ID numbers on all the switches?
  3. Both?
  4. Something else?

OK so are you:

  1. Just wanting the config to set a stack priority on each member?
  2. Wanting to get ZTP to successfully set the stack ID numbers on all the switches?
  3. Both?
  4. Something else?

Pretty much all of that. But I believe cmc42's post above makes sense for what I need really and hit the nail on the head really. I will also have a look at what you linked as well as they seem to explain it really well also

I really appreciate all the help, I'll give it a go when I'm back at work ! :)

Thank you again guys

My apologies @DanielB1456, I thought you and @cmc42 were the same person asking questions. I wasn't looking at the usernames.

If you run in to trouble with it let us know. We're happy to help.

One more comment for your lab testing. Newer IOS-XE devices don't always kick off the PNP process after a simple wr erase. You also have to clear the self-signed certificates.

Catalyst 9200/9300

wr erase
del /force nvram:*.cer
del /force flash:vlan.dat

Catalyst 9500

wr erase
del /force nvram:*.cer
del /force bootflash:vlan.dat

Catalyst 9400/9600

wr erase
del /force nvram:*.cer
del /force bootflash:vlan.dat
del /force stby-nvram:*.cer
del /force stby-bootflash:vlan.dat