MAC address table
termoGuardado neste navegador · Minha bancada
A tabela que o switch usa para encaminhar frames: cada entrada liga um endereço MAC, numa VLAN, à porta em que ele foi ouvido pela última vez, aprendida a partir do endereço de origem de cada frame recebido e removida depois de um período de silêncio.
A regra vem da Digital, em 1983: aprender pela origem, decidir pelo destino, e então encaminhar para uma porta, filtrar se o destino está na porta de chegada, ou inundar quando ele é desconhecido. O IEEE chama a tabela de Filtering Database (802.1D, hoje 802.1Q); o artigo de Perlman de 1985 e a Bridge MIB falam em forwarding database; a Cisco diz MAC address table e, nos comandos de notificação, CAM table; a Juniper diz Ethernet switching table; a Extreme diz FDB; os manuais da Cabletron diziam Source Address Table. O aging padrão é de 300 segundos em quase toda plataforma, e todo switch moderno indexa as entradas por VLAN.
O que é. A tabela MAC é a memória do switch sobre onde estão as estações: cada entrada liga um endereço MAC (media access control), numa VLAN (virtual local area network, rede local virtual) ou numa base de filtragem, à porta em que ele foi ouvido pela última vez, com um tipo (aprendido, estático, do próprio switch) e uma idade. O processo de encaminhamento a lê a cada frame; o processo de aprendizado a escreve a cada frame. A Bridge MIB (management information base) do IETF (Internet Engineering Task Force), a RFC (Request for Comments) 4188, de setembro de 2005, chama os estados de entrada de other, invalid, learned, self e mgmt, e os manuais da Cabletron dos anos 1990 listavam entradas static, dynamic, learned, self e permanent no que chamavam de Source Address Table.
Aprendizado. O Learning Process cria uma entrada dinâmica quando a porta de chegada está num estado que permite aprender, a origem é um endereço individual, a tabela tem espaço e a VLAN tem uma porta membro; uma entrada por endereço e por base, então um novo avistamento substitui o anterior (um MAC move), e uma entrada estática não pode ser sobrescrita pelo aprendizado (bateria de testes da UNH, University of New Hampshire, citando a cláusula 7.8 do 802.1D-1998). Se as VLANs compartilham uma base de filtragem ou se cada uma tem a sua é escolha de projeto, que a Q-BRIDGE MIB (RFC 4363, janeiro de 2006) informa como Independent VLAN Learning, Shared VLAN Learning ou os dois; todo switch moderno indexa as entradas por VLAN, então o mesmo endereço pode estar em portas diferentes em duas VLANs.
Um passeio pela tabela. Um switch de quatro portas, VLAN 10, tabela vazia; endereços de documentação A = 00-00-5E-00-53-0A, B = 00-00-5E-00-53-0B, C = 00-00-5E-00-53-0C. Frame 1, A na porta 1 para B: aprende (A, VLAN 10, porta 1); B é desconhecido, então inunda para as portas 2, 3 e 4. Frame 2, B na porta 3 para A: aprende (B, 10, 3); A é conhecido na porta 1, então encaminha só para a porta 1, e as outras portas nunca o veem. Frame 3, C na porta 3 (atrás de um switch pequeno não gerenciável, junto com B) para B: aprende (C, 10, 3); B está na porta 3, a porta de chegada, então filtra: o frame é descartado, porque B já o ouviu no segmento compartilhado. Aí passam 300 segundos sem frame de A: a entrada envelhece, e o próximo frame para A volta a ser inundado até A falar. Quatro regras, aprender, encaminhar, filtrar e inundar, e um timer explicam quase todo sintoma de uma LAN (local area network) comutada.
Aging. A Bridge MIB admite de 10 a 1.000.000 de segundos e registra que o 802.1D-1998 recomenda 300; o modelo YANG do IEEE (Institute of Electrical and Electronics Engineers) mantém a mesma faixa e o mesmo padrão. As plataformas contam de jeitos diferentes: o ExtremeXOS confere a cada quarto do aging (entre 10 e 60 segundos), a Huawei apaga a entrada não renovada dentro do dobro do aging, e numa mudança de topologia do spanning tree vale o forward delay. O FortiSwitchOS da Fortinet envelhece os endereços aprendidos em 300 segundos (de 10 a 1.000.000; 0 nunca) e, com o aging desligado, ainda remove do hardware os endereços inativos depois de 24 horas por padrão (de 0 a 168 horas).
Nomes e comandos. O IEEE chama a tabela de Filtering Database, no 802.1D e hoje no 802.1Q: o 802.1D-2004 consta como substituído pelo 802.1Q-2014, com o conteúdo incorporado nele pela revisão de 2013, e o 802.1Q-2022 (publicado em 22 de dezembro de 2022) é a norma em vigor. 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 de 60 a 3.600 s); H3C e Huawei display mac-address (H-H-H, 00e0-fc12-3456; a H3C aceita f-e2-1 por 000f-00e2-0001); o FortiSwitchOS a chama de layer-2 table; Linux bridge fdb show.
Hardware. O nome CAM vem de content-addressable memory, mas as mensagens dos próprios fabricantes descrevem tabelas hash: a Extreme registra entradas recusadas porque o bucket está cheio enquanto outros têm espaço, a Huawei oferece modos de hash baseados em CRC (cyclic redundancy check, verificação cíclica de redundância) e avisa que os conflitos fazem o equipamento deixar de aprender e inundar, e a Arista criou um comando que lista os endereços perdidos por colisão de hash. A unified forwarding table da Juniper divide uma memória entre entradas MAC e de camada 3: nos switches EX4600 e QFX5100, a tabela MAC vai de 288K entradas no l2-profile-one, passa por 160K no l2-profile-three, o padrão, e desce até 96K, conforme o espaço que a camada 3 ocupa.
Escala. Um switch do IX.br em São Paulo tinha 79.877 entradas em 2015, com aging de 90.000 segundos. Em data centers, a pressão vem das máquinas virtuais: a RFC 7348 (VXLAN, 2014) observa que um switch top-of-rack precisa aprender centenas de endereços por servidor e que, quando a tabela estoura, ele pode parar de aprender até as entradas ociosas envelhecerem, inundando os destinos desconhecidos enquanto isso. A Fortinet oferece um aviso antecipado: uma verificação opcional registra quando a layer-2 table passa pela primeira vez de 75% de ocupação e quando volta a ficar abaixo de 70%, a cada 2 minutos por padrão.
O que dá errado. O estouro transforma unicast em flooding, e isso é todo o MAC flooding; limites por porta respondem a ele (o learning limit da Fortinet vai de 1 a 128 endereços por interface ou VLAN, com 0 querendo dizer sem limite, e os endereços estáticos não entram na conta). Uma origem forjada desvia o tráfego de um endereço, e a tabela não distingue um host que mudou de lugar de um impostor. Bugs também envenenam tabelas: o registro CVE-2021-34793 da NVD (National Vulnerability Database), de 2021, descreve segmentos TCP forjados atravessando um firewall Cisco em modo transparente que envenenavam as tabelas MAC dos equipamentos vizinhos. E uma tabela esvaziada ou cheia é evento de segurança, além de desempenho: o CVE-2025-20316 registra que tráfego inundado de um endereço não aprendido contornava uma ACL (access control list, lista de controle de acesso) de saída nos switches Cisco Catalyst 9500X e 9600X. Vizinhos: o bridging transparente (as regras), a content-addressable memory e a TCAM (as palavras de hardware), o unknown unicast flooding, o MAC flapping, o MAC flooding e o port security.
Também conhecido como: mac table, cam table, forwarding database, fdb, filtering database, source address table, ethernet switching table, tabela mac, tabela de endereços mac
Fontes
- Radia Perlman, Digital Equipment Corporation, An Algorithm for Distributed Computation of a Spanning Tree in an Extended LAN, 1985 (read 2026-11-23): the forwarding data base of station and link, built from source fields; flood to all links but the arrival link when no entry exists; do not forward when the entry points to the arrival link; infinitely circulating packets
- Google Patents, US4597078A, Bridge circuit for interconnecting networks, Mark F. Kempf, Digital Equipment Corporation, filed 19 October 1983, granted 24 June 1986 (read 2026-11-23): the learning rule in the abstract; a look-up RAM tagged with each station's side
- UNH InterOperability Laboratory, Bridge Functions Consortium, Filtering Database Operations Test Suite 1.4, 2006 (read 2026-11-23): the Learning Process conditions of 802.1D-1998 7.8 and 802.1Q-1998 8.10; one dynamic entry per MAC address and FID; static entries block learning; ageing time 10 to 1,000,000 s; forward delay as ageing during topology change
- IETF, RFC 4188, Definitions of Managed Objects for Bridges, September 2005 (read 2026-11-23): dot1dTpAgingTime 10 to 1,000,000 s, 802.1D-1998 recommends 300 s; FDB entry states other, invalid, learned, self, mgmt; dot1dTpLearnedEntryDiscards
- IEEE 802.1, ieee802-dot1q-bridge YANG module, revision 2023-10-26 (read 2026-11-23): filtering-database used by the Forwarding Process; aging-time 10 to 1,000,000 s, default 300; references 8.8.3 and 12.7 of IEEE Std 802.1Q
- Cisco, Catalyst 9300 IOS XE 17.12 System Management Configuration Guide, Administering the Device (read 2026-11-23): learning, filtering when the destination is on the arrival port, store-and-forward, a logical table per VLAN, ageing 10 to 1,000,000 s, default 300, 0 disables
- Cisco, Catalyst 9300 IOS XE 17.12 Command Reference, System Management Commands (read 2026-11-23): show mac address-table, the H.H.H format, sample fc58.9a02.7382, the CAM-table utilization notification (one line expands CAM as 'Counter-Addressable Memory'), MAC move notification
- Juniper Networks, MAC Table Aging (read 2026-11-23): the Ethernet switching table, also called the MAC table, organized by VLAN; unknown destinations flooded to the VLAN's other interfaces; flooding lets the switch learn
- Huawei, S12700 and S12700E V200R023C10 Command Reference, MAC Address Table Configuration Commands (read 2026-11-23) (read in a browser): display mac-address with H-H-H addresses; ageing default 300 s, 0 or 60 to 1,000,000; deletion after twice the ageing time; flapping detection on by default with error-down and quit-vlan actions; hash modes crc16 and crc32, default crc32-lower; hash conflicts make it fail to learn and broadcast
- H3C, S12500X-AF Layer 2 LAN Switching Configuration Guide (R320x), MAC address table configuration (read 2026-11-23): learning steps, static, dynamic and blackhole entries, ageing default 300 s, MAC learning limit, MAC move notifications and suppression (30 s, threshold 3)
- H3C, S6300 Layer 2 LAN Switching Command Reference (Release 243x) (read 2026-11-23): display mac-address, H-H-H with leading zeros omissible (f-e2-1 for 000f-00e2-0001), MAC move records
- Extreme Networks, ExtremeXOS 33.1.1 User Guide, FDB contents and ageing (read 2026-11-23): entry fields; frames for unknown addresses flooded to all VLAN members; polling interval ageing/4 between 10 and 60 s
- HPE Aruba Networking, AOS-CX 10.15 Layer-2 Bridging Guide (read 2026-11-23) (read in a browser): MAC address table, age-time 60 to 3,600 s, default 300; loop protection packets on ports, LAGs, VLANs and VXLANs; for unmanaged switches and authenticated ports; transmit interval 5 s; default action tx-disable
- Linux kernel documentation, Ethernet Bridging (read 2026-11-23): forwarding by destination MAC and VLAN tag; FDB ageing default 300 s, 0 never ages; per-port unicast, multicast and broadcast flood flags
- Cabletron Systems, CSX200 manual, Bridging, Filtering Database, page 4-46, ManualsOnline copy (read 2026-11-23): Aging Time for Dynamic and Learned Addresses in the Source Address Table, 10 to 1,000,000 s; entry types Static, Dynamic, Learned, Self, Permanent
- IETF, RFC 4363, Definitions of Managed Objects for Bridges with Traffic Classes, Multicast Filtering, and Virtual LAN Extensions, January 2006 (read 2026-11-23): dot1qIVLCapable (Independent VLAN Learning), dot1qSVLCapable (Shared VLAN Learning) and dot1qHybridCapable
- IEEE Standards Association, IEEE 802.1Q-2022, Bridges and Bridged Networks, standard page (read 2026-11-23): active standard, Board approval 21 September 2022, published 22 December 2022, superseding 802.1Q-2018, amendments to 802.1Qdy-2025
- IEEE Standards Association, IEEE 802.1D-2004, Media Access Control (MAC) Bridges, standard page (read 2026-11-23): status superseded, superseded by 802.1Q-2014 and superseding 802.1D-1998; Board approval 9 February 2004, published 9 June 2004, reaffirmed 31 March 2011
- Glenn Parsons, 802.1D withdrawal, IEEE 802.1 working group slides, 12 July 2021 (read 2026-11-23): all relevant 802.1D content is in 802.1Q since the 2013 revision PAR; 802.1D-1993 superseded in 1998, 802.1D-1998 in 2004; administrative withdrawal of 802.1D-2004 at the end of 2021; SA database to show it superseded by 802.1Q-2014
- Fortinet, FortiSwitchOS 7.2.1 Administration Guide, Dynamic MAC address learning (read 2026-11-23): learning on or off per port, unknown sources dropped or forwarded when off; learning limit 1 to 128 per interface or VLAN, 0 (the default) meaning none; since 7.0.2 a shutdown action on violation; learned addresses deleted after 300 s by default (10 to 1,000,000, 0 never); a learning-limit violation log
- Fortinet, FortiSwitch 7.4.1 FortiLink Guide, Dynamic MAC address learning (read 2026-11-23): static MAC addresses are not counted in the learning limit; with mac-aging-interval set to 0, inactive addresses are still removed after 24 hours by default (0 to 168 hours)
- Fortinet, FortiSwitchOS 7.0.0 Administration Guide, Layer-2 table (read 2026-11-23): static and dynamic MAC addresses in one layer-2 table; an optional size check, off by default, logs a warning the first time the table is over 75 per cent full and again when it falls under 70 per cent, checking every 2 minutes (5 to 86,400 s)
- Juniper Networks, Layer 2 Forwarding Tables (read 2026-11-23): the unified forwarding table shares memory between MAC, host and LPM entries in five profiles; EX4600 and QFX5100 MAC tables of 288K, 224K, 160K (l2-profile-three, the default) and down to 96K; TCAM space for IPv6 prefixes longer than /64 configurable, up to 4,000 entries from Junos 13.2X51-D15 (default 1,000) and up to 8,000 on QFX5210 from 18.1R1 (default 2,000)
- RFC 7348, Virtual eXtensible Local Area Network (VXLAN), M. Mahalingam and others, August 2014, Independent Submission, Informational (read 2026-11-23): a 24-bit segment identifier; top-of-rack MAC tables must learn the virtual machines' addresses, and if the table overflows the switch may stop learning until idle entries age out, flooding unknown destination frames; data-plane learning with IP multicast carrying unknown destination, broadcast and multicast frames
- Arista Networks, technical information tag mac-hash-collision, read in a browser by the research agent (read 2026-11-23): a hash collision defined; a command, from EOS 4.31.0F (29 November 2023), listing MAC addresses not learned because of hash collisions
- NIST National Vulnerability Database (NVD), CVE-2021-34793, record through the NVD API (read 2026-11-23): the TCP Normalizer of Cisco ASA and FTD software in transparent mode mishandled certain TCP segments, letting a remote attacker poison the MAC address tables of adjacent devices, a denial of service; published 27 October 2021
- NIST National Vulnerability Database (NVD), CVE-2025-20316, record through the NVD API (read 2026-11-23): on Cisco Catalyst 9500X and 9600X switches, traffic from an unlearned MAC address flooded on a switch virtual interface with an egress ACL could bypass that ACL; an attacker can cause it by making the VLAN flush its MAC table, and a full table has the same effect; published 24 September 2025