Example: Configuring and displaying a banner

The following banner can be configured on your switch.

            This is a private system maintained by the

                    Allied Widget Corporation

           Unauthorized use of this system can result in

                  civil and criminal penalties!

Use the Enter key to create line breaks, blank spaces for line centering, and the delimiter symbol to terminate the banner message.

Configuring a login banner

switch(config)# banner motd %

Enter TEXT message. End with the character'%'

This is a private system maintained by the
        Allied Widget Corporation.
  Unauthorized use of this system can result in
        civil and criminal penalties!%
switch(config)# write memory

To view the current banner configuration, use either the show banner motd or show running command.

Show banner motd output

switch(config)# show banner motd
Banner Information
Configured Banner:

     This is a private system maintained by the
            Allied Widget Corporation.
   Unauthorized use of this system can result in
          civil and criminal penalties!

Banner in the switch’s running-config file

switch (config)# show running

Running configuration:

; J8697A Configuration Editor; Created on release #K.15.12.0001
; Ver #01:01:00

hostname "switch"
module 1 type J8702A
vlan 1
  name "DEFAULT_VLAN"
  untagged A1-A24
  ip address dhcp-bootp
  exit
banner motd "This is a private system maintained by the\n Allied Widget
Corporation.\nUnauthorized use of this system can result in\n civil and
criminal penalties!"
password manager

switch (config)#

The next time someone logs on to the management CLI, the login screen displays the configured banner. Entering a correct password clears the banner and displays the CLI prompt.

CLI result of the login banner configuration

              This is a private system maintained by the 
                       Allied Widget Corporation. 
             Unauthorized use of this system can result in
                       civil and criminal penalties!