VMware ESXi and vSphere Cluster Management
Configure MOTD, Login, and EXEC Banners in Cisco IOS
Learn how to configure, verify, test, replace, remove, and save MOTD, login, and EXEC banners on Cisco IOS devices.
A banner is a text message that Cisco IOS displays during or after access to a network device. Banners are commonly used for authorized-use warnings, legal or security notices, maintenance announcements, and short operational reminders.
Cisco IOS is the operating system and command-line environment used on many Cisco routers and switches. Banner configuration is performed from global configuration mode.
How Cisco IOS Banner Types Differ
Cisco IOS provides three commonly used banner types: Message of the Day (MOTD), login, and EXEC. Their main difference is when they appear during a connection.
Typical Access Sequence
For an interactive console, SSH, or Telnet connection, the typical sequence is:
- The connection begins.
- The MOTD banner appears.
- The login banner appears.
- The device requests a username and/or password and performs authentication.
- After successful authentication, the EXEC banner appears.
- The user enters the initial user EXEC mode, normally shown by a greater-than prompt such as
Router>.
The exact output and order can vary with the access method, line configuration, AAA settings, and other authentication features. Treat the sequence above as the normal learning model, then verify behavior on the device and access path being used.
Banner Command Syntax
The general syntax is:
banner <type> <delimiter> <message> <delimiter>
The supported types in this lesson are:
banner motd <delimiter> <message> <delimiter>
banner login <delimiter> <message> <delimiter>
banner exec <delimiter> <message> <delimiter>
A delimiter is a character that marks the beginning and end of the message. When the command is entered interactively, IOS accepts multiple message lines until the matching closing delimiter is entered.
- Choose one delimiter character, such as
#. - Use the same character to close the message.
- Do not place that delimiter in the message body.
- If the message contains
#, select another character, such as^.
Configure an MOTD Banner
The MOTD banner is intended for a message visible broadly to connecting users. It appears early in the access process, before the authentication prompt in the usual sequence.
From privileged EXEC mode, enter global configuration mode with enable followed by configure terminal. Then enter a multi-line notice:
Router> enable
Router# configure terminal
Router(config)# banner motd #
AUTHORIZED ACCESS ONLY
Maintenance is scheduled for Saturday 22:00-23:00 UTC.
If this access is unexpected, contact the operations team.
#
Router(config)#
The first # begins the message and the final # ends it. The final delimiter is entered on its own line in this interactive example.
Configure a Login Banner
The login banner is a pre-authentication message. In the standard sequence, it appears after the MOTD banner and before the username or password interaction.
Router(config)# banner login ^
This system is restricted to approved users.
Activity may be monitored according to organizational policy.
Disconnect now if you are not authorized.
^
This example uses ^ rather than #. That choice is useful when the message itself contains a hash symbol.
Configure an EXEC Banner
The EXEC banner appears only after successful authentication, when the user enters an EXEC session. It is suitable for reminders that authenticated operators should see after login.
Router(config)# banner exec #
Follow approved change-control procedures before modifying this device.
Record configuration work against the appropriate approved request.
#
Keep post-login messages concise. A reminder about change control is useful, but a banner should not expose sensitive operational details.
Configure All Three Banners
The following complete example creates one message of each type:
Router# configure terminal
Router(config)# banner motd #
AUTHORIZED ACCESS ONLY
Maintenance is scheduled for Saturday 22:00-23:00 UTC.
#
Router(config)# banner login ^
This system is restricted to approved users.
Disconnect now if you are not authorized.
^
Router(config)# banner exec %
Use approved change-control procedures for configuration changes.
%
Router(config)# end
Router#
Verify the Configuration
The running configuration is the currently active configuration held in memory. Inspect it to confirm that the banner commands were accepted:
Router# show running-config | include ^banner
Depending on the IOS release and display behavior, the filtered output may show the banner command lines and delimiters. Use the complete configuration when you need to review all stored message text:
Router# show running-config
Test Banner Timing with a New Session
Testing must use a fresh connection. Disconnect from the console, SSH, or Telnet session and establish a new session through the lab's available access method.
- Start a new connection.
- Confirm that the MOTD message appears early.
- Confirm that the login message appears before credential entry.
- Enter valid credentials.
- Confirm that the EXEC message appears after successful authentication.
- Confirm that the resulting prompt is the expected user EXEC prompt, such as
Switch>.
An already authenticated session cannot fully demonstrate pre-login banners because the connection-establishment and authentication stages have already occurred. Likewise, changing an EXEC banner does not necessarily make it appear in an existing session; start a new session to test the complete flow.
Replace, Remove, and Save Banners
Reissuing a banner command for the same type replaces the previous message. For example, entering another banner motd command replaces the existing MOTD text; it does not append a second MOTD message.
Router# configure terminal
Router(config)# banner motd #
AUTHORIZED ACCESS ONLY
The maintenance window has been completed.
#
Router(config)# no banner login
Router(config)# no banner exec
Router(config)# end
Router# copy running-config startup-config
The no form removes the selected banner. The startup configuration is the saved configuration loaded when the device starts. Copying the running configuration to startup configuration preserves banner changes across a reload.
Security and Policy Considerations
- Use organization-approved legal or acceptable-use language where required.
- State clearly that access is restricted to authorized users when that reflects organizational policy.
- Do not place passwords, private keys, infrastructure details, topology information, or sensitive emergency contacts in a banner.
- A warning can support an acceptable-use policy, but its legal effectiveness depends on local policy and jurisdiction.
- Keep wording professional, concise, relevant, and understandable to all intended users.
- Remember that a banner is not a security control. Configure authentication and authorization separately.
Troubleshooting Banner Problems
Exam-Relevant Notes
banner motd,banner login, andbanner execare entered in global configuration mode.- The delimiter is not a fixed IOS keyword; it is a character selected by the administrator.
- The opening and closing delimiters must match.
- MOTD and login banners are normally seen before authentication; the EXEC banner is seen after successful authentication.
- Use a new connection to test banner timing.
- Use the
no banner ...form to remove a banner. - Save the running configuration to startup configuration to retain changes after a reload.
For related practice, review Cisco IOS banner configuration while working through a console or remote-access lab.