Skip to content
LinkState
Go back

Reading FDB aging like an outage timeline

Introduction to Short Bridge FDB and Packet‑Capture Artifacts

The Linux bridge maintains a Forwarding Database (FDB) that maps MAC addresses to bridge ports. Entries are static (admin‑added) or dynamic (learned from the source MAC of incoming frames). For each ingress frame the bridge looks up the destination MAC: if found, the frame is forwarded only to the associated port; otherwise it is flooded to all ports except the ingress port.

The FDB is a short‑lived cache. Entries are removed when they become stale (no traffic seen for the aging interval) or when the FDB table fills and the oldest entry is evicted. The aging timer is configurable per bridge (default 300 s).

When workloads observe intermittent packet loss, the symptom often appears as random drops. In a bridged environment the loss is frequently caused by unknown‑unicast flooding bursts: the bridge floods a frame because its destination MAC is missing from the FDB, consuming bandwidth on ports that do not need the traffic and causing queue drops on those ports. Capturing traffic on a port that should not see the flow reveals the burst pattern, while inspecting the FDB shows why the MAC was missing (stale entry, rapid relearn, or aging‑timer expiry).


Understanding Stale Entries and Their Impact

Definition and Causes

A stale FDB entry is a dynamic mapping that has not been refreshed by a source‑MAC learning event within the bridge’s aging interval. Common causes:

When an entry becomes stale, the bridge treats any frame destined for that MAC as unknown‑unicast and floods it until the MAC is relearned (by seeing a frame with that MAC as source).

Effects on Network Performance

Identifying Stale Entries with Packet Captures

Capture on a quiet port (a bridge port that carries no expected traffic for the flow) and look for bursts of frames whose destination MAC equals the MAC of the silent host.

# Capture on veth10 (quiet port) for 10 s, show MAC headers
sudo tcpdump -i veth10 -e -nn -s 0 -c 200 'ether[6:2] = 0x0800'

Sample output (truncated):

12:34:56.789012 00:11:22:33:44:55 > 00:aa:bb:cc:dd:ee, ethertype IPv4 (0x0800), length 98: ...
12:34:56.789150 00:11:22:33:44:55 > 00:aa:bb:cc:dd:ee, ethertype IPv4 (0x0800), length 98: ...
12:34:56.789300 00:11:22:33:44:55 > 00:aa:bb:cc:dd:ee, ethertype IPv4 (0x0800), length 98: ...

Here 00:aa:bb:cc:dd:ee is the MAC of a host not attached to veth10. Seeing multiple frames with that destination in a short window indicates the bridge flooded an unknown‑unicast frame for that MAC.

Correlate with the FDB:

sudo bridge fdb show dev br0 | grep 00:aa:bb:cc:dd:ee

If the entry is missing, marked self, or shows an old timestamp, the entry is stale.


Rapid Relearns and Their Role in Periodic Unknown‑Unicast Bursts

What Are Rapid Relearns?

A rapid relearn occurs when a host’s MAC address flaps between bridge ports faster than the aging timer can expire the old entry. Each time the MAC appears on a new port, the bridge overwrites the FDB entry with the new port. If the host moves back and forth (e.g., mis‑configured bonding, container live‑migration loops, VMware vMotion misbehavior), the entry is constantly updated, causing the bridge to flush and relearn the MAC on each change.

When the MAC flaps, there is a brief window after each move where the bridge has no entry for that MAC on the previous port (the old entry still exists but points to the wrong port). Frames destined for the MAC that arrive on the old port are flooded until the new entry is learned. If the flap frequency matches the aging timer or is a sub‑multiple, the flooding appears as a periodic burst.

Relationship to Stale Entries

Rapid relearns generate temporary stale entries on the port the host just left. The bridge considers the entry stale only after the aging timer expires without seeing a source MAC on that port. If the host returns before the timer expires, the entry is simply updated (not stale). However, if the host leaves and does not return before the timer expires, the entry becomes stale and will cause flooding for any traffic destined to that MAC that arrives on the old port after the timer expires. In high‑frequency flapping, the timer may never expire, but constant overwriting can still cause micro‑bursts of flooding each time the MAC changes direction.

Detecting Rapid Relearns

Monitor FDB changes in real time:

sudo bridge monitor dev br0

Sample output during a flap (MAC 00:11:22:33:44:55 moving between veth5 and veth6 every 2 s):

00:11:22:33:44:55 dev veth5 self permanent
00:11:22:33:44:55 dev veth6 self
00:11:22:33:44:55 dev veth5 self
00:11:22:33:44:55 dev veth6 self
...

Each line indicates the bridge relearned the MAC to a new port. To count relearns over a period:

sudo bridge monitor dev br0 2>/dev/null | grep -c "00:11:22:33:44:55"

If the count spikes (e.g., >10 relearns in 5 s) while traffic counters on the ports show no corresponding increase, suspect rapid relearns.


Aging Timers and Their Contribution to Unknown‑Unicast Bursts

Functionality and Configuration

The bridge aging timer defines how long a dynamic FDB entry is retained without seeing a source‑MAC refresh. When the timer expires, the entry is flushed. The timer is set per bridge:

# Show current aging time (seconds)
sudo bridge fdb show dev br0 | grep ageing_time
# Output: ageing_time 300

# Set a new aging time (e.g., 60 s)
sudo bridge fdb set dev br0 ageing_time 60

A short aging timer causes entries to expire quickly, increasing the chance that a host silent longer than the timer will be treated as unknown‑unicast. A long timer reduces false flooding but can cause blackholing if a host moves and the old entry persists longer than the new traffic arrives.

Interaction with Stale Entries and Rapid Learns

Example: Adjusting the Aging Timer

Reduce flooding for a host known to be silent up to 90 s:

# Current timer
sudo bridge fdb show dev br0 | grep ageing_time
# ageing_time 300

# Reduce to 90 s to match expected silence
sudo bridge fdb set dev br0 ageing_time 90

# Verify
sudo bridge fdb show dev br0 | grep ageing_time
# ageing_time 90

If the environment experiences rapid MAC flapping (e.g., VM live‑migration loops), increase the timer to avoid premature expiry:

sudo bridge fdb set dev br0 ageing_time 600   # 10 min

Troubleshooting Periodic Unknown‑Unicast Bursts

Using Packet‑Capture Artifacts to Identify Burst Patterns

  1. Select a monitoring port that should not see the flow (e.g., a VLAN interface used only for management).
  2. Capture with microsecond resolution and limit to Ethernet type IPv4/IPv6 to reduce noise.
  3. Look for periodic spikes in the number of packets with a specific destination MAC.
# Capture 30 s, output to file for later analysis
sudo tcpdump -i mgmt0 -e -nn -s 0 -w /tmp/unknown_ucast.pcap 'ether[6:2] = 0x0800'

After capture, use tshark to count per‑destination MAC:

tshark -r /tmp/unknown_ucast.pcap -Y eth.dst -T fields -e eth.dst | sort | uniq -c | sort -nr | head -10

A MAC that appears with a high count in bursts (e.g., 500 packets every 20 s) while no traffic is expected indicates unknown‑unicast flooding.

Analyzing the Short Bridge FDB to Detect Stale Entries and Rapid Relearns

Combine FDB snapshots with timestamps:

# Take a snapshot every second for 20 s
for i in {1..20}; do
    date +"%T.%3N" >> /tmp/fdb_ts.log
    sudo bridge fdb show dev br0 >> /tmp/fdb_ts.log
    sleep 1
done

Parse the log: if a MAC’s associated port changes frequently or disappears for a period longer than the aging timer, you have a stale entry or rapid relearn.

CLI Commands for Troubleshooting Aging Timer Issues


Scaling Limitations and Considerations

Impact of Network Size on Short Bridge FDB and Aging Timers

Scaling the Short Bridge FDB and Aging Timers for Large Networks

Limitations of Packet‑Capture Artifacts in High‑Volume Networks


Mitigation Strategies for Periodic Unknown‑Unicast Bursts

Adjusting Aging Timers for Optimal Performance

Reducing Rapid Relearns

Controlling FDB Size

Using Static FDB Entries for Critical Hosts

Verifying Mitigation

After applying changes, repeat the packet‑capture procedure on a quiet port. The burst count for the previously problematic MAC should drop to zero or to baseline levels. Confirm with FDB queries that the entry is present, correctly aged, and not flapping.


By correlating packet‑capture artifacts with FDB state, administrators can pinpoint whether stale entries, rapid relearns, or aging‑timer settings are causing periodic unknown‑unicast bursts, and then apply targeted tuning to eliminate the apparent random packet loss experienced by workloads.


Share this post on:

Previous Post
Can AI isolate a stuck OSPF session safely
Next Post
From host_vars sprawl to an object graph