Banners allow you to display text when a user connects to a Cisco router or switch,
This is often used to display a message, perhaps a message of the day indicating that maintenance will
be done on the network or more often these days, it's used to display a legal message stating that
unauthorized access is not permitted.
If a hacker connected to your router or switch as an example and you don't display some kind of warning
message or some message to indicate that unauthorized access is not permitted
it may be more difficult to prosecute them as they would state that there was no indication that access
is not allowed.
It's a very bad idea to have a message saying, welcome to my router or welcome to my switch, because
that would indicate that someone is allowed to access that device.
It's a good idea to get some input from your legal department to find out what message should be used
as a corporate policy or in specific countries of the world.
You couldn't, as an example, say that if you access my router, I'm going to shoot you.
That wouldn't be legal.
As an example, Banners can display all kinds of text.
Here's an example of a router that I've got configured.
So in this example, I've entered my username and password and I'll be able to log in to the router
but notice some kind of message is displayed stating that you shouldn't access the device unless authorized,
and here's some additional information is provided to the user if they want to access these labs.
No such message is displayed by default, so as an example, if I telnet from router to router 2.
I'm able to log in
and all I'm prompted for is the user access verification, which in this case is a password, no banners
have been configured on this router, but in global configuration mode, you can use the common banner
and question mark to view various types of banners that can be configured on a router or switch. For
the CCNA
course, we're going to concentrate on the exect banner, log in banner, and message of the day banner.
Other messages such as incoming can also be configured
but that's not important for CCNA.
A message of the Day banner may be used to display a temporary message, such as a router may be taken
offline for maintenance at a specific time.
A login banner is shown before user logs in, so it may display a message such as unauthorized access is
prohibited, an exec banner displays after login.
You could use this to display information that only internal staff should know, such as the physical
location of the device.
So the information is not shown before login
only after you're authenticated is the information displayed.
Now, you don't have to use those messages in that way.
This is actually being configured on this route as a message of the day, so on this router show run
pipe, begin banner.
Here's the show command and notice the command used here is banner message of the day, which display
some ASCI text and then a warning message and then ends.
Notice the delimiting character used is C indicated by character C,
so that's the beginning of the message and end of the message.
So when you use the command banner question mark, you've got this option line.
Which says banner-text-c, where c is a delimiting character.
Now, you don't typically want to use the letter C, as an example,
if I say banner C and then type something like my Cisco router, notice I'm taken back to global configuration
mode
but if we telnet back to router 2,
notice the message of the day message displayed is my.
C in this example is the delimiting character, so the message was cut off or ended at the letter
C, hence only my space was displayed.
What you probably want to use is something like a hash or dollar sign or some other character that you're
not going to put in your message or create a basic message,
such as this.
So that when we log in, we can see which banners are displayed.
I could enter another line such as the following, and then continue to enter multiple lines.
Hash or pound indicates in this example that I've finished my message and notice I'm taken back to global
configuration mode.
So now when I telnet to router 2 the message is displayed and I can log in.
So the message was displayed before the password prompt on the telnet line.
Whereas previously, before the message was created, nothing was displayed at this point.
Now, a banner message of the day is also displayed on the console, so it doesn't just apply to telnet
lines, it applies to all lines on the router, including what are called TTY lines.
So as an example on this 3640 physical router show line, shows me that it has a console line.
It has TTY lines which are, in this example, used for reverse telnet lines, and it has VTY lines which
are used for telnet.
So here's a line 97,
when you telnet to a reverse telnet line or TTY line, you telnet to port number 2000 and that line number.
number.
So notice here it's displayed the banner message of the day
and I'm actually connected to the console of a 3750 switch.
Show line on the 3640 shows us that line 97 is in use
and that's the reverse telnet connection used on the router to access the core 3750 switch.
So in other words, a banner message of the day is displayed on all lines, including the console,
auxillary,
VTY lines and TTY lines, once again on router 1, I'll telnet to router 2,
notice the banner message of the day is displayed.