banner

Syntax

banner {motd | exec} <DELIMITER>
no banner {motd | exec} 

Description

Enables the customization of the MOTD or the EXEC banner.

The no form of the command disables the MOTD or the EXEC banner.

Command context

config

Parameters

exec

Configures the banner displayed after the login prompt.

motd

Configures the banner displayed before the password prompt, such as the message of the day.

<DELIMITER>

Selects a character that will terminate the input string.

Authority

Administrators

Usage

This command enables the customization of two types of banners:

  • The MOTD banner. The banner displayed on attempting to connect to a management interface.

  • The EXEC banner. The banner displayed upon successful authentication.

You can create a banner that spans multiple lines. The maximum length of a banner is 4,095 characters. This requirement includes any nonvisible characters. If you enter more than the maximum number of characters, the software displays an error message and it does not create the customized banner. The minimum number of characters allowed is an empty string (""), which displays no banner.

End the banner text with a chosen delimiter character. A delimiter character can be any nonwhitespace character that does not have special meaning to the CLI, such as the caret (^). A question mark (?) is not permitted to be a delimiter character because a question mark is the text completion character in the CLI. Question marks can however be included as part of the banner text.

The result of the no form of the command depends on the motd or exec parameter selected:
  • If the command no banner motd is entered, the banner displayed after authentication is reverted to the default legal disclaimer banner. The legal disclaimer banner is displayed by default before the login. The default legal disclaimer banner can be overridden with a new message by entering the banner exec motd <delimiter> command.

  • If the command no banner exec is entered, no banner is displayed on attempting to connect to the management interface.

Examples

Configuring a banner displayed before the password prompt:

switch(config)# banner motd ^
Enter a new banner. Terminate the banner with the delimiter you have chosen.
(banner-motd)# This is an example of a banner text which a connecting user
(banner-motd)# will see before they are prompted for their password.
(banner-motd)#
(banner-motd)# As you can see it may span multiple lines and the input
(banner-motd)# will be terminated when the delimiter character is
(banner-motd)#encountered.^

Configuring a banner displayed after a user has logged on to the switch:

switch(config)# banner exec &
Enter a new banner. Terminate the banner with the delimiter you have chosen.
(banner-motd)# This is an example of a different banner text. This time
(banner-motd)# the banner entered will be displayed after a user has
(banner-motd)# authenticated.
(banner-motd)#
(banner-motd)# & This text will not be included because it comes after the '&'

Disabling the motd banner:

switch(config)# no banner motd