Configuring the CLI Banner

Configure the logon banner to display a message to users before authentication and configure a system login message-of-the-day in the form of a text banner that appears after each successful logon.

About this task

You can use the custom logon banner to display company information, such as company name and contact information. For security, you can change the default logon banner of the switch, which contains specific system information, including platform type and software release.

Use the custom message-of-the-day to update users on a configuration change, a system update or maintenance schedule. For security purposes, you can also create a message-of-the-day with a warning message to users that, “Unauthorized access to the system is forbidden.”

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Configure the switch to use a custom banner or use the default banner:

    banner <custom|static>

  3. Create a custom banner:

    banner WORD<1–80>

    Note

    Note

    To enter multiple lines for a message, use the banner command before each new line of the message. To provide a string with spaces, include the text in quotation marks.

  4. Create the message-of-the-day:

    banner motd WORD<1–1516>

    Note

    Note

    To enter multiple lines for a message, use the banner motd command before each new line of the message. To provide a string with spaces, include the text in quotation marks.

  5. Enable the custom message-of-the-day:

    banner displaymotd

  6. Save the configuration:

    save config

  7. Display the banner information:

    show banner

  8. Logon again to verify the configuration.
  9. Optional: Disable the banner:

    no banner [displaymotd][motd]

Example

Configure the custom banner to “Company, www.Companyname.com.” and configure the message of the day to “Unauthorized access to this system is forbidden. Please logout now.”

Switch:1> enable
Switch:1#configure terminal
Switch:1(config)# banner custom
Switch:1(config)# banner Company
Switch:1(config)# banner www.Companyname.com
Switch:1(config)# banner motd "Unauthorized access to this system is forbidden"
Switch:1(config)# banner motd "Please logout now"
Switch:1(config)#banner displaymotd
Switch:1(config)#show banner
Company
www.company.com
               defaultbanner : false
               custom banner :


                 displaymotd : true
                 custom motd :
Unauthorized access to this system is forbidden
Please logout now

Variable definitions

Use the data in the following table to use the banner command.

Variable

Value

custom

Disables the use of the default banner.

static

Activates the use of the default banner.

WORD <1–80>

Adds lines of text to the CLI logon banner.

motd WORD<1–1516>

Create the message of the day. To provide a string with spaces, include the text in quotation marks (“).

displaymotd

Enable the custom message of the day.