Managing Display Attributes
Display commands control the content of the banner and the command line prompt.
Banners
The switch can display two banners:
- Login banner: The login banner precedes the login prompt. Use a login banner to warn against unauthorized network access attempts or other messages to users.
- motd banner: After the user logs into the switch, the Message of the Day (motd) banner displays.
This output displays both banners in bold:
This is a login banner
switch login: john
Password:
Last login: Mon Jan 14 09:24:36 2013 from aristanetworks.com
This is an motd banner
switch>
Use the following commands to create a login and motd banner:
switch(config)# banner login
Enter TEXT message. Type 'EOF' on its line to end.
This is a login banner
EOF
switch(config)# banner motd
Enter TEXT message. Type 'EOF' on its own line to end.
This is an motd banner
EOF
switch(config)#
Use the following steps to create a banner:
Configuring the CLI Prompt
The prompt provides an entry point for EOS commands. The prompt command configures the contents of the prompt. The no prompt command returns the prompt to the default of %H%P.
Characters allowed in the prompt include A-Z, a-z, 0-9, and the following additional characters:
! @ # $ % ˆ & * ( ) - = + f g [ ] ; : < > , . ? / ˜ n
The prompt supports these control sequences:
- %s “ - Space character
- %t “ - Tab character
- %% “ - Percent character
- %H “ - Host Name
- %D “ - Time and Date
- %D{f_char} “ - time and date, format specified by the BSD strftime (f_char) time conversion function.
- %h “ - Host name up to the first.
- %P “ - Extended command mode
- %p “ - Command mode
- %r “ - Redundancy status on modular systems (has no effect on a fixed system)
- %R “ - Extended redundancy status on modular systems – includes status and slot number (has no effect on a fixed system)
Examples
- This command creates a prompt that displays system 1 and the Command
Mode.
switch(config)# prompt system%s1%P system 1(config)#
- This command creates a prompt that displays the Command
Mode.
switch(config)# prompt %p (config)#
- These equivalent commands create the Default
prompt.
% prompt %H%P host-name.dut103(config)# %no prompt host-name.dut103(config)#