Router and Switch Variable Characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2017 12:40 PM - edited 03-08-2019 10:30 AM
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)
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2017 03:35 AM
https://supportforums.cisco.com/discussion/11077976/variables-banners
HTH
Hitesh
