cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
299
Views
1
Helpful
4
Replies

Log MAC Address of devices

antotini
Level 1
Level 1

Greetings all, 

I have a Catalyst 9200 Switch. 

Would it be possible to immediately send to a Syslog server of MAC addresses of devices whenever they plug into any of the switch ports? 

I understand this is possible via SNMP traps but is it possible via logging method? Thanks. 

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

SNMP trap is best way to do it, you can just create on remote syslog server listed SNMP traps and do post usage what ever you like to do based on the message.

Other option is dump all MAC address table and redirect to syslog, this is bit of work, so suggest SNMP trap.

check my other suggestion :

https://community.cisco.com/t5/switching/mac-address-to-log/td-p/4585486

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help


@balaji.bandi wrote:

SNMP trap is best way to do it, you can just create on remote syslog server listed SNMP traps and do post usage what ever you like to do based on the message.

Other option is dump all MAC address table and redirect to syslog, this is bit of work, so suggest SNMP trap.

check my other suggestion :

https://community.cisco.com/t5/switching/mac-address-to-log/td-p/4585486


Hi, I would like to share my solution 

Event manager applet Mac_Address
Event syslog msg pattern "%LINK-3-UPDOWN"
action 1.0 info type SNMP oid 1.3.6.1.4.1.9.9.215.1.1.8.1.1 get-type next
action 2.0 syslog msg ": $_info_snmp_value"

Not sure if there are any flaws implementing this, pls let me know. 

 

logging event link-status <<- this generate Log for Link UP/Down 
NOW the log message have level 3 and
also the logging show only  to what you config i.e. logging console/terminal or host 
last think sometimes you need 

terminal monitor to see logging message 

is your environment AAA based then you need to configure ignore that AAa config, if not test and let us know anything not working.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card