Device Listing of all assigned LAN IP addresses
-
Besides just those devices connected via DHCP, I have a number of devices assigning themselves static IP addresses (below the DHCP range and rather than assigning them from within pfSense).
Accordingly, is there a way to obtain a list of all devices connected to my LAN- not just DHCP assigned devices?
Thanks
-
You could try nmap -sn for your subnet.
For example, nmap -sn 172.16.0.1-254You will have to install nmap, if you haven't already done so.
-
@jknott Thanks- I'll look into that! Is nmap an add-on?
-
Yes. Go to System > Package Manager.
-
Via Nmap package you can only scan one IP at a time.... according to the error messages given.
-
Not here. I tried that yesterday, before I posted, and it scanned the entire range I specified. I have nmap 1.4.4_5 installed.
-
I would suggest adding static dhcp mappings for all statically assigned devices if you can. That way those devices will still get the same IP should they ever default to dhcp and the firewall will have a reference to those IPs/hosts.
The ARP table will show any hosts that have been active recently. And, yes, nmap can scan the full subnet as long as those hosts respond at all.
Steve
-
@stephenw10 What are the syntax used in the GUI??
-
It's in the help text in 23.01:
Can pass space separated hostnames, IP addresses, ranges, networks, etc. Ex: scanme.nmap.org; microsoft.com/24 192.168.0.1 10.10.1.1; 10.0.0-255.1-254
So like
172.28.16.0/24
or172.28.16.1-254
-
I agree with @stephenw10 add the proper static mappings in the DHCP server configuration. Took me a while to understand "this is the correct way" but after that, it becomes obvious. Just be aware of "if you have a pool for DHCP defined, make sure your static mappings are outside of the pool".
-
This post is deleted! -
@mer Right...got it... I assume you use the device's macID to map it to a desired IP address on your LAN? I'm just so used to directing a static IP address from within the device- should that instruction be removed when mapping from within pFsense or can/should you do both (direct the device to utilize that IP address and map it from within pFsense at the same time)? Thanks
-
You can do either.
If you still use static IPs on the devices directly it still helps to add them to the DHCP static leases in pfSense. It allows other devices to resolve them. It allows you to see what the IPs are and prevents you adding conflicting static leases. -
@stgeorge Correct. I leave my clients on DHCP and take care of "static" addresses in the DHCP server.
@stephenw10 also has good advice; the biggest problem mixing DHCP and static is the same IP address being claimed by different clients. That's what his advice is preventing.
One DHCP server on a network segment, create any static mappings on that server, leave all the clients set to DHCP. Makes it easy to move things around.
I'm not saying "my way is the only right way" but "this is how I do it and why I do it this way"
-
@stgeorge A few "pros" of using DHCP:
- Windows 10 occasionally reverts to DHCP after a feature update. v1607 (?) did it 100% of the time. I have seen it very rarely since, I suspect when a driver gets updated and it detects as a new NIC for some reason.
- You can change settings like DNS servers, IPs, IP subnet, etc. without connecting to each device.
- On Windows DHCP the reservation is inside the DHCP range so you can connect a printer, find it, and reserve that IP going forward. (on pfSense it is the opposite...reservation outside the range)
That's a bit of rehashing but I got going.
DHCP does provide one point of failure, but then again so is one router. Note pfSense can do DHCP in HA as can Windows Server.
-
Yeah
These days, most devices get an IPv4 'because there is one' but if you look closely, they all use the other one : IPv6.
Even when I'm posting here, on this forum, it's a solid IPv6 - no IPv4 in sight.So, I stuffed the dhcp6d full with 'static' global "DUID" based IPv6 assignments.
Not that I'm trying to know these addresses, but that every device has a host name that I chose and remember.