Ethernet Switching Tables¶
The ethernet_switching collector ingests learned MACs from a switch's
forwarding table.
NAPALM call¶
driver.get_mac_address_table().
What it produces¶
For each MAC table entry:
Action: confirmed if a MACAddress already exists, else new.
object_repr is
MACAddress <mac> on <interface markdown link>.
Apply behavior¶
- Get-or-create the
MACAddress(tagged auto-discovered if new). - Add the local interface to
MACAddress.interfaces. - Set
discovery_method = ethernet_switchingand refreshlast_seen.
Skip conditions¶
- MAC or interface name is empty.
- The interface name does not match
valid_interfaces_re. - The interface does not exist in NetBox (logged warning, skipped).
- Duplicate
MACAddressrows exist for the address (logged warning, manual cleanup expected).