cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
265
Views
0
Helpful
8
Replies
Beginner

How to change CLI prompt name on Cisco C3560CX

Hello,

 

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?

 

Thanks!

Peter

8 REPLIES 8
Rising star

Re: How to change CLI prompt name on Cisco C3560CX

I think that you need change hostname.
Jaderson Pessoa
*** Rate All Helpful Responses ***
Highlighted
VIP Expert

Re: How to change CLI prompt name on Cisco C3560CX

Just create a hostname for each switch

switch-1 

config t

hostname 3560cx-hamburg

and so on...

HTH

Beginner

Re: How to change CLI prompt name on Cisco C3560CX

Hello,
the host names of the switches cannot be changed for different reasons. But we still want to change the prompts to individual names. In old iOS versions there was a command "set prompt <....>". But this command does not work any more.
How can we achieve this?
Peter
Beginner

Re: How to change CLI prompt name on Cisco C3560CX

.

Beginner

Re: How to change CLI prompt name on Cisco C3560CX

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:

3560cx.Hamburg#

But if you go back to config mode, it will switch away from the custom prompt:

3560cx(config)#

Beginner

Re: How to change CLI prompt name on Cisco C3560CX

The command does not work:

sw1(config)#prompt %h.Hamburg%p
                         ^
% Invalid input detected at '^' marker.

sw1(config)#

Hall of Fame Guru

Re: How to change CLI prompt name on Cisco C3560CX

 

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. 

 

Jon

Engager

Re: How to change CLI prompt name on Cisco C3560CX

hi,

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.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/configuration/15mt/fundamentals-15-mt-book/cf-connections.pdf

banner incoming &Youhaveentered$(hostname).$(domain)on line$(line)($(line-desc))&

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards