09-17-2017 01:57 AM - edited 03-01-2019 04:40 AM
Hi Experts
we have a customer who has switch stack (member varies fro 3 4 ...8)
We have installed APIC EM and going to use PnP to manage those switches. We are not sure how to make a switch as Master in stack using APIC EM. is there a best practice to do that ? plz suggest
thanks
Abhishek
09-17-2017 02:03 AM
The stack master commands are done in exec mode, not config mode.
The best way to do this is to use an EEM script.
I have published an example in the past.
Adam
09-17-2017 02:06 AM
thanks Adam for replying. can you please re-direct me to that example ?
09-17-2017 02:17 AM
Sure.
An overview of using EEM scripts in config is here Network Automation with Plug and Play (PnP) – Part 6
The specific script you need is:
line vty 5 15
login local
transport input ssh telnet
!
event manager applet POST_PNP
event timer countdown time 30
action 1.0 cli command "enable"
action 1.1 cli command "switch 1 priority 15" pattern "continue"
action 1.2 cli command "y"
action 1.8 cli command "config t"
action 2.3 cli command "no event manager applet POST_PNP"
action 2.8 cli command "end"
action 2.9 cli command "wr mem"
action 3.0 cli command "end"
end
09-17-2017 02:20 AM
BTW, what model switches are they?
09-17-2017 02:23 AM
Thanks for sharing the post. These are 3850s.
09-17-2017 03:15 AM
Hi Adam
I will try that out in LAB. Before that can you verify if below flow is correct :
sw-1........................
sw-2.......................... PnP
sw-3........................
sw-4.......................
there is a stack of 4 switches and PnP Server is also in place.
now in order to make sw-1 as master, I should use the eem script that you gave along with other template commands (like interface etc...) that I want on the switch. is that correct ?
09-18-2017 12:33 AM
That will make switch #1 master (after a re-election).
You also need to take into account the switch member number. Today, the only way to do that is via power-on order (top to bottom).
The reason that is important is your config file will contain interfaces which have the member number as the first number.
e.g. Gig1/0/10 will be stack member number 1, while Gig3/0/10 will be member number 3.
Stacking will support any switch contacting APIC-EM (as the PnP agent provides the serial numbers for all members of the stacks).
Adam
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:
This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community