Multi-Line Banner Support
Overview
Multi-Line Banner support enables you to configure banner messages spanning multiple lines.
Options to Configure Multi-Banner Message
Two options to facilitate the configuration of multi-line banner messages:
• Use escape character sequences within the CLI to format the banner message with appropriate line breaks and indentation. Supported escape character sequences enable flexible alignment and multi-line message display.
The supported escape characters are:
Characters | Description |
\" | double quote |
\' | single quote |
\‘ | forward quote |
\\ | backslash |
\f | form feed |
\n | newline |
\r | carriage return |
\t | horizontal tab |
\v | vertical tab |
• Specify a local file containing the banner message. The content of the file is retrieved and displayed as the banner message
Multi-Banner Message Commands
The Multi-Banner Message uses the following configuration command.
banner motd file URL
Use this optional command to set the multi-line banner messages of the day (motd) at login. To set a customized or default message of the day, use banner motd command.
Use the no parameter to not display a banner message at login.
Note:
• Users are responsible for aligning the text of the banner. For instance, when using the "banner motd LINE" or "banner motd FILE" options, the alignment of the banner message output matches the alignment of the banner message input provided by the user.
• There is a restriction on the character count for banner messages, with a maximum limit of 1024 characters.
• When using the FILE option to input a banner message, only the first 1024 characters from the file will be read and displayed as the banner output.
• If the LINE option is used to input a banner message, only 1024 characters are allowed from the command line interface (CLI). If the user tries to include more than that, an error message such as "% Invalid input (Allowed length 1 - 1024):" will be displayed.
• When using the banner motd file option, consider the following:
• The file must be available locally, and users must specify the file name along with the path during configuration.
• Users are responsible for ensuring the correct file type, as there are no restrictions regarding the type of file allowed.
• If the file content is empty, a notification log will be displayed to alert the user, and the default banner message will be shown.
• If the file is removed or cannot be opened, an error log will be displayed to notify the user, and the default banner message will be shown.
• During a downgrade to a lower version that does not support the banner motd file option, if the banner motd file option is configured, the default banner message will be used.
Command Syntax
banner motd file URL
no banner motd
Parameters
file | A file input to set a custom message of the day. |
URL | The file path and name containing the banner message |
Default
Disabled
Command Mode
Configure mode
Applicability
Introduced before OcNOS version 1.3.
Examples
Example for LINE option with escape character sequence:
#configure terminal
(config)#banner motd Welcome\n To \n OcNOS
(config)#commit
(config)#exit
Example for using a specific file:
#configure terminal
(config)#banner motd file /home/ocnos/banner.txt
(config)#commit
(config)#exit