mac-notify traps

Syntax

[no] mac-notify traps <PORT-LIST>[learned | removed]

Description

Configure SNMP traps for learned or removed MAC addresses on a per-port basis.

The switch captures learned or removed events on the selected ports, but does not send an SNMP trap unless you have enabled mac-notify with the snmp-server enable traps mac-notify command.

IMPORTANT:

When this command is executed without the learned or removed option, it enables or disables the capture of both learned and removed MAC address table changes for the selected ports in <PORT-LIST>.

Parameters

learned

Enables the capture of learned MAC address table changes on the selected ports.

removed

Enables the capture of removed MAC address table changes table on the selected ports.

Options

<PORT-LIST>

Configures MAC address table changes capture on the specified ports. Use all to capture changes for all ports on the switch.

Configuring traps on a per-port basis for learned MAC addresses

switch# mac-notify traps 5-6 learned
switch# show mac-notify traps 5-6
Mac Notify Trap Information
Mac-notify Enabled : Yes
Mac-move Enabled : Yes
Trap-interval : 60
Port    MAC Addresses    trap learned/removed
------ ----------------------------------
5       Learned
6       Learned

Configuring traps on a port-bases for removed MAC addresses

switch# mac-notify traps 3-4 removed
switch(config)# show mac-notify traps
Mac Notify Trap Information
Mac-notify Enabled : Yes
Mac-move Enabled : Yes
Trap-interval : 60
Port    MAC Addresses    trap learned/removed
------ ----------------------------------
1         None
2         None
3         Removed
4         Removed