When configuring a Cisco device I always configure some kind of banner, which is displayed when logging in. This banner contains some information, like security warnings and general information. There are different kind of banners.
I was used to configuring a banner login with different variables, like shown below:
banner login ^
You have entered device $(hostname).$(domain) at line $(line) $(line-desc)
^C
This works fine when connecting with Telnet to the device, but this doesn’t work when using SSH. For security reason, I always use SSH to connect to devices, but I didn’t notice the “corrupt” banner since recently.
Banner login doesn’t support SSH:
“When accessing the security appliance through Telnet or SSH, the session closes if there is not enough system memory available to process the banner messages or if a TCP write error occurs. Only the exec and motd banners support access to the security appliance through SSH. The login banner does not support SSH.”
The example below shows the output from a banner motd and a banner login when connecting via SSH.
ssh -l admin 10.10.66.12
You have entered device $(hostname).$(domain) at line $(line) $(line-desc)
Password:
You have entered device C877.booches.nl at line 1
C877#
The first banner is de banner login and the second is the banner motd. So when using SSH to connect to a device, it is better to use a banner motd or a banner exec.
When configuring a router I often use different show commands to check or troubleshoot the configuration. I always hate to type in the whole show command, so I use aliases instead. Aliases are also used in the Open Source community, when working with a terminal.
There are multiple options for the alias command, lets take a closer look:
Cisco IOS includes some built-in command aliases (of course, the Cisco IOS always accepts the shortest unique command). Default command aliases are for example:
p for ping | h for help |
lo for logout | u and un for undebug |
w for where | r for resume |
Next are some alias command, which I use very often:
ALIAS EXEC
Router(config)# alias exec s show ip int brie | exclu unass
Router(config)# alias exec si show int status
Router(config)# alias exec r show run
Router(config)# alias exec rr show ip route
ALIAS CONFIGURE
Router(config)# alias configure vl1 interface vlan1
Router(config)# alias configure eigrp router eigrp 1024
ALIAS INTERFACE
Router(config)# alias interface ns no shutdown
Router(config)# alias interface load load-interval 30