Implementing Banners
Problem
You want to implement a banner message to display a security warning.
Solution
The following commands configure various types of banners on a router:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#banner execRouter1(config)## This is an exec banner #banner loginRouter1(config)## This is a login banner #banner motdRouter1(config)#$ This is a motd banner $endRouter1#
Notice that the router accept almost any delimiter character, as
long as the start and end delimiter is identical. These delimiters
allow you to make your banner message several lines long. Our first
two examples use the pound symbol, #, while the last example uses the dollar
sign, $, as a delimiter. You have
to be slightly careful that you don’t use the delimiter character
within the banner message itself or the router will accept only part
of the message.
Discussion
Cisco routers support three main types of banners and display them in strict order. First the Message of the Day (motd) and then the login banner appear before the login prompt, and the router prints the exec banner after successful authentication:
Freebsd%telnetTrying 172.22.1.4... Connected to Router1. Escape character is '^]'. This is a motd banner This is a login banner User Access Verification Username:Router1Password:ijbrown<xxxxxxxxx>This is an exec banner Router1>
Login banners are mainly used to display a warning message for security purposes, which we will ...