How to Scan Local Network for Reserved IP
While routers are becoming ‘smarter’ day by day, some of the rather basic features are pushed back to the “Professional” department. One such feature is LAN management, specifically, static IP reservation. Single-source-of-truth dictates one authority for IP assignment — routers could be that authority. However, practically speaking, none of the consumer-level routers I’ve encountered have managed to ship a proper static IP management. Hence per-device static IP.
The problem arises when the user wishes to add a new device and assign a new IP. If you were running IPv6, this would be less an issue. But for IPv4 LAN, there comes a point when one must check if the IP address is taken or not. Out of the box, without any additional tools installed, this was the fastest I could get the table of reserved IPs.
For Unix-like, replace X with your subnet (last X is the broadcast address):
ping -c 3 -b 192.168.X.X 2>/dev/null; arp -a
For Windows on PowerShell, replace X with your subnet (broadcast address already accounted for):
1..254 | ForEach-Object -Parallel {
$ip = "192.168.X.$_"
if (Test-Connection -Count 1 -Quiet -TimeoutSeconds 1 $ip) { $ip }
} -ThrottleLimit 50
There are a few things to note here. The command won’t discover devices that are in stealth mode, not returning the ping traffic. Highly unlikely on LAN, but it is a possibility. And it won’t discover devices that come online only periodically, so it must be online at the time of running. If you are okay with installing a tool for this occasion, nmap should work on both Unix-like and Windows.
And a big tangent, the reason why I hastily prepared this post; Synology has not updated its Docker Engine since June 2024. I believe it is safe to say one must consider removing the Docker containers off of an aging engine. In theory, it is entirely possible to keep it running without updating anything on Docker — until you hit the roadblock that is only solvable via pulling an update. But I’ve personally hit that roadblock a long time ago, and I am only an enthusiast. I’ll do a more thorough write-up, possibly for tomorrow’s or next week’s post.

Comments will be automatically closed after 30 days.