DHCP not registering hostnames in DNS
-
@jjiburg said in DHCP not registering hostnames in DNS:
Having the ability to access the devices by name via MAC to Hostname mapping without having to worry about static IP allocation
I still don't get this - put in an IP.. Your already put in the name and mac - so put in an IP.. just put them in order when you load the xml
hostA aa:bb:cc 192.168.1.10
hostb dd:ee:ff 192.168.1.11
etc. etc..You stated your self you don't care what the IP is, so don't care just put fill it out in sequence...
-
@johnpoz Who said anything about creating and loading XML?
-
The first part of this thread! How else you going to load in the hostnames you want to put in.
You can for sure put in rules based upon name, but they need to be able to resolve.. So they have to register their names, etc. etc.. So you need to know what the name is, ie a reservation..
edit: lay out exactly the scenario you want... So there are 100's or 1000's of devices your testing.. And you want to access them by name.. So have them register their names.. If you don't like their names they register and you want to give them names like hostA, hostB, hostC, etc. etc.. To do that you need to have a way to know which device to give hostA.. so you know that by mac? So then just give it an IP as well..
I am really having a problem understanding the use case here.. You can load in 1000's of reservations in a like 10 seconds with xml load.. If you explain exactly what you want we can discuss ways to accomplish that... To be honest, maybe the best way to accomplish that is run your dhcp and dns on something other than your edge firewall/router.. When you need to do fancy shit with dhcp and dns - it moves away from just something you run on this device because you have it there.. Pfsense can not be all things to all people that does everything in every possible use case.. That is not what its meant to be ;) Nothing can be that to be honest..
That is why there are multiple dns options, multiple dhcpd options, etc.. Running dns and dhcp on pfsense is really just hey if you have these basic requirements (which really are not all that basic - the implementations are very robust).. You can do that sure.. But when you need something else you might need to run a different system to do that.
-
@hova said in DHCP not registering hostnames in DNS:
could not believe it's not supported. Maybe this helps somebody else one day, as it helped me.
Could not agree with you more. I am baffled by the hostility of the expert responses above. It's exactly the kind of attitude that makes otherwise great FOSS products fail in the long run, because someone else will create an equivalent product and be delighted that people want to use it and respond positively to requests for help and features!
-
Prob poor form resurrecting a zombie thread, but I wanted to say thanks, this thread helped me - I have the exact same desire, address machines by name without having to care about the IP Address.
I too read the docs as IP being optional while still being able to get mac to hostname mapping.
The thing that was having me scratch my head was it "looked" like it was working in some cases and not in others. I now understand what was occurring, and how to fix it thanks to this thread.
@johnpoz me not caring about what IP a device is allocated, is not the same as me wanting to take on the manual management of allocating IPs, managing for clashes, performing updates as my networks evolve. I take your point about probably not using your edge router for your DNS/DHCP server, I for one didn't think about that aspect too much when I switched to pfsense - thank you for reminding me to think about separation of concerns / single responsibility principle(s).
-
Just adding an example of why I want this feature; most certainly it adds complexity to the code base. Is it necessary complexity? I dunno. I don't see the big picture :-)
I have a new energy monitor for my house and I want to use a REST interface it exposes to graph energy usage over time.
- To do this, I intend to have telegraf sample this REST interface and put data into an Influx database.
- To do this, I need to know the hostname or IP address of the energy monitor.
- Unfortunately the energy monitor does not set a client host name and so just gets an IP.
- So, I am forced to allocate it an IP address and ensure it doesn't overlap with something else in my home.
It's no big deal, it's just one more thing to do and can cause mistakes. I'll give two examples
-
If I had two energy monitors (or say security cameras) giving them unique names without caring about their IP addresses is a nice to have. No need to manage the IP address. Extra work I don't need to do. Not a lot.
-
I made a mistake when adding multiple security cameras and gave them the same IP. I eventually worked it out, it was just something I didn't need to do.
Thanks for listening,
Scott
-
Jeeezzz I've read through this entire painful thread and applaud the patience and humility of nova, explaining again and again something so basic - any other decent firewall already does. Like nova, I could not believe PFSense doesn't support this either!
It gets even more ridiculous as you start crossing VLANs - PFSense loses an originally defined static IP/hostname as soon as host shows up on another VLAN and gets a new IP assigned via DHCP... So now you have to register yet another Static IP+MAC+Hostname for the same host on another VLAN! And I've got 3 of those...
How did you guys end up with such a perfect logically substantiated mess? This is not the only thread where users point out obvious flaws in product usability for years. A lot of things are done "logically backwards", and yet all same smart people are reaffirming a perfectly logical case making everyone jump through the extra hoops for the sake of "being correct".
-
@pooperman said in DHCP not registering hostnames in DNS:
ridiculous as you start crossing VLANs - PFSense loses an originally defined static IP/hostname as soon as host shows up on another VLAN and gets a new IP assigned via DHCP..
Another VLAN is another LAN ..... for me. That's another network (range).
Thus another IP picked out of another network (pool).
Should the setup of a static lease include a possible IP for every local (V)LAN ? (a GUI modification)@pooperman said in DHCP not registering hostnames in DNS:
How did .......... sake of "being correct".
Yep, design choices are made.Its a free world.
pfSense picked the DHP server from ISC. They didn't write their own one.@pooperman said in DHCP not registering hostnames in DNS:
egister yet another Static IP+MAC+Hostname for the same host on another VLAN! And I've got 3 of those...
For me, I use these "Static IP+MAC+Hostname" when users from local network need to connect to some server type device. Other devices can keep dynamic i.e. I don't care what their host name or IP is.
Server type devices do not move across local networks. Their L3 location is very .... static.@pooperman said in DHCP not registering hostnames in DNS:
any other decent firewall already does
Love to see it - as seeing helps understanding. Names ?
Btw : I'm just another pfSEnse user.
-
So as nova said, I need to do something very basic - map MAC to a Hostname. Regardless DHCP or not. PFSense tells me - go register an IP and manage it on your own then, because RFC... Fine - DHCP is pointless from that point on. And now, all registered hosts show up on another VLANs get new DHCP addresses and lose their hostnames! Of course it is a new address space - really, PFSense is not going to pick up the name I've just provided? Networks theses days are filled with mobile users/workstations. Are you expecting admins to chase them all over the infrastructure or resort to pen and paper to get visibility into who is logged in where?
And yes, any other decent firewall does it - make your pick. Unifi allows to map globally recognized name to a MAC. My basic home router does it. OpenSense guys looked at it in 2019 - they thought this is a bug. Who in the right mind would think this is a feature? lol
https://forum.opnsense.org/index.php?topic=12369.0
-
We've just passed the 2 years mark since this was first reported here. If they don't even admit this being an issue we can't expect it to be addressed any time soon. Besides, they now have other priorities, like sorting out the Wireguard mess... To quote the mod himself: "There are a bajillion better things the dev's could be doing..."
-
Yeah, I think I am starting to understand where the “bajillion” may be coming from. It is in the root of product “philosophy”, which is a reflection of the mentality of its creators. So most of it is really self-inflicted…
Only PFSense defines “inbound and outbound” traffic from the “perspective of a given interface”, not a user or a person managing it. Only PFSense requires splitting a schedule into two parts before and after midnight when defining overnight schedules. Only PFSense requires numerous extra firewall rules in order to reduce log noise nobody cares about. The funny part – it is all perfectly logical. Yet entire user community keep struggling with these for years – nobody else gets it, because all of that is “logically backwards”.
That is what happens when you place a person thinking from a perspective of an interface, not the user, in charge of the product design…
-
It's now 2022 and I am thankful for this thread explaining why something I (like many others above) thought should work still does not work!
-
Normally I set a static IP address if I need the device to have a static IP address to facilitate access by other devices (servers, printers etc). For client devices I allocate via a pool (camera, client computer, IOT etc). At times pool devices names are not informative, in which case centrally adding a meaningful name to pool devices would be a feature I would use.
The DHCP server description along side the IP address appears to support this.
Imo there is at least an inconsistency between the text describing entry of an IP address and pfsense behavior. I also assumed DHCP would work if the optional IP was not entered.
So looking at pfsense labeling from pfsense's perspective. What is the use case for not entering the optional IP address. What actually still works in the DHCP server?
-
@johnpoz Whether you think "people should just specify an IP" is irrelevant; if it's not technically possible, say that, but stop trying to invalidate others' requirements. Hostname-only mappings are absolutely a valid use case.
The static mapping page literally says the "If no IPv4 address is given, one will be dynamically allocated from the pool" without the caveat "but if you don't specify the IP, the hostname will not be registered."
-
Not sure if I should add to this thread or start a new one. Just made the change from Untangle to pfs (out of the box setup) I have a tp-link router setup as wireless access point plugged into switch connected to lan. I see that when some of the dhcp leases are assigned the hostname is registered as the IP address (typically Apple phones and devices) and some are the names given to device (Android phone name). Not sure if I need to change a setting or configure something to display the name of devices. Hope this is makes sense to you experts :)
-
@digiguy said in DHCP not registering hostnames in DNS:
Not sure if I should add to this thread or start a new one. Just made the change from Untangle to pfs (out of the box setup) I have a tp-link router setup as wireless access point plugged into switch connected to lan. I see that when some of the dhcp leases are assigned the hostname is registered as the IP address (typically Apple phones and devices) and some are the names given to device (Android phone name). Not sure if I need to change a setting or configure something to display the name of devices. Hope this is makes sense to you experts :)
Apple devices no longer reveal their clientname in their DHCP requests pr. default (because of privacy). If you want them to start doing that on your specific home network, you have to press the little Information icon next to your selected WiFi network. On that page that shows the IP address the phone/ipad recieved, you can disable privacy for that network (thus revealing the name in the DHCP request). Please note this will change the MAC address of the phone on your WiFi to it's actual hardware MAC address
-
@keyser said in DHCP not registering hostnames in DNS:
(because of privacy).
Yeah clearly we sure wouldn't want anyone knowing the super secret name of "john's iphone" hehehe
That has got to be really unique - prob not another one of those anywhere in all of chicagoland ;) heheheh
-
Well that makes sense.. greatly appreciate your response!
-
K karsten-heck referenced this topic on
-
P patient0 referenced this topic on