MAC address table

term

networking

Kept in this browser · My desk

The table a switch uses to forward frames: each entry maps a MAC address, in a VLAN, to the port it was last heard on, learned from the source address of every frame received and removed after a period of silence.

The rule dates from Digital in 1983: learn from the source, decide by the destination, then forward to one port, filter if the destination is on the arrival port, or flood when it is unknown. The IEEE calls the table the Filtering Database (802.1D, now 802.1Q); Perlman's 1985 paper and the Bridge MIB say forwarding database; Cisco says MAC address table and, in its notification commands, CAM table; Juniper says Ethernet switching table; Extreme says FDB; Cabletron's manuals said Source Address Table. The default ageing is 300 seconds on nearly every platform, and every modern switch keys its entries by VLAN.

What it is. The MAC address table is the switch's memory of where stations are: each entry ties a media access control (MAC) address, in a VLAN (virtual local area network) or filtering database, to the port it was last heard on, with a type (learned, static, the switch's own) and an age. The forwarding process reads it for every frame; the learning process writes it from every frame. The Internet Engineering Task Force (IETF) Bridge MIB (management information base, Request for Comments (RFC) 4188, September 2005) names the entry states other, invalid, learned, self and mgmt, and Cabletron's manuals of the 1990s listed static, dynamic, learned, self and permanent entries in what they called the Source Address Table.

Learning. The Learning Process creates a dynamic entry when the arrival port is in a state that allows learning, the source is an individual address, the table has room and the VLAN has a member port; one entry per address and filtering database, so a new sighting replaces the old one (a MAC move), and a static entry cannot be overwritten by learning (the University of New Hampshire (UNH) test suite, citing 802.1D-1998 clause 7.8). Whether VLANs share one filtering database or each has its own is a design choice the Q-BRIDGE MIB (RFC 4363, January 2006) reports as Independent VLAN Learning, Shared VLAN Learning or both; every modern switch keys its entries by VLAN, so the same address can sit on different ports in two VLANs.

A table walk. A four-port switch, VLAN 10, empty table; documentation addresses A = 00-00-5E-00-53-0A, B = 00-00-5E-00-53-0B, C = 00-00-5E-00-53-0C. Frame 1, A on port 1 to B: learn (A, VLAN 10, port 1); B is unknown, so flood to ports 2, 3 and 4. Frame 2, B on port 3 to A: learn (B, 10, 3); A is known on port 1, so forward to port 1 only, and the other ports never see it. Frame 3, C on port 3 (behind a small unmanaged switch with B) to B: learn (C, 10, 3); B is on port 3, the arrival port, so filter: the frame is dropped, because B already heard it on the shared segment. Then 300 seconds pass with no frame from A: the entry ages out, and the next frame for A is flooded again until A speaks. Four rules, learn, forward, filter and flood, and one timer explain almost every symptom on a switched LAN (local area network).

Ageing. The Bridge MIB allows 10 to 1,000,000 seconds and records that 802.1D-1998 recommends 300; the IEEE (Institute of Electrical and Electronics Engineers) YANG model keeps the same range and default. Platforms count it differently: ExtremeXOS polls every quarter of the ageing time (10 to 60 seconds), Huawei deletes an entry not refreshed within twice the ageing time, and during a spanning tree topology change the forward delay is used instead. Fortinet's FortiSwitchOS ages learned addresses after 300 seconds (10 to 1,000,000; 0 never), and when ageing is switched off still removes inactive addresses from the hardware after 24 hours by default (0 to 168 hours).

Names and commands. The IEEE calls the table the Filtering Database, in 802.1D and now in 802.1Q: 802.1D-2004 is marked superseded by 802.1Q-2014, its content merged there under the 2013 revision, and 802.1Q-2022 (published 22 December 2022) is the active standard. Cisco show mac address-table (H.H.H, fc58.9a02.7382); Juniper show ethernet-switching table; ExtremeXOS show fdb; VOSS show vlan mac-address-entry; AOS-CX show mac-address-table (age-time 60 to 3,600 s); H3C and Huawei display mac-address (H-H-H, 00e0-fc12-3456; H3C accepts f-e2-1 for 000f-00e2-0001); FortiSwitchOS calls it the layer-2 table; Linux bridge fdb show.

Hardware. The name CAM comes from content-addressable memory, but vendors' own messages describe hash tables: Extreme logs entries refused because their hash bucket is full while others have room, Huawei offers hash modes based on a cyclic redundancy check (CRC) and warns that conflicts make it fail to learn and broadcast, and Arista added a command listing addresses lost to hash collisions. Juniper's unified forwarding table shares one memory between MAC and layer 3 entries: on EX4600 and QFX5100 switches the MAC table ranges from 288K entries in l2-profile-one through 160K in the default l2-profile-three down to 96K, depending on how much space layer 3 takes.

Scale. One São Paulo IX.br switch held 79,877 entries in 2015 with an ageing time of 90,000 seconds. In data centres the pressure is virtual machines: RFC 7348 (VXLAN, 2014) notes that a top-of-rack switch must learn hundreds of addresses per server and that, when the table overflows, it may stop learning until idle entries age out, flooding unknown destinations meanwhile. Fortinet offers an early warning: an optional check logs when the layer-2 table first passes 75 per cent full and when it drops back under 70 per cent, every 2 minutes by default.

What goes wrong. Overflow turns unicast into flooding, which is the whole of MAC flooding; per-port limits answer it (Fortinet's learning limit runs from 1 to 128 addresses per interface or VLAN, 0 meaning none, with static addresses not counted). A forged source moves an address's traffic, and the table cannot tell a moved host from an impostor. Bugs poison tables too: the National Vulnerability Database (NVD) record CVE-2021-34793 (2021) describes crafted TCP segments through a Cisco firewall in transparent mode that poisoned the MAC address tables of adjacent devices. And a flushed or full table is a security event as well as a performance one: CVE-2025-20316 records that flooded traffic from an unlearned address bypassed an egress access control list (ACL) on Cisco Catalyst 9500X and 9600X switches. Neighbours: transparent bridging (the rules), content-addressable memory and TCAM (the hardware words), unknown unicast flooding, MAC flapping, MAC flooding and port security.

Also known as: mac table, cam table, forwarding database, fdb, filtering database, source address table, ethernet switching table, tabela mac, tabela de endereços mac

Sources

← Back to M Back to the glossary