MAC flapping is what happens when a switch learns the same source address on one port, then relearns it on another port, over and over within seconds. Each move rewrites the forwarding database (FDB), so frames destined for that address are sent out of a port that may no longer reach the real host. This is a Layer 2 learning fault, not a link going up and down. As of November 2026, the short list of causes is a loop, two active uplinks that were never bundled into one logical link, a spoofed source address, a virtual machine or container that moved between hosts, and an MC-LAG pair whose two ends disagree on their LACP System ID.
Rayin (Shenzhen Rayin Technology) is a manufacturer of GPON OLTs and industrial Ethernet switches.
One address relearned on two ports in quick succession is a learning-loop symptom; a port or link flap is a physical state change, and the two need different tests.
As of November 2026, IEEE 802.1Q-2022 (Active) defines FDB learning and the MAC Service with RSTP and MSTP folded into it, while IEEE 802.1AX-2020 defines the LACP System ID behind link aggregation.
Read the MAC address table for move counts, confirm loop detection state, then check that a bundle is in sync; RFC 5227 covers IPv4 address conflicts, an ARP-layer issue rather than a forwarding one.
Start by separating two faults that sound alike but sit at different layers. A link flap is a physical event: the carrier drops, the port moves down then up, and the log records an interface state change. The behaviour described here is a logical event: the link stays up, yet the FDB entry for one source address is overwritten on a different ingress port and then back again. IEEE 802.1Q-2022 describes the learning process that builds that database and the MAC Service it supports, so both the symptom and the control live in the same standard. Treating the two as one fault sends an engineer to replace a patch cord when the real problem is two paths to the same host. As of November 2026, the 802.1D-2004 and 802.1w labels that older handbooks still quote are no longer the active references for spanning tree, because RSTP and MSTP were merged into 802.1Q-2022; a current troubleshooting guide should cite that consolidated edition, not the withdrawn standalone documents. A second distinction matters just as much: a full MAC address table does not, by itself, prove this fault. A switch that cannot add a new entry floods unknown destinations, which is a different symptom from an existing address being relearned on a second port, and asserting otherwise without a source would be an unsourced shortcut.

A switch learns by reading the source address of every frame arriving on a port and recording it against the ingress port and VLAN in the FDB, following the learning and forwarding rules in IEEE 802.1Q-2022. The entry ages out over time; a fresh frame from the same source on a different port simply overwrites it. One move is unremarkable — a laptop was unplugged and plugged in elsewhere, or a phone roamed to another access switch. A move that repeats many times each second is not unremarkable, and that repetition is exactly what a move counter exposes. The point is that the database is doing its job; it is the topology that keeps feeding it two conflicting answers. On a Rayin managed industrial Ethernet switch, as on any standards-based device, the learning rule is the one in IEEE 802.1Q-2022 — the brand changes the hardware, not the frame format or the FDB behaviour.
| What the log shows | A normal move | A relearning loop |
|---|---|---|
| Frequency | Once, after a device is moved | Many times per second, sustained |
| Link state | Unchanged | Unchanged |
| FDB action | One entry overwritten once | One entry overwritten repeatedly |
| Likely layer | Physical re-patch | Logical topology |
| First check | Where the host was plugged in | Whether two paths exist |
A single overwrite is housekeeping. A sustained stream of overwrites means something is presenting the same source address on two ports at once, and no amount of clearing the database will fix that; the counter resets and the moves start again within a frame or two. That is why the first diagnostic is to watch the counter climb rather than to flush the entries and hope. An industry-typical example is a bench test with one host and two patch leads: unplug and replug once and the counter ticks once; bridge the two ports and the counter climbs continuously.
Five causes dominate as of November 2026, and each leaves a different fingerprint. A Layer 2 loop is the classic one: a broadcast or unknown-unicast frame circulates and arrives on two ports, so the FDB flip-flops. Dual-homing without a bundle is the second: two active uplinks to the same host are seen as two valid paths, but IEEE 802.1AX-2020 makes clear that a link being up does not mean a LAG is synchronised — the LACP System ID and operational key have to agree before members are selected. A spoofed source is the third: a host or an attacker emits frames carrying another device's address, which is where IEEE 802.1X-2020 port access control and MAB fallback for non-authenticating devices become relevant; note that the current edition is 802.1X-2020, with Cor 1-2026 published as an erratum, not the withdrawn 802.1X-2010.
The fourth and fifth are virtualisation and MC-LAG. A virtual machine or container that migrates between hypervisors legitimately reappears on a new switch port, and if the move repeats during a failover loop the FDB follows it each time. An MC-LAG pair whose two chassis present different LACP System IDs will churn its member links: each end believes it is a separate aggregator, so frames from one address show up on whichever member is momentarily active. As an industry-typical worked example, a dual-homed server with two unbundled NICs, both sending untagged frames with the same source address, produces a steady stream of moves that stops the moment one NIC is made passive or the pair is configured as a single LAG under IEEE 802.1AX-2020. None of these five is fixed by tuning an ageing timer.
| Root cause | What the FDB sees | Standard to cite |
|---|---|---|
| Layer 2 loop | Same address from two ports | IEEE 802.1Q-2022 (RSTP/MSTP) |
| Dual-homing without LAG | Two valid paths to one host | IEEE 802.1AX-2020 (System ID, operational key) |
| Spoofed source | Address claimed by a second device | IEEE 802.1X-2020, MAB fallback |
| VM / container drift | Legitimate repeated moves | IEEE 802.1Q-2022 (learning) |
| MC-LAG System ID mismatch | Member churn | IEEE 802.1AX-2020 |
Note on older references: the 802.3ad designation for link aggregation that some legacy documents quote was superseded; as of November 2026 the active standard is IEEE 802.1AX-2020. Citing the superseded label is a quick way to date a procedure, and it also hides the System ID check that actually explains MC-LAG churn.
Once you accept that the link is stable, the cheapest next step is to prove whether a physical loop exists. Confirm the spanning-tree state on the relevant VLAN under IEEE 802.1Q-2022, look for a port that should be blocking but is forwarding, and check whether storm-control counters are climbing. That is where loop detection earns its name: it is the set of protocol states and counters that tell you a redundant path is active, not a guess from a blinking LED. If a port has already shut itself off, the recovery behaviour is a separate decision — see err-disable recovery for how a port is brought back, and preventing loops and broadcast storms for the sequence that stops the loop in the first place. A storm and a relearning loop often appear together because a looped broadcast frame is what makes the FDB oscillate, but they are not the same measurement: one is a traffic rate, the other is a count of FDB moves.
A broadcast storm is a rate problem: frames addressed to all ports are replicated around a loop until bandwidth and CPU are consumed. A migrating address is a database problem: one FDB entry is rewritten repeatedly. They share a cause — a loop — but the first is measured in frames per second and broadcast percentage, while the second is measured in moves per second. Storm control on an IEEE 802.1Q-2022-based switch can rate-limit that traffic, which quiets the flood without removing the topology error that caused it. In other words, suppressing a broadcast storm may stop the FDB from oscillating as a side effect, but the two counters answer different questions, and a clean storm counter does not prove the address has stopped moving.
| Counter | Measures | What a high value means |
|---|---|---|
| Broadcast / storm rate | Frames per second to all ports | A loop is flooding the segment |
| FDB move count | Times one entry was overwritten | One address is seen on two ports |
| Link state changes | Up/down transitions | A physical or optical fault |
| LACP member changes | Bundle membership churn | System ID or key mismatch (IEEE 802.1AX-2020) |
Reading those four rows together separates a rate fault from a pure address conflict; as of November 2026, most managed switches expose all four, and a handover document that records only throughput will miss three of them (industry-typical).
Not every "same address" alarm is a Layer 2 move. RFC 5227 defines IPv4 Address Conflict Detection, the probe-and-announce procedure a host uses to discover that another node already holds the IP address it wants. That is an ARP-layer conflict about an IP-to-MAC mapping, not an FDB entry being relearned on a second port. A duplicate-IP event can produce ARP replies with two different MAC addresses for one IP, which looks superficially similar in a packet capture, but the switch's FDB is not oscillating — the mapping is being disputed at Layer 3. As of November 2026, keeping these two apart matters because the fixes are unrelated: a conflict is resolved by address assignment and DHCP scope hygiene, whereas the forwarding fault is resolved by topology and bundle configuration. Where ARP spoofing is the suspected source of forged frames, IEEE 802.1X-2020 and MAB fallback limit which ports may inject traffic at all, but they do not change what RFC 5227 does.
A usable handover records four things, not one blinking LED. First, the FDB move count for the affected address and VLAN, to prove the entry is being rewritten. Second, the spanning-tree and loop state under IEEE 802.1Q-2022, to show whether a redundant path is forwarding. Third, the LACP System ID and operational key on both ends of any bundle under IEEE 802.1AX-2020, because a link that is up but unsynchronised is a common 2026 trap; a link-up event is not proof that the LAG converged. Fourth, the storm-control and interface counters, so the next engineer can tell a rate fault from a database fault. As an industry-typical acceptance rule, require all four to be stable for a defined observation window before signing off; a single clear of the database is not evidence.
This is also where hardware scope should be stated plainly. The current Rayin catalogue covers four lines: mini GPON OLTs, 1-port XPON ONUs, 8+4-port gigabit industrial Ethernet switches with optional PoE, and PON optical modules bundled with an OLT. The 4/8-port GPON OLT and the 1-port XGS-PON OLT are in development as of November 2026. None of the checks above depends on a particular model; they follow from IEEE 802.1Q-2022 and IEEE 802.1AX-2020, which is why the same worksheet works on any standards-based switch. At Rayin, as on any standards-based platform, the acceptance record is the deliverable, not a claim about a proprietary feature.
Why does one address keep moving between two ports?
Because two paths both claim to reach the same source. A loop copies one frame onto different ports, and a dual-homed host with two unbundled NICs does the same, so the FDB is rewritten from each. Check the physical topology first; the fix is one logical path, not a faster ageing timer.
Is a link flap the same fault?
No. A link flap is a physical up-down transition recorded in the interface log, while the learning fault happens on a link that stays up. IEEE 802.1Q-2022 governs the FDB behaviour; a carrier loss is a Layer 1 event. Replacing a cable will not remove a topology loop.
Can a full FDB cause the address to move?
Not by itself. A database that cannot add a new entry floods unknown destinations; it does not repeatedly rewrite an existing one on a second port. Claiming otherwise without a source is an unsourced shortcut. Look for two active paths instead, and cite IEEE 802.1Q-2022 for the learning rule.
Which standard should a 2026 procedure cite for spanning tree?
Cite IEEE 802.1Q-2022, which is Active as of November 2026 and has RSTP and MSTP merged into it. The standalone 802.1D-2004 and 802.1w labels are no longer the current references, and 802.3ad was superseded for aggregation by IEEE 802.1AX-2020. Cite series names, not clause numbers.
What should the handover document show?
At Rayin, as on any standards-based platform, record four stable figures: FDB move count, spanning-tree state, LACP System ID on both bundle ends, and storm-control counters. Four stable readings over a defined window, not one cleared database, let the next engineer tell a rate fault from a forwarding fault.
The learning, loop and aggregation statements above come from public sources: IEEE 802.1Q-2022 (FDB learning, the MAC Service, and the merged RSTP/MSTP spanning-tree behaviour), IEEE 802.1AX-2020 (LACP System ID and operational key), IEEE 802.1X-2020 with its MAB fallback, and IETF RFC 5227 (IPv4 address conflict detection). Only series names and RFC numbers are cited; no clause numbers are asserted. The worked examples, comparison tables and wording were written and checked by Sara against those sources before publication. Anything presented as an industry-typical value is labelled as such; nothing here is a measured figure from a Rayin product or a claim of any certification.
About the author: Sara — Sara is a Customer Manager at Rayin with over 10 years of experience in the communications field. In her free time, she enjoys badminton and swimming.
About Rayin: Shenzhen Rayin Technology Co., Ltd. — Company Profile