Switches
Issues with switch discovery, SSH access, and the topology map.
Switch does not appear on the topology map
The switch is auto-discovered from agents' LLDP data. The mac-nic-exporter container
sniffs LLDP packets passively over a raw socket (no lldpd running inside) and exposes
each neighbor on its /metrics endpoint. Confirm at least one agent's NIC has seen a
neighbor entry pointing at the switch:
# On an agent — check the metrics endpoint (host network, port 29500):
# LLDP neighbors are carried in the labels of the nic_info metric
# (system_name, mgmt_address, port_description, …).
~$ curl -s http://localhost:29500/metrics | grep 'nic_info'
# Or look at the discovery logs:
~$ docker logs mac-nic-exporter 2>&1 | grep -i lldp
If nothing shows up, make sure (a) the link is up, (b) lldpd (or equivalent) is enabled
on the switch port, and (c) the agent container has CAP_NET_RAW so it can open the
sniffer socket.
"Authentication failed" when opening the Web Terminal
The SSH credentials in SWITCH_PASSWD_LIST are all wrong for that switch.
~$ mac env set SWITCH_PASSWD_LIST=admin,123455,YourThirdPassword
~$ mac restart master
The master tries each password in order on the first connect to a switch and caches the one that worked. Old cached entries are flushed when the master restarts.
Breakout-mode change does not show new sub-ports
After config interface breakout, MAC asks the switch (over SSH) to restart its on-box
snmp container so the new sub-ports appear in the IF-MIB. If they still don't appear
after ~30 seconds, force a refresh of the master-side switch-exporter cache:
# On the master:
~$ docker restart mac-switch-exporter
If the new sub-ports still don't show, log into the switch directly and verify the SNMP
daemon there is up — sudo docker ps | grep snmp.
BGP peer "stuck in Active"
This is almost always a layer-3 reachability or AS-number mismatch on the switch — not
something MAC can diagnose. Use the Web Terminal (Terminal tab on the switch panel) to
run vendor-native commands like show bgp summary and show ip route <peer-ip>.
Topology shows a "n servers not in topology" banner
The named servers are registered as agents but their NICs do not have LLDP neighbors that match a managed switch. Common causes:
- Switch is not yet managed — confirm SSH credentials are valid for it.
- Link is down — fix the cabling / SFP, then run
docker restart mac-switch-exporteron the master to force re-discovery. - LLDP TX is disabled on the switch port — run
lldpctlfrom the agent orshow lldp neighborsfrom the switch to verify.