Networks and hosts behind a router

Every range Netlens can scan is a network (Settings → Networks): a VLAN, a routed network, a network behind a VPN. Tick the ones to scan, add others, and give each one a name; the page shows its state, the devices in it, how many hosts the last scan found against the usual number, and how many devices have no MAC address. A scan covers all ranges in one run, so a range that becomes unreachable (a firewall rule, a VPN that went down, a routing change) does not fail the scan, its devices just go offline one by one. Netlens therefore counts the hosts that answer in each range: when a range that had hosts has none, or less than a quarter of the usual number (from eight hosts up), for two scans in a row it raises Network went quiet (a dashboard problem; choose network_quiet and network_back under Settings → Alert channels), and Network answers again when at least 60 percent are back. Ranges of one or two addresses are not networks (a host that stops answering is a device that went offline). The Devices page can be filtered by network and the assistant (and MCP, get_networks) answers questions about them.

Hosts on a routed network have no MAC address in a scan (ARP only works on the scanner’s own segment), so Netlens would identify them by address alone. A health monitor over SNMP on the router or layer-3 switch fixes that: it reads the device’s ARP table (the classic ipNetToMedia and the newer ipNetToPhysical table, every five minutes, automatically for devices typed router or switch; the monitor’s MAC addresses from its ARP table can force it Always or Never). A scan then gives a MAC-less host the MAC that the router reports for its address, and a device that was stored by address keeps its history. The scan’s own MAC is never replaced, an entry older than an hour is not used, and a MAC that answers for more than eight addresses (a proxy-ARP router, NAT) is ignored, so it can never merge hosts into one device. Netlens scans directly first: the router’s table only fills the gap. The client list of a router, controller or DHCP plugin (the leases and connected clients of Kea, Pi-hole, OPNsense, MikroTik, UniFi, Omada and the other topology plugins) fills the same gap, and Settings → Networks also lists the clients such a source reports that no scan found, in case a device hides from probes. They are only listed, never added.

Why does a network not answer? The Test button on a network (Settings → Networks, the assistant’s test_network) looks at the route to it, whether its gateway answers, and whether the devices that used to be there answer ping and TCP probes, then says which of the usual causes fits: no route, a gateway or tunnel that is down, a firewall that blocks the probes, a VLAN that is not carried to this host, or devices that are off. It only asks, it changes nothing.