banner motd
To configure a message of the day (MOTD) banner, use the banner motd command in configuration mode.
banner motd [delimiting-character message delimiting-character]
no banner motd [delimiting-character message delimiting-character]
Syntax Description
delimiting-character |
(Optional) Identifies the delimiting character. |
message |
(Optional) Specifies the banner message that is restricted to 40 lines with a maximum of 254 characters in each line. |
Command Default
None.
Command Modes
Configuration mode.
Command History
Release |
Modification |
---|---|
1.3(4) |
This command was introduced. |
Usage Guidelines
The configured MOTD banner is displayed before the login prompt on the terminal whenever a user logs in to a Cisco MDS 9000 Family switch.
Follow these guidelines when choosing your delimiting character:
-
Do not use the delimiting-character in the message string.
-
Do not use " and % as delimiters.
You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable. For example:
-
$(hostname) displays the host name for the switch
-
$(line) displays the vty or tty line no or name
-
The $(line-desc) and $(domain) tokens are not supported.
Examples
The following example spans multiple lines and uses tokens to configure the banner message:
switch# config terminal
switch(config)# banner motd #
>Welcome to switch $(hostname).
>Your tty line is $(line).
>#
The following example shows a structured multiple line banner message:
switch# show banner motd
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
You have accessed a Cisco MDS switch.
Only authorized personnel have the right to access this switch.
If you are not on the list of the authorized personnel,
disconnect immediately or you will be prosecuted according to law.
Planned maintenance activity:
Saturday 27th Feb 2021 from 20.00 till 23.00
For more information, contact your administrator.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++