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. One common use for a login banner is to warn against unauthorized network access attempts.
- motd banner: The message of the day (motd) banner is displayed after a user logs into the switch.
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 adobe-wrks.aristanetworks.com
This is an motd banner
switch>
These commands create the login and motd banner shown earlier in this section.
switch(config)#banner login
Enter TEXT message. Type 'EOF' on its own 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)#
To create a banner:
Configuring 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 these punctuation marks:
! @ # $ % ˆ & * ( ) - = + 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)#