Clients without Host Name - Edit Host Override Question



  • I have quite a few DHCP clients that have a blank hostname.  My goal is to use Host Override to give them an appropriate name.  Host Override asks for an IP address, not the client mac address.  Since these are current DCHP addresses, how does DNS Forwarder handle host override when the client IP changes?

    I can configure clients with static mapping in DCHP Server, but most don't need a static IP.

    Thanks,

    Jerold


  • Rebel Alliance Global Moderator

    huh?? What are you trying to do with host overrides.. Host overrides are a dns entry for a fqdn to an IP.. There is no dynamic anything about it.. Why would you think that would give a dhcp client a name?

    If you have a client that you want to resolve, register your dhcp leases, then there is no need for overrides.



  • Hi John,

    Oops, guess I screwed this up…

    My goal is to give a hostname for those network devices that do not have one.  In the attached list from darkstat, there are several hosts that show "none" under the hostname.  These are mostly consumer grade hardware like wemo switches, sonos speakers, etc.  I would like to see a hostname for the devices, if possible.

    If the hostname is arbitrary, I would like to override it with a more meaningful one in pfSense, if possible.

    These are my goals.  I have found that DHCP Static Mappings under DHCP Server allows me to name the host for each mac and assign a static IP, but again, I don't necessarily need them to be static.

    Under DHCP Resolver  documentation, I found this, but it seems it would only work with devices that have a hostname already defined.

    Register DHCP leases in the DNS Resolver: DHCP static mappings can be registered in Unbound which enables the resolving of hostnames that have been assigned addresses by the DHCP server in pfSense. This should only be enabled on networks where the client hostnames can be trusted or controlled.

    Again, I really appreciate you taking the time to help me out.

    Thank you,

    Jerold

    ![Screenshot 2016-05-23 19.55.19.png](/public/imported_attachments/1/Screenshot 2016-05-23 19.55.19.png)
    ![Screenshot 2016-05-23 19.55.19.png_thumb](/public/imported_attachments/1/Screenshot 2016-05-23 19.55.19.png_thumb)
    ![Screenshot 2016-05-23 20.02.55.png](/public/imported_attachments/1/Screenshot 2016-05-23 20.02.55.png)
    ![Screenshot 2016-05-23 20.02.55.png_thumb](/public/imported_attachments/1/Screenshot 2016-05-23 20.02.55.png_thumb)



  • I don't think that's possible without static assingments in the DHCP server. I'm not sure how the DHCP server <-> DNSMasq interaction is implement in pfSense but I'm pretty sure MAC addresses are not included in that interaction because the ISC DHCP server does not expose them in its standard dynamic DNS update protocol.


  • Rebel Alliance Global Moderator

    Yes the host overide would allow you to resolve a name to an IP for any device, with any name you want.  But it does not actually change that devices name, its just a name you resolve to the IP you put on it.

    Now if your device was smart enough to register its name, and you could change it on the device then sure dns has the ability for dns clients to register their name.  Unbound does not - but you could always run say bind if that is what you were after.

    Your simple solution would be just to set static/reservation for the device.  For example my nest thermostat, I just have an entry calling it nest in host overrides.  I do have a static entry but I do not register dhcp in unbound.  I just create the entry.. I don't have enough devices that makes doing the manual registration in overrides any sort of issue.  And there has been some issues with unbound restarting when doing dhcp reservations, not sure if that still happens or not but it use to.. And just click click to create an override.

    As to clients being setup with static/dhcp reservation - why not.  I have reservations for pretty much ever single device I have so I know what IP they are going to be..  Only temp devices ever use just IP out of the pool.  Say when playing with a new VM, it gets just dhcp pool address while setting it up, but if going to keep it then I would give it a reservation so it always gets the same.

    Quite often if the device is on, its going to always have the same IP anyway since it will just continue to renew the lease it got.  Only time devices really change is if they have been offline for past the length of their lease and you have enough devices on your network using dhcp that you would cycle through the pool and something else grabbed that IP.  If not device should pretty much always have the same IP out of your pool because it just renews, and renews and renews always getting the same IP.

    BTW where is that screenshot from?  That doesn't look to be a pfsense native screen, is that a package? Where its showing you all your hosts?  Is that traffic they have sent/recv?  Yes once you setup a override or register a static that you set a hostname on then yeah your could resolve the IPs to hostname via a PTR query.

    
    > dig -x 192.168.4.96
    
    ; <<>> DiG 9.10.3-P4 <<>> -x 192.168.4.96
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33025
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;96.4.168.192.in-addr.arpa.     IN      PTR
    
    ;; ANSWER SECTION:
    96.4.168.192.in-addr.arpa. 3600 IN      PTR     nest.local.lan.
    
    ;; Query time: 1 msec
    ;; SERVER: 192.168.9.253#53(192.168.9.253)
    ;; WHEN: Tue May 24 05:04:18 Central Daylight Time 2016
    ;; MSG SIZE  rcvd: 82
    
    


  • Thank you for the suggestions.  The screenshot is from darkstat, a package I was looking over.

    Jerold



  • You can't add a host override directly to a MAC, but just add a static DHCP mapping for that MAC and define the hostname there, and enable registration of static mappings in DNS.