cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3013
Views
8
Helpful
6
Replies

Logging port status on a 4506

pesturgess
Level 1
Level 1

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

6 Replies 6

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.

Pavel Bykov
Level 5
Level 5

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

You'd also want to add the snmp command:

snmp-server enable traps (snmp or all)

Edison Ortiz
Hall of Fame
Hall of Fame

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.

pesturgess
Level 1
Level 1

Thanks all for you help.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card