Repository navigation
lsnet 0.13.0
Sort the list
Press s to sort the list by its next column: IP, name, then type, and back to IP. In the services view it's address, service, then host. ▾ marks the column, the row you were on stays selected, and devices that didn't answer stay at the bottom. Rows with no name or type come after the ones that have one.
Ping times
Each device found is pinged three times, and the best round trip is in its details as Ping, and in --json as ping_ms. It's missing for devices that ignore pings, and on Linux when net.ipv4.ping_group_range doesn't let you send them.
When a device's sources disagree
The details already said what decided a device's type and name. Now they also say when something else says otherwise:
Names differlists a device's hostnames and who gave each, likeraspberrypi.local (Bonjour) · study.lan (reverse DNS), when they aren't the same name. Usually the router's DNS still remembers whatever had the address before. Names that differ only in case, punctuation or domain count as the same, and so does a NetBIOS name cut off at 15 characters. Names people give devices, like AirPlay's "Living Room", aren't compared.Disagreeslists any other type a device's own descriptions give it, likeTV / streamer, from UPnP MediaRenderer by Denonfor a speaker whose Bonjour model says it's a speaker. Only what a device says about its own model counts (Bonjour, Kasa, UPnP): open ports and MAC vendors are guesses, and a NAS running Plex is still a NAS.
/differ and /disagrees filter for them, and --json has names_differ and type_disagrees.
--also: find a device left on another network's address
lsnet already flags a device using an address from another network as off-subnet, but only once it hears it speak, and one sitting idle with a static address may not. --also asks for it:
sudo lsnet --also 192.168.0.0/24 # the network it probably came from
sudo lsnet --also 192.168.0.0/24 --also 10.0.0.50/32 # more than one, or a single addressEvery address in the range is asked for over ARP on this segment, along with the scan's own, and whatever holds one must answer, whatever network the question came from. Anything found is listed as off-subnet. The requests are ARP probes (RFC 5227), which name no sender address, so nothing on the other network is left with your machine in its ARP cache.
- A range takes at most a /16, and addresses already on your network are left to the scan.
- It needs raw access (
sudo, orsetcapon Linux), and stops without it rather than quietly scanning less. - It isn't available on Windows, which only sends ARP for addresses on its own network.
Upgrading from 0.12.0
snow sorts, and the list's headings show▾on the sorted column. The list starts in address order, as before.- A scan now pings each device it finds three times. It takes no longer: the pings go out alongside the other follow-up questions.
--jsongainsping_ms,names_differandtype_disagrees; the last two only appear when there's something to say. Nothing was removed or renamed, and printed tables haven't changed.
Download
- macOS (Apple silicon):
brew install sanford/tap/lsnet, or downloadlsnet-macos-arm64.tar.gzbelow (signed and notarized) - Windows:
scoop install sanford/lsnet, or downloadlsnet-windows-x64.zipbelow - Anywhere with Rust:
cargo install lsnet
Full changes: v0.12.0...v0.13.0