07-04-2007 02:57 AM - edited 03-05-2019 05:07 PM
Have a 4506 and would like to log when ports on it go into a "up state" or vice versa.
07-04-2007 03:05 AM
Hi,
You should log it to the buffer or using a syslog server:
CatOS
http://www.cisco.com/en/US/docs/switches/lan/catalyst4000/7.4/configuration/guide/logging.html
IOS
http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.2/31sga/configuration/guide/log.html
HTH,
Mohammed Mahmoud.
07-04-2007 03:45 AM
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.
07-04-2007 04:40 AM
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
07-04-2007 08:42 AM
You'd also want to add the snmp command:
snmp-server enable traps (snmp or all)
07-04-2007 09:13 AM
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.
07-04-2007 03:48 PM
Thanks all for you help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide