we have several Cisco 3560CX switches in our company which all have the same host name (3560cx) but different domain names. F. Ex. 3560cx.berlin.company.com and 3560cx.hamburg.company.com. The iOS CLI on all switches shows "3560cx#".
How can we create individual CLI prompts like "3560cx-hamburg#" and "3560cx-berlin#" so that we always see on which switch we execute the command when we have several SSH sessions open?
You should be able to just use the 'prompt' command in config mode. A limitation is that it doesn't show the modified prompt at config mode.
You could use something like this: 3560cx(config)#prompt %h.Hamburg%p
This will take the existing hostname, append it with .Hamburg then add the prompt character based on your current level, > or #. So when you exit out of config mode, it should show:
But if you go back to config mode, it will switch away from the custom prompt:
Don't think the 3560 supports that.
Just change the hostnames. Yes I know you say you can't but it is bound to happen ie. someone reloads the wrong switch etc. and then you will wish you had.
i agree with everyone. there's a possibility of a human error due to same hostname on your switching environment.
easy fix is to change the device hostname and have management back you up on this move.
if for some reason management doesn't agree in changing this policy (i don't see why they wouldn't), you could alternatively configure a banner token to display its domain name.
banner incoming &Youhaveentered$(hostname).$(domain)on line$(line)($(line-desc))&