Local DNS not reliable

You can see it in the Terminal:

phili@linuxmint:~$

The hostname is indeed linuxmint

The incorrect entry with the name “linuxmint” is added by the IPFire server during each DHCP connection, even though it doesn’t know it!

Can you clarify something for me.

Does the above mean that you have created a single vm pc that has three separate NIC’s, two connected to your IPFire green network and one connected to the same IPOFire blue network but you are running it as a simple PC and not as a router, even though it is connected to two different subnets.

If the above is the situation of your vm, it is not a real test as you would never have a simple PC connected to two different subnets at the same time.

If the above is not the vm build situation, then please provide a more detailed explanation, perhaps with a diagram for how your PC and IPFire are connected with the three NIC’s.

1 Like

Sorry, but I’m losing patience.

I used two blue and one green to simulate a laptop.

A laptop can easily connect via wired connection to green, then via Wi-Fi connection to green, and then via Wi-Fi connection to blue, alternating between them!

In my test, the connections weren’t made “at the same time.”

This will be exactly the same use case I just tested.

But so what? The android phone will only connect to one of those two IP’s dependent on the Access Point SSID I use. I have a different SSID for access to the Blue subnet as I have for the Green subnet so I choose which subnet I am joining and I can’t access both at the same time.
Everytime I use the Blue subnet SSID on the AP I always join the Blue subnet and the host resolution is always that phone. I never get told that I have connected to the green subnet when I have connected to the Blue subnet.

So I don’t understand what your problem with this is.

Okay, but then what is the problem. Are you joining the green subnet and being given a blue IP or what? That type of connection I have with my laptop via wired or wireless and when I connect via wired it always gets given the wired IP and when I connect via wifi it always gets given the wifi IP, so that seems the correct way. It certainly is what I am expecting to happen.

But you correctly wrote that you had both addresses for the same host.
IPFire keeps both addresses in its local DNS, whether they are connected or not.

But so what, as long as you always get connected with the correct IP, which is tied to the MAC address. I don’t see what the problem is.

This isn’t an IP address problem, but a host problem.

If you want to reach the host (not the IP address) via RDP or VNC or any other network tool, this can be a problem.

(in my case, Logitech Flow software)

But if it only bothers me and you don’t think it’s a problem,

I won’t insist further.

Thank you for this conversion.

I would never do that with a laptop, which has the two interfaces. I would do that with a server or desktop machine which only hass one NIC.

If you have to do it with a laptop then I would suggest having a different hostname for the wifi and the wired connections so that the hostname will be correctly resolved.

To finish on the subject, I don’t see how the fix I proposed poses a problem:

  • If you declare static addresses in hosts, they are loaded into /etc/unbound/hosts.conf
  • If you declare fixed leases in DHCP, they must be loaded into /etc/unbound/dhcp-leases.conf

If you declare both a static address and a fixed lease, they must be loaded into both.

It seems logical to me.

4 lines of code to delete

And this solves the problem of duplicate IP address for a single host

@pscar13
i know the scenario you are describing :bullseye:
indeed this is a challenge on other dhcp/dns solutions too :light_bulb:

and as you wrote:
one has to create an exclusive ‘reservation’
for each of the mac adresses at the dhcp system :check_box_with_check:
so the dns can work correctly.
fortunately, other solutions work correctly. :wink:

you lucky guy seem to have a hardly
challenging environment :blossom:

IPFire may know this name. The DHCP request may send a device name, in your case it is “linuxmint”.
Capture the DHCP network traffic for this client, with tcpdump f.e., and I bet you can see a client-name field with “linuxmint”.

Thank you for this clarification.

This is exactly what I wrote here:

The server defines the hostname if it is present in fixleases; otherwise, it uses the client’s hostname.

And ?

@pscar13
respect for your persistence :cat:

:popcorn:

I am surprised myself. :grinning:

1 Like

maybe it is a language barrier :person_shrugging:

What happens if you add each of the IP address in edit host.
and point both to one host name?

???

It’s written here

I repeated it in 9 posts above.

and here

You are reading ?

To use my desktop PC and my laptop with the same keyboard/mouse, i use the “Logitech Flow” mechanism (KVM by ethernet)
But I had a big problem because of the host name of the laptop (Logitech Flow Loss of connection for 30s every 5s) :

But generally speaking, you understand that this situation is abnormal:
Having two or more IPs for the same host in local DNS

明白!

maybe it should be taken into account that
meanwhile
we have probably two different flaws here

:man_shrugging: