How to spiff up your banners in Cisco IOS
How to spiff up your banners in Cisco IOS
If you access your Cisco gear via vty (Telnet, SSH, …) here is a little jewel that you may appreciate. It won’t be on your CCNA R&S certification exam, but it has a coolness factor significant enough that I wanted to point it out. A typical remote login, when successful, will display the hostname of the device as the prompt. If you want to liven it up a little, and provide a bit more info to the one logging in, check this out:
The command is banner. You are likely already familiar with the command, but don’t click on another tab yet. The coolness is seen by the person logging in. Let’s take a look. Figure 1 shows the normal view when logging in remotely to your Cisco device:
Well that was kind of hum-drum. RTR1 was able to successfully Telnet to RTR2. Whoopee. Now let’s see what RTR2 sees when it accesses RTR1, as shown in figure 2:
Now that is much better! I can’t tell the hostname (yet) from the prompt, because I am required to log in first. However, (assuming that I was aiming at RTR1) I can see in the banner motd that the host name of the device to which I am connected is RTR1. I also know on which line (line 2, as shown in figure 2) I am connected.
Can I survive without this feature? Certainly. But once you have practiced configuring all your lab gear in preparation for your certification exam, why not do a little IOS exploring and see what neat features are not mentioned in your courseware curriculum. But wait! I didn’t show you how it was done. Let’s take a look at the necessary steps.
The banner motd command is a common piece added to a configuration and, as you likely know, looks like this:
banner motd %
This command is entered in global configuration mode, and the percent sign is a delimiting character that lets the device know where the message starts. It can be any character that does not appear anywhere in the body of the message. I usually use a percent sign, but you can you any character you wish that fits the above stipulation. Now you can continue typing your banner message right after the percent sign, but I like it better if you type just the above command and hit Enter. Now you can enter line after line of text character that will comprise your banner. When you are finished typing the body of the banner, type your delimiting character once more so that device knows you are done with the banner.
I usually construct my banners in some bare bones text editor (Notepad, Notepad++, VIM) so I can just paste it into the device. Then if I have formatting issues, I can modify my text file to adjust and then paste it in again. Figure 3 shows what I pasted to generate the output shown in figure2:
Now there are only a few of those options that are configurable. Cisco documents your choices in this regard. The table in figure 4 was retrieved from Cisco Connection, Menu, and System Banner Commands.
As you can see in my config, I used $(hostname) and $(line). As noted, you can survive a turbulent IT career and never type this once, but it adds some personalization as well as valuable information to the remote login scenario. If you have the inclination, type it and feel the rush!
Until next time…
You May Also Like
In this video, Cisco CCNA instructor Mark Jacob shows how to create a Login and Message of the Day (MOTD) banners in Cisco IOS. The Banner is an interesting feature of the Cisco IOS. You could probably get by without it, but in a commercial environment you want to have it.
In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365