Friendly names on UI for DHCP Clients?
-
@stephenw10 I thought if you just left the IP black when you setup a reservation it just pulled from the pool for the IP? Hasn't there been multiple threads about this? This is what the note says on the IP when creating a reservation
I just never understood this thinking.. If I am going to go through the trouble of setting hostname based on mac - just put in an IP as well.. What is that .2 seconds more of work?
You could even set it up before hand and just load it into your xml file, thought I saw some work someone did that would convert spreadsheet into the xml you need.
Not sure if this is the one I was thinking of, but this should be able to convert a list of your stuff you want into xml to load in
https://github.com/GeekVisit/uprootSeems like they don't understand the point of dhcp to be honest.. There is more than an IP you can do with dhcp.. So vs settings static on the device it is much better to set a reservation.. You can change this whole network to some other IP scheme without having to touch a device, you can change dns as well. What gateway it points to, etc.
I don't think I have anything on my network currently that doesn't have a reservation with IP in it.. When I add something new, I just let it grab something from the pool, then go in and create a reservation for it - next time it up updates its lease it gets the new IP, or if I want it to take effect right away I just reboot the device or manually renew its lease, etc.
-
I mean I imagine the goal is to be able to access dhcp clients by hostname when they don't supply one to the server. In which case, yes, just adding an entry without an IP should do it.
-
@johnpoz Honestly, and I don't mean any disrespect when I say this, whether you understand it or not is irrelevant. Virtually every other router I have ever used has this functionality, based on the users in this post and in others I've found in searches online it is something that people have also done with other DHCP platforms and want to do with pfSense, and it's hard to believe pfSense can't do it.
I did do as you've pictured and it seems to be working, sort-of.. Sometimes there will be a duplicate listing for the client in the DHCP lease table, while other times it will have a single listing with the host name I have mapped along with an IP from the DHCP pool but is missing the description I provided in the mapping.
From what I can tell the ARP table seems to be involved. I don't know if there is some specific order, but disconnecting the device from the network, clearing the ARP table, and then clearing all dhcp leases seems to do something, though the behavior is inconsistent and not what is expected based on the way the aforementioned routers worked.
I also added nmap, which does provide additional info in some cases, but still not what I'm looking to achieve.
Again, all I want to do is indicate "this MAC address is my kid's tablet" I wanna have some sort of visual indicator that says "susie's tablet" and be able to associate that device to "susie" in an alias or something so that I can set rules and limitations against it, along with any of susie's other devices, and I don't want to assign it a static IP, because I shouldn't have to.
-
@stephenw10 YES! This is exactly right. And now that I think about it, this is working and I'm able to access them in an alias in this way. I guess it's just weird to see the DHCP Lease table behavior with duplicate listings for the same host, or sometimes using the mapping but without the description I provided. Do you have any insight into why that may be happening?
-
@etuckeriv said in Friendly names on UI for DHCP Clients?:
and be able to associate that device to "susie" in an alias or something so that I can set rules and limitations against it,
Yeah you can that as long as the firewall can resolve the host. So you need to have dhcp leases added to the DNS service.
-
@stephenw10 said in Friendly names on UI for DHCP Clients?:
So you need to have dhcp leases added to the DNS service.
Ahh, ok, that makes sense. I saw an option for that when I first set up the appliance, but it was for ISC DHCP. Since I got a warning that it is depricated I switched it to Kea DHCP, and I no longer see an option to register DHCP Leases with the DNS service. Does Kea already do this? Or am I missing a setting somewhere?
-
Not yet in Kea. Coming real soon now.
-
@stephenw10 Well that seems to explain it, haha! Thanks for the support!
-
@stephenw10 said in Friendly names on UI for DHCP Clients?:
So effectively add an alias for a MAC address? Hmm
Also, if you could make this happen, that would be cool too
As in, when creating an alias, have the ability to assign hosts to the alias using the MAC address as well as hostname or IP
-
Well it could be an alias in layer 2 rules perhaps... all the normal firewall and NAT rules would need to resolve a hostname or MAC to an IP dynamically.