pesturgess Wed, 07/04/2007 - 03:45
User Badges:

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 Wed, 07/04/2007 - 04:40
User Badges:
  • Silver, 250 points or more

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

David Stanford Wed, 07/04/2007 - 08:42
User Badges:
  • Cisco Employee,

You'd also want to add the snmp command:


snmp-server enable traps (snmp or all)

Edison Ortiz Wed, 07/04/2007 - 09:13
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

Actions

This Discussion