Network Binding ./. Name Resolution

I’m using in my installation an DHCP server. The DHCP can be configured the he assign always the same IP for configured devices… For some devices (Printer, NAS etc…) i have that, but for clients like Laptop, Mobile Phones not.

Is it possible that the network binding uses the name of the discovered device instead of the IP ?

Thanks in Advance

Lars

No…
Why don’t you assign fixed IPs to your other devices in your router too
You can also configure the devices themselves to request a fixed IP. I do both.

so i have single point where to configure ip-adresses, all devices will have DHCP and receive IP’s as needed in network

Correct

back to question, it’s not possible that network binding may show hostname ?

Back to answer:
No…

Not strictly true. The network binding is indeed capable of using hostnames but you will need to operate your own DNS server on your home network.

1 Like

What about editing the hosts file? Would that work?

Editing the hosts file on your openHAB server would work if you were assigning IP addresses to devices either statically on the device or via a MAC address reservation on your DHCP server.

To enable the use of full DHCP would require a DNS server with a DNS zone configured for your home network and DDNS setup to automatically update the DNS zone from the DHCP server. I’d argue that this kind of setup is probably not the most simple to setup but does provide the most flexibility, particularly in an environment which may have a lot of “transient” devices.

2 Likes

Hi Mark,

thank yopu very much for responding. i think we should look a little deeper in your answer. i do not understand all of answer.

i´m using pfsense as firewall solution

“to enable the use of full DHCP would require a DNS server with a DNS zone configured for your home network and DDNS setup to automatically update the DNS zone from the DHCP server”

i don’t understand, questions are:

what means: full DHCP ?
how to achive this ? DNS server with a DNS zone configured for your home network, i may have a look to my firewall

why i need a DDNS setup ?

Thanks in advance

Lars

BTW: i only would like the name resolution for my internal network

Ok… So, what I meant by “the use of full DHCP” was the use of dynamically allocated IP addresses where any client could, in theory, be allocated a different IP address each time it connects to the network depending on the “lease time” configured.

DDNS, or Dynamic DNS, is a mechanism that allows a client, or indeed a DHCP server, to automatically update a DNS entry for a host when the IP address for the client changes. This allows you to always refer to a client by name rather than having to know the IP address.

If you are using pfSense as a firewall solution, is this also providing your DHCP server? If so then you can also use pfSense as your DNS server and achieve exactly what I believe you are looking for.

Have a look at the following docs for pfSense which explains how to configure the Unbound DNS resolver.

https://www.netgate.com/docs/pfsense/dns/unbound-dns-resolver.html

The one thing to always remember is that your clients will need to be configured to refer to a DNS server that can resolve the internal hosts. By its nature, this DNS server will NOT be able to directly resolve external hosts such as www.google.com, and will need to be configured to correctly forward DNS requests to either the DNS root servers or to upstream servers provided by your ISP.

i think my pfsense is configured as descriped, openhab bindings have the name of host instead of ip-address, so my dns work as needed ?

example binding configuration:

Switch pump_zisterne “Pumpe Zisterne” (gWater_persist_changed) { http="<[http://pump-zisterne.seume70/api/relay/0?apikey=5C0D3EAB59EEB0D6:1000:MAP(onoff.map)] >[ON:GET:http://pump-zisterne/api/relay/0?apikey=5C0D3EAB59EEB0D6&value=1] >[OFF:GET:http://pump-zisterne/api/relay/0?apikey=5C0D3EAB59EEB0D6&value=0]"}
S

but network binding does not resolve the name…

what do you think is wrong ?