What is a Stack
Cisco switches can be divided according to several parameters. I would now allow myself to divide them into three groups. Basic fixed switches (fixed), which operate at the 2nd layer according to the OSI model, represented by Catalyst 2960. More advanced fixed switches, which can also operate at higher layers, mainly at the 3rd layer and thus perform routing, represented by Catalyst 3750. And modular switches, which consist of a chassis into which various modules are inserted (the first must be a supervisor), represented by Catalyst 6509.
For switches of the middle category (C3750), Cisco has a technology called StackWise and StackWise Plus (in newer C3750E), which allows switches to be connected into a stack. The basic features (one could say advantages) of a stack are:
- the entire stack is configured (and actually behaves) as one switch with the sum of the ports
- the configuration is shared and stored by all members (each has a copy)
- it has one common IP address and management interface (telnet, web, ssh)
- members of the stack can be easily added and removed
- in case of damage to one member of the stack, it can be easily replaced with a new one (usually without the need for configuration)
- stacks thus serve to increase reliability
Creating a Stack
A stack is created by connecting switches with a special stacking cable (usually included with the switch). The connectors are located on the back of the switch and there are two because the stack is connected in a closed loop. This loop always passes through the circuits inside the switch, if a cable is missing, a loopback is applied at the unconnected port. This bus (interconnect) has a speed of 16 Gbps or 32 Gbps with StackWise Plus, but data travels bidirectionally with intelligent route calculation, so the speed is stated as double, i.e., 32 Gbps or 64 Gbps.

Master Switch
Individual switches are referred to as members of the stack. One switch is always the master, which manages the entire stack (we connect to it on the CLI, it manages the exchange of routing information, forwards forwarding tables to other members, etc.). The master switch is selected by a certain process and theoretically, any switch can become it. Up to 9 switches can be connected together and they are assigned sequential numbers - identifiers. From the factory, each switch is set to number 1 and after connecting to the stack, it is assigned the lowest available number.
Master Switch Selection
The process that selects the master switch goes through certain criteria, which are hierarchically listed here:
- user selection - we can configure who should be the master (using the highest priority)
- priority by HW and SW - the newest switch, the highest HW version with the highest SW version (features - feature set) has priority
- existing configuration - a switch with a configuration has priority over a new switch
- uptime - the longest-running switch
- MAC address - the lowest MAC address wins
Adding a New Member
After connecting a new member, the master should check its IOS and possibly upload the correct version. All members of the stack must have the same IOS version with the same features. The master then configures the switch, copies the configuration and other data to it. So if everything goes as it should, there should be no need for any intervention after connecting the connectors and starting the switch.
Connecting a new member can be done while running. We disconnect one place in the stack (so that it does not fall apart) and connect the new switch (this is important). Of course, the new connection must again be in a loop. But beware, in practice, it happened to me that after connecting a new member and upgrading its IOS, the stack software fell apart. Although it then automatically reconfigured, the individual switches restarted.
A few more information about IOS upgrade/downgrade performed by the master switch. After connecting a new member, information about the HW is obtained, and if it is the same as the master, its IOS is uploaded. The archive command is used for installations. If the HW version is different, the master looks for the necessary IOS in its flash memory or on a TFTP server (if set). If the correct version is not found, the connected switch is set to Version mismatch and regularly reboots (at startup it always looks for the correct version).
Removing a Stack Member
When removing a switch or damaging a cable, the stack finds out and routes communication outside the removed switch or damaged path. The port configuration, however, remains, so after connecting a new switch, it gets the original configuration (depends on the stack member number).
If the connection is interrupted in one place, the loop is interrupted, reducing the speed by half, but everything continues to work. After restoring the loop, functionality automatically returns.
StackWise and StackWise Plus
The StackWise technology has a number of features that serve for efficient and powerful operation. StackWise Plus adds a few more improvements, doubling the bus speed and supporting 10 Gigabit Ethernet ports.
Switches with StackWise and StackWise Plus technology can be combined together, but the global StackWise mode is negotiated. The main thing is that the interconnect speed is degraded to a theoretical 32 Gbps.
Combination of HW Versions of Switches
An interesting solution for practice can be the combination of switches by using one or two (depending on the number of links to the core) Catalyst 3750E, which have 10 Gbps uplink ports, and the rest Catalyst 3750G, which are cheaper. Although the interconnect speed is degraded by half, this may not be a limiting factor.
In such a solution, I encountered a problem where, after connecting a new member with a different IOS version, its upgrade started, but somehow the flash memory on the master switch got locked. Therefore, it is necessary to perform the upgrade manually and restart the master to release its memory. The simplest way is to upgrade the IOS before connecting the switch to the stack.
Mode Button - Stack
If we are physically at the switch and need to find out basic information about the stack, the number of members, and the current switch ID in the stack, we can use the MODE button. By repeatedly pressing it, we light up the LED next to the STACK label. At this moment, the LEDs above the first ports light up. The number of lit ports determines the number of stack members, and the blinking port is the current position.

Further Reading
- Cisco StackWise Technology White Paper
- 3750 - Managing Switch Stacks
- Catalyst 3750 Hardware Installation Guide
Configuration in CLI
Stack Commands
The basic operations we can perform with the stack using the CLI are finding information about members, setting the switch identification number, and setting the priority (essentially setting the master switch).
SWITCH#show switch // information about stack members (including id and priority) SWITCH#show switch detail // additional information about the stack connection SWITCH(config)#switch 1 renumber 3 // changes the identification number from 1 to 3 SWITCH(config)#switch 3 priority 15 // sets the priority of switch 3 to 15 (options 1 to 15), the higher the value, the greater the chance of being selected as master SWITCH(config)#no switch 3 provision // removes a stack member
Provisioned Switch
There is also the option to configure a switch before connecting it to the stack. We create a provisioned switch (backup), thus we can configure ports and other switch properties even if it is not physically connected (ports cannot be switched to operational state - no shutdown). After connecting the new switch, it gets this configuration.
Note: The global configuration is the same for all stack members, but we can configure individual ports.
SWITCH(config)#switch 4 provision ws-c3750e-48pd // creates a switch with the given id and model
Port Addressing
Access to individual ports within the stack now uses the stack member number. This is entered as the first in the trio of numbers identifying the port, for example, Gi2/0/1 is the first port on the second switch in the stack.
Only One Stack Member
Switch numbers can also be used in several other places. In some informational messages, a specific switch is also displayed using the name-id, for example, SWITCH-2.
SWITCH#reload slot 2 // restart only the second switch SWITCH#session 2 // switch directly to switch 2, but in practice only for show and debug (return using exit)
IOS Upgrade in the Stack
Briefly, I will mention the options we can use (not only) within the stack for manual IOS upgrade. The main command used is archive, which is described in more detail in Cisco IOS 15 - backups and restores of configuration and images.
Note: Upgrading the IOS on the stack upgrades all members, but be careful with different HW versions. In other words, when we upgrade the master switch, it upgrades the other members after the restart.
Within the stack, the archive command has the copy-sw parameter, which copies the IOS between stack members. The following example copies the IOS from switch 2 to 3 and overwrites (deletes) the original version. The /reload parameter could also be used, which ensures the automatic restart of the switch after the upgrade, but if we upgrade multiple switches, they need to be restarted after all have the same version.
SWITCH#archive copy-sw /overwrite /destination-system 3 2 SWITCH#reload slot 3 // restart only switch 3 SWITCH#reload in 10:30 // schedule the restart of the entire stack (not just the switch) in 10 hours and 30 minutes
Upgrading a Combined Stack
If we want to upgrade the stack to a new version and have members with different versions of StackWise (StackWise is marked as version 0 and StackWise Plus as 1), we can copy the tar for 3750G (of course the same version) into the directory with the bin for 3750E. Then we upgrade the 3750E (master) like this:
SWITCH#archive download-sw /no-version-check /destination-system 1 ftp://user:password@10.0.0.10/ c3750e-universalk9-tar.122-44.SE2.tar
Stack members should upgrade automatically from the stored image, but if there is a problem, we can do it manually. We then upgrade another stack member (3750G) from the master:
SWITCH#archive download-sw /no-version-check /destination-system 2 flash1:/c3750e-universalk9-mz.122-40.SE/c3750-ipbasek9-tar.122-44.SE2.tar
After we have the new IOS on all stack members, we can restart it (to load the new version) using reload.
Note: The /no-version-check parameter is sometimes necessary. For example, in some newer IOS versions, there is a newer version of the stacking protocol, and since the other switches are still using the older version, the upgrade can only be performed without checking. Subsequently, the other members must be upgraded.
Other Upgrade Commands
In case of any problems, the following commands may be useful:
SWITCH#copy flash2:/c3750-ipbasek9-mz.122-40.SE/c3750-ipbasek9-mz.122-40.SE.bin flash3: // manual image copy SWITCH#show boot // displays info on where switches boot from SWITCH(config)#boot system switch 3 flash:/c3750-ipbasek9-mz.122-40.SE.bin // sets which image switch 3 should boot from
Note: Booting can also be set for all stack members at once. Using the boot command, we can also set the auto-upgrade properties of stack members.
Diky za clanek :o)
Jak otáčím, tak otáčim Catalyst 3560 nemá žádný konektor který by se pro StackWise dal využít...
respond to [2]tomfi: Tak to jsem asi mystifikoval, podle některých poznámek (třeba u popisu 3560ky) na Ciscu jsem to chápal, že StackWise má také. Ale když jsem to teď hledal, tak asi opravdu nemá. Já pracuji pouze s 3750kama.
respond to [3]Samuraj: Né každý máme to štěstí.. max na co já šahám je 3560 ... ale i tak to ma featurek až až ;)
respond to [4]tomfi:
nie kazdy ma taketo zezezo na backbone, ale doma asi nikdo :):
System image file is "disk0:c12kprp-k4p-mz.120-32.SY4.bin"
cisco 12416/PRP (MPC7455) processor (revision 0x00) with 524288K bytes of memory.
MPC7455 CPU at 665Mhz, Rev 2.1, 256KB L2, 2048KB L3 Cache
Last reset from sw reset
1 Route Processor Card
2 Clock Scheduler Cards
3 Switch Fabric Cards
1 8-port OC3 POS controller (8 POS).
2 OC48 POS controllers (2 POS).
1 two-ports OC12 SONET based SRP controller (1 SRP).
1 Modular Gigabit/Fast Ethernet/IEEE 802.3z controller
8 ISE 10G SPA Interface Cards (12000-SIP-600)
1 ISE 10G SPA Interface Card (12000-SIP-601)
2 Ethernet/IEEE 802.3 interface(s)
4 GigabitEthernet/IEEE 802.3 interface(s)
10 10GigabitEthernet/IEEE 802.3 interface(s)
10 Packet over SONET network interface(s)
1 SRP network interface(s)
2043K bytes of non-volatile configuration memory.
Tak uz davno neplati, ze supervisor se u 6509 dava do 1.slotu od SUP720 jsou to sloty 5 a 6
respond to [6]ccie: :-) Supr clanek, dekuji
Ahoj Samuraji, mám jeden dotázek. Vyndal sem jeden switch ze stacku. Měl sem ho volný a ve firmě ho potřebují na jiné místo. Přečísloval sem ho a vymazal stackovou kofiguraci. Teď se mi ale nedaří z původního stacku smazat staré číslování portů. Byl jako 6 ve stacku. neměl by si radu pro mě? Díky Michal
respond to [8]Michal: Já jsem tohle zkoušel je jednou, a tuším, že mi normálně fungoval příkaz:
SWITCH(config)#no switch číslo-odebíraného-člena provision
respond to [9]Samuraj: Děkuji, zafungovalo. Přeju fajn víkend. Čao Michal
Čau Samuraji, mám 5 switchů 2950 spojených jako Cluster. Dejme tomu, že 1. switch je command switch s member number 0 a ostatní jsou member number 1, 2, 3, 4. Znamená to že úpravu konfigurace můžu dělat pouze na switchi member number 0, nebo na kterémkoli switchi v clusteru? Jinak super prace, co tu děláš;-)
respond to [11]Zdenek: Bohužel moc nevím, co myslíš. Jestli myslíš spojování do stacku, tak 2950 nevím, jak to řeší (jsou už dost staré). Dnes v této řadě podporuje stack C2960S. Ve standardním stacku se pak všechny switche hlásí jako jeden, mají jednu společnou konfiguraci (distribuovanou) a jednu IP adresu. Sice se můžu přepínat mezi členy stacku, ale konfigurace se provádí globálně.
C2960S to umeji se sesti switchema, ovsem 2950 umi jen max port channel, sestavovat urcite nejdou. Takze pokud te to jede jako "cluster" tak jedine pres spanning tree s podporou port channel. Urcite to ale neni stack.