Categories
Cisco

Showing link status messages in SSH sessions on Cisco switches

When debugging issues, specially if you’re not 100% sure which port a specific devices is plugged into, I like to see the link status messages in my SSH console.

002449: *Jul 1 15:23:35.434: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet4/32, changed state to down

By default Cisco switches will not show link status messages in the SSH console session (or any console messages for that matter).

To switch them on is a two stage process.

  1. First, turn on terminal monitoring.  This enables basic messages to be shown. (This command must be ran at the enable command)
    en
    terminal monitor
  2. Second, run the logging command with the event link-status global.  This switches on logging of all link-status events across the switch. (This command must be run at the configure terminal command)
    conf t
    logging event link-status global

Done.