cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
2132
Views
0
Helpful
1
Replies

Router and Switch Variable Characters

Th3cart3r
Level 1
Level 1

I've got various routers/switches in the main office as well as our many branches across the country. I have a line in a script that I run which places the hostname of the router/switch at the login stage.  This is simply cosmetic and it's so that when me or my engineers login they are able to identify which site they are connected to.  The problem is that this command works with all of my routers no matter how old however it doesn't work with the switches.  The switches simply display the actual text in the command rather than the variable that they are pointing to.  I have included the command below as well as a working display on a router and a non working display on a switch.

Router CLI Command:

banner login ^ Management ID: $(hostname)    ^C

Router Login Output:

 Management ID: EU_Brussels-2911-RT

Switch CLI Command:

banner login ^ Management ID: $(hostname)    ^C

Switch Login Output:

Management ID: $(hostname)

1 Reply 1

Hitesh Vinzoda
Level 4
Level 4

https://supportforums.cisco.com/discussion/11077976/variables-banners

HTH

Hitesh