Error with domain

I gave the answer here:

Hostnames must be entered in the remark field.

The domainname is defined using the setup command on the console:

Additional advice: Do not duplicate addresses already defined in DHCP in the hosts.cgi page.

I’ve already covered all this in this thread.

1 Like

Another source for hostnames is the DHCP traffic from local client to IPFire’s DHCP server. The client can provide his hostname as defined in the client system.

Once more:
the namespace for local devices is built by unbound-dhcp-leases-bridge.
The program uses as source

  • the dynamic leases list of dhcpd
  • the fixed leases defined by the DHCP WUI page
  • the hosts file ( defined and built by the Hosts WUI page )
  • events signaled by dhcpd when a DHCP lease is given to a client

All these sources give an unambiguous relation (name–>IP), if no two same names are used in the network.
The reverse mapping (IP → name) may be ambiguous. But the task of a DNS resolver is ‘only’ to implement the function {names} —> {IPs}, therefore this doesn’t matter.

To get a bijective function it is necessary, that all sources are unambiguous. No IP must be associated with different names.

The hosts file can have multiple IP’s for a single host and vice-versa.

Explain, please!

You can have example.com resolving to 192.198.0.1, 192.168.0.2, 192.168.0.3 It is like looking up google.com where multiple addresses are returned like:

root@mail-www:~# dig -t A google.com

; <<>> DiG 9.18.33-1~deb12u2-Debian <<>> -t A google.com
<snip>
;; ANSWER SECTION:
google.com.             300     IN      A       142.250.129.102
google.com.             300     IN      A       142.250.129.101
google.com.             300     IN      A       142.250.129.113
google.com.             300     IN      A       142.250.129.139
google.com.             300     IN      A       142.250.129.100
google.com.             300     IN      A       142.250.129.138

At the same time you can have example.com, www.example.com, smtp.example.com, mail.example.com etc all resolving to a single IP.

See this.

You will end up with dead links as your device changes ip
they are most likely behind a load balancer of some kind.

Multiple names to one ip is not a problem

1 Like

Sorry, but if you read your link, you will see it works if the IP’s are active. It will fail in the IPF situation when if the hosts file is used to point to fully dynamic DHCP devices which change their IPs, if they come and go from the network. It does not make sense to use the hosts file for dynamic IPs.

I don’t know (can’t remember) exactly how the bridge works, but if it reads stale leases, then we could be in trouble.

If you are trying to reach multiple server with one name
Than you should look into HA proxy add-on.

1 Like

Hi Everyone
On the initial setup I set as follows
Machine Hostname = ipfire
Domain name = local

.
The homeassistant server is called “homeassistant”
When accessing this I use the address http://homeassistant.local:8123
.
What and where do I add the machine/server details
All the above conversation has me confused. (I am easily confused, sorry)
..
I have set the DHCP fixed to the server IP address and MAC addresses plus inserted the name homeassistant in the remark column
Is this correct??
berni

Yes it is.

Is your homeassistant server network interface is set :
IPV4 : Automatic
DNS server : your ipfire IP address

If you type the following command on the console:

nslookup homeassistant ipfire

Do you have a single IP address ?

Also type the command:

unbound-control list_local_data | grep homeassistant

to also check if this address is unique in the IPFire DNS cache.

1 Like

HAProxy is another solution, but all I was doing was responding to:

where I was saying the hosts file does not necessarily give an unambiguous name-> IP relationship, and I gave valid examples. HAProxy would not be a valid example for Google.

Yes this is correct
set to DHCP and manually set the dns server address to the ipfire

Hi phil
Yes this is correct
set to DHCP and manually set the dns server address to the ipfire

both commands show the correct IP address and homeassistant /homeassistant.local

After rereading this thread, I have a new question.

How do your homeassistant device name resolution? Do they only use IPFire, ever?
An issue occuring after 3-4 days of runtime can have two reasons

  • the end device changes the behaviour for name resolution (DNS)
  • IPFire’s DNS server looses / invalidates name information; invalidation could occur through odd communications of devices in the local network.

How is the configuration of your IPFire and your devices exactly?
Which information is defined on the DHCP page?
How is the DNS server configured in the homeassistant devices?

Do you have the problem with other devices in the local network also?

For analysis of the DHCP/DNS data traffic it is necessary to sample with tcpdump for a longer time period. Sorry :frowning:

Your example with google.com is a valid name space state. The purpose is load balancing.
But to be allowed (working!) it is mandatory that all devices, identified by their IP, are accessible.
The DNS resolver chooses an IP, based on access time for example, for the normal request answer.

@berniparrett 's setup doesn’t contain such a configuration, I think.

to answer both your comments
I only have IPFire resolving dns or network issues, there is nothing else as I have replaced the ISP provided TP-Link router/firewall as its not secure
I dont have anything such as suggested by Nick Howitt
The homeassistant server only gets information from IPFire for in the local network and a local switch (which is a dumb switch no networking control) several connected items also use the local wifi network which is running on a mesh network as an access point only no ip controlling, several other devices use a Zigbee network, these all work ok
The other problems on dns are related to the NAS and web server sometimes lose the connection with IPFire this I only know about if one of my customer tells me the web site (running on a webserver inside the network) is not showing and they can not access the pages.
I then reboot IPFire and it all works fine again
My mail server is hosted outside, I am considering hosting my website outside also due to the instability.
I asked a friend to look at my network but he said he sees nothing unusual, however this was done from outside after I gave him access, notmuch help…
Berni…

Your homeassistant is not using IPFire’s DNS


This is mine

1 Like