banner motd

To specify a message-of-the-day (MOTD) banner, use the banner motd global configuration command. The no form of this command deletes the MOTD banner.

banner motd d message d

no banner motd
Syntax Description

d

Delimiting character of your choice—a pound sign (#), for example. You cannot use the delimiting character in the banner message.

message

Message text. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable. Tokens are described in

Defaults

No MOTD banner is specified.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

11.3(7.5) AA and 12.0(3) T

Token functionality was introduced.

Usage Guidelines

Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.

This MOTD banner is displayed to all terminals connected and is useful for sending messages that affect all users (such as impending system shutdowns). Use the no exec-banner or no motd-banner command to disable the MOTD banner on a line. The no exec-banner command also disables the EXEC banner on the line.

When someone connects to the router, the MOTD banner appears before the login prompt. After the user successfully logs in to the router, the EXEC banner or incoming banner will be displayed, depending on the type of connection. For a reverse Telnet login, the incoming banner will be displayed. For all other connections, the router will display the EXEC banner.

The banner command without any keywords specified defaults to the banner motd command. When a new banner motd command is added to the configuration, it overwrites the existing banner command if no keyword is specified. Similarly, if a banner command is added to the configuration, any existing banner motd command is overwritten.

To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current IOS configuration variables, such as the router's hostname and IP address. The tokens are described in the following table.

Token Information displayed in the banner

$(hostname)

Displays the router's hostname.

$(domain)

Displays the router's domain name.

$(line)

Displays the VTY or TTY (async) line number.

$(line-desc)

Displays the description attached to the line.

Examples

The following example sets a MOTD banner. The pound sign (#) is used as a delimiting character.

banner motd #
Building power will be off from 7:00 AM until 9:00 AM this coming Tuesday.
#

The following example sets a MOTD banner. The percent sign (%) is used as a delimiting character.

darkstar(config)# banner motd %
Enter TEXT message.  End with the character '%'.
You have entered $(hostname).$(domain) on line $(line) ($(line-desc)) %

When the MOTD banner is executed, the user will see the following. Notice that the $(token) syntax is replaced by the corresponding configuration variable.

You have entered darkstar.ourdomain.com on line 5 (Dialin Modem)