Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Logging port status on a 4506

Have a 4506 and would like to log when ports on it go into a "up state" or vice versa.

6 REPLIES

Re: Logging port status on a 4506

New Member

Re: Logging port status on a 4506

Understand that we can use the logging buffer but cannot find the correct command to log the port UP/Down status. Could use snmp trap mac which would log when a new device is connected.

Silver

Re: Logging port status on a 4506

Port UP/DOWN is a level 3 message (ERROR level).

If your logging server allows it, it will be logged.

"logging trap errors" command (or other level below error, like "logging trap warnings") will enable switch to log to a syslog server.

So if you have syslog server that has ip 10.0.0.1, and management interface is Loopback0, then you would write:

logging trap warnings

logging 10.0.0.1

logging source-interface loopback0

For SNMP you can set up following:

snmp-server community COMMUNITY_NAME RO

(RO for read only, RW for Read/Write)

snmp-server trap-source loopback0

snmp-server host 10.0.0.1 SERVER_COMMUNITY_NAME

Cisco Employee

Re: Logging port status on a 4506

You'd also want to add the snmp command:

snmp-server enable traps (snmp or all)

Hall of Fame Super Bronze

Re: Logging port status on a 4506

From:

http://www.cisco.com/univercd/cc/td/doc/product/lan/cat4000/12_2_37s/config/sw_int.htm

Configuring Interface Link Status and Trunk Status Events

You can configure interface link status and trunk status events. On the Catalyst 4500 series switch, the following interface logging event notifications are supported both globally and per interface:

?Enable/disable notification on the interface whenever its data link status is changed.

?Enable/disable notification on the trunk interface whenever its trunking status is changed.

Use the [no] logging event link-status [use-global] command to enable/disable the interface link status event. Use the [no] logging event trunk-status [use-global] command to enable/disable the interface trunk status event.

Each interface link status logging event can be configured in one of the following states:

?logging event link-status - Link status logging event is enabled explicitly on the interface regardless of the switch global setting.

?no logging event link-status - Link status logging event is disabled explicitly on the interface regardless of the switch global setting.

?logging event link-status use-global - This is the default link status logging event configuration on the interface; its configuration should follow the switch global link status logging event setting.

The interface trunk status logging event can be configured in the same configuration states.

New Member

Re: Logging port status on a 4506

Thanks all for you help.

1739
Views
8
Helpful
6
Replies