5 February 2014

3850 Switch Stacks - StackCabling and Switch Renumbering?

I'm not sure why but I've always found the switch renumbering command confusing to understand on 3750/3750-X/3850 switch stacks. Mostly because I wondered what happens when you renumber two switches at the same time with overlaps? i.e. You want Switch 1 to be "4", Switch 4 to be "3", etc.

First thing first, for a switch stack you don't need to cable them in specific pattern or arrangement. As long as every switch is connected in a big uninterrupted loop it will work it out and you'll be fine. For a stack of four switches here are some options:



Which is best? Really it all depends on how they are deployed in a rack or across racks and what length stack-cables you have. The default is 50cm but longer cables can be ordered (I think 3m is the max).

For the 3750X/3850 don't forget you also have StackPower cables to worry about as well.

So back to the main topic, how does the switch renumbering work... I had a stack of 4 switches I built recently. After connecting and booting them all it turned out that...
Switch 1 thinks its stack member 2
Switch 2 thinks its stack member 4
Switch 3 thinks its stack member 3
Switch 4 thinks its stack member 1
The switch renumber command swaps a single switch with the number of another switch. Logically this shouldn't work as I had multiple overlaps in the above. I gave it a go regardless. So in the above I tried to:

  • Swap 1 & 2
  • Swap 2 & 4
  • Swap 4 & 1

It didn't work. :) I ended up with another mess altogether.

The best way I've found to do this is to do all the renumber commands you can without overlapping with the previously applied renumber commands. Then you need to reboot! Once that's done renumber out the remaining switch members and reboot... again. This chews up time since the reboot takes roughly 10mins for 3850 switches.

Lastly, you can figure out which switch is which switch member based on the lights on the front of the chassis. Highlight the "stack" LED by pressing the mode button and the switchports LEDs instead indicate the "stack" member number.

Thanks for reading. Hope it helps.

Nexus - SSH Error

Working on a Nexus 5548 last week I came across the following error when trying to SSH to another switch from here.
CORE-01# ssh admin@10.113.150.252
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
70:81:d5:1e:64:51:e5:ba:2d:9a:55:8d:fa:43:59:b8.
Please contact your system administrator.
Add correct host key in /var/home/admin/.ssh/known_hosts to get rid of this message.
Offending key in /var/home/admin/.ssh/known_hosts:8
RSA host key for 10.1.150.252 has changed and you have requested strict checking.
Host key verification failed.
Solution is pretty easy...
CORE-01# clear ssh hostsCORE-01# ssh admin@10.1.150.252
The authenticity of host '10.1.150.252 (10.113.150.252)' can't be established.
RSA key fingerprint is 70:81:d5:1e:64:51:e5:ba:2d:9a:55:8d:fa:43:59:b8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.150.252' (RSA) to the list of known hosts.
admin@10.1.150.252's password:
Type help or '?' for a list of available commands.
EDGE-01> en
Password: *********
This happens when the Nexus switch has a pre-existing SSH key stored for the remote device and the remote device's key changes. The command simply clears the buffer of local SSH keys stored for remote hosts. I've seen this on Linux servers before as well.

Hope it helps. Thanks for reading.