%SW_MATM-4-MACFLAP_NOTIF or MAC Flapping Cisco Switch

edledge Cisco logo

Scenario:
Make
: Cisco
Model: Cisco 2960 Series
Mode: Command Line Interface [CLI]
Description: In this article, we will discuss how to resolve the issue if the hosts are not stable or the connections on LAN or Wireless are dropping intermittently due to the issue/error of MAC address flapping. When we look onto the Cisco switch, it shows errors as “%SW_MATM-4-MACFLAP_NOTIF“. Here we will discuss how to resolve the issue/error.

Problem

Sometimes you will observe that the LAN or Wireless connections are not stable and when you look for the logs onto the Cisco switch you will find the logs as shown below starting with “%SW_MATM-4-MACFLAP_NOTIF“. This generally happens when the MAC addresses are flapping between two interfaces [as shown below] in a VLAN.

Mar 1 03:45:34.177: %SW_MATM-4-MACFLAP_NOTIF: Host 70a8.70a8.70a8 in vlan 111 is flapping between port Gi2/0/1 and port Gi3/0/1
Mar 1 03:45:39.144: %SW_MATM-4-MACFLAP_NOTIF: Host 0456.0456.0456 in vlan 111 is flapping between port Gi2/0/1 and port Gi3/0/1
Mar 1 03:45:44.820: %SW_MATM-4-MACFLAP_NOTIF: Host c03c.c03c.c03c in vlan 111 is flapping between port Gi2/0/1 and port Gi3/0/1
Mar 1 03:45:45.296: %SW_MATM-4-MACFLAP_NOTIF: Host bcf1.bcf1.bcf1 in vlan 111 is flapping between port Gi2/0/1 and port Gi3/0/1
Mar 1 03:45:45.498: %SW_MATM-4-MACFLAP_NOTIF: Host f4b3.f4b3.f4b3 in vlan 111 is flapping between port Gi3/0/1 and port Gi2/0/1
Mar 1 03:45:51.619: %SW_MATM-4-MACFLAP_NOTIF: Host c8cb.c8cb.c8cb in vlan 111 is flapping between port Gi2/0/1 and port Gi3/0/1
Mar 1 03:45:55.310: %SW_MATM-4-MACFLAP_NOTIF: Host cc15.cc15.cc15 in vlan 111 is flapping between port Gi3/0/1 and port Gi2/0/1
Mar 1 03:46:02.031: %SW_MATM-4-MACFLAP_NOTIF: Host 04cf.04cf.04cf in vlan 111 is flapping between port Gi3/0/1 and port Gi2/0/1
Mar 1 03:46:02.737: %SW_MATM-4-MACFLAP_NOTIF: Host c03c.c03c.c03c in vlan 111 is flapping between port Gi3/0/1 and port Gi2/0/1
Mar 1 03:46:06.152: %SW_MATM-4-MACFLAP_NOTIF: Host cc15.cc15.cc15 in vlan 111 is flapping between port Gi3/0/1 and port Gi2/0/1

Solution

One of the main causes of the issue is the STP configuration and/or BPDU status. Follow the steps mentioned here to solve the issue of MAC address flapping within the interfaces on the Cisco switch.

Step1: Login
SSH onto the switch using username and password. Refer to the article if you are facing issues “Couldn’t agree a key exchange algorithm” SSH Error with Putty while doing SSH onto the switch.

SSH 10.1

Knowledge_Check_Cisco_01

1 / 5

What are the two types of packet capture in Cisco ASA?

2 / 5

What is the default buffer size of Cisco ASA PCAP?

3 / 5

How many interfaces in Cisco ASA can have same route map?

4 / 5

Does Cisco ASA supports PPPoE link?

5 / 5

How many 10 Gig ports are available in Cisco 5508-X ASA?

Your score is

The average score is 60%

0%

Step2: STP Status
Check the STP and BPDU status on global configuration. Follow the command shown below to check the STP status.

edledge-switch#sh spanning-tree summary
Switch is in pvst mode
Root bridge for: VLAN0001, VLAN002, VLAN003, VLAN004, VLAN0111,
EtherChannel misconfig guard is enabled
Extended system ID is enabled
Portfast Default is disabled
Portfast Edge BPDU Guard Default is enabled
Portfast Edge BPDU Filter Default is disabled
Loopguard Default is disabled
PVST Simulation Default is enabled but inactive in pvst mode
Bridge Assurance is enabled but inactive in pvst mode
UplinkFast is disabled
BackboneFast is disabled

Step3: Disable BPDU Filter
Disable the BDPU filter on the interfaces which are flapping or if possible disable it globally.

edledge-switch#conf t
edledge-switch(config)#int gig 2/0/1
edledge-switch(config-if)#spanning-tree bpdufilter disable
edledge-switch(config-if)#exit
edledge-switch(config)#exit
edledge-switch#



edledge-switch#conf t
edledge-switch(config)#int gig 3/0/1
edledge-switch(config-if)#spanning-tree bpdufilter disable
edledge-switch(config-if)#exit
edledge-switch(config)#exit
edledge-switch#

Step4: Enable Portfast
Enable STP portfast on the interfaces which are causing issues of MAC flap.

edledge-switch#conf t
edledge-switch(config)#int gig 2/0/1
edledge-switch(config-if)#spanning-tree portfast edge trunk
edledge-switch(config-if)#exit
edledge-switch(config)#exit
edledge-switch#



edledge-switch#conf t
edledge-switch(config)#int gig 3/0/1
edledge-switch(config-if)#spanning-tree portfast edge trunk
edledge-switch(config-if)#exit
edledge-switch(config)#exit
edledge-switch#

Step5: Save
Save the configuration changes done above.

edledge-switch#wr
Building configuration...
[OK]

The MAC address flapping issue should have been resolved by applying above mentioned changes, but in case you are still facing the flapping issue then it is recommended to do Firmware or IOS Upgrade Of Cisco 2960 Switch Stack. If you using only one Cisco switch then you could refer to the article to know how to do Firmware or IOS Upgrade/Downgrade Of Standalone Cisco Switch.

SourceCisco, Knowledge Base, Internet

EA00132

2 thoughts on “%SW_MATM-4-MACFLAP_NOTIF or MAC Flapping Cisco Switch
  1. When applying *spanning-tree portfast trunk*,

    %Warning: portfast should only be enabled on ports connected to a single
    host. Connecting hubs, concentrators, switches, bridges, etc… to this
    interface when portfast is enabled, can cause temporary bridging loops.
    Use with CAUTION

    Is it ok ?

Leave a Reply

Your email address will not be published. Required fields are marked *