banner exec
To specify and enable a message to be displayed after a successful logon, use the banner exec Global Configuration mode command. This banner is applied automatically on all the user interfaces: console, Telnet and SSH and also on the WEB GUI. To delete the existing EXEC banner, use the no form of this command.
Syntax
banner exec d message-text d
no banner exec
Parameters
-
d—Delimiting character of user’s choice—a pound sign (#), for example. You cannot use the delimiting character in the banner message.
-
message-text—The message must start in a new line. You can enter multi-line messages. You can include tokens in the form of $(token) in the message text. Tokens are replaced with the corresponding configuration variable (see User Guidelines). The message can contain up to 1000 characters (after every 510 characters, press <Enter> to continue).
Default Configuration
Disabled (no EXEC banner is displayed).
Command Mode
Global Configuration mode
User 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.
Use tokens in the form of $(token) in the message text to customize the banner. The tokens are described in the table below:
Token |
Information Displayed in the Banner |
---|---|
$(hostname) |
Displays the host name for the device. |
$(domain) |
Displays the domain name for the device. |
$(bold) |
Indicates that the next text is a bold text. Using this token again indicates the end of the bold text. |
$(inverse) |
Indicates that the next text is an inverse text. Using this token again indicates the end of the inverse text. |
$(contact) |
Displays the system contact string. |
$(location) |
Displays the system location string. |
$(mac-address) |
Displays the base MAC address of the device. |
Use the no banner exec Line Configuration command to disable the Exec banner on a particular line or lines.
Example
The following example sets an EXEC banner that uses tokens. The percent sign (%) is used as a delimiting character. Note that the $(token) syntax is replaced by the corresponding configuration variable.
switchxxxxxx(config)# banner exec %
Enter TEXT message. End with the character '%'.
$(bold)Session activated.$(bold) Enter commands at the prompt.
%
When a user logs on to the system, the following output is displayed:
Session activated. Enter commands at the prompt.