Which is the command to configure a banner to be displayed when connecting to a switch?

which is the command to configure a banner to be displayed when connecting to a switch?

The command to configure a banner to be displayed when connecting to a switch is the “banner motd” command. “motd” stands for “message of the day.” This command allows you to set a customized message that will be displayed to users when they connect to the switch.

To configure the banner, follow these steps:

  1. Enter privileged EXEC mode on the switch by typing “enable” and providing the appropriate password, if required.

  2. Enter global configuration mode by typing “configure terminal” or “conf t.”

  3. Use the “banner motd” command followed by a delimiting character (commonly “#”) to indicate the start and end of the message. For example:

    switch(config)# banner motd #
    Enter TEXT message. End with the character '#'.
    Welcome to the switch!
    This is a private network. Unauthorized access is prohibited.
    #
    

    In this example, the banner message starts after the “#” character and ends before the next “#” character.

  4. Enter the desired message within the delimiters. You can include any text or ASCII art you want to display.

  5. Press the “#” character again to indicate the end of the message.

  6. Exit global configuration mode by typing “exit” or pressing Ctrl+Z.

Now, when someone connects to the switch, they will see the configured banner message. It is important to note that banners can be used to display legal notices, warnings, or any other important information to users before they access the switch.