Edit: Bug abandoned
The problem isn’t limited to Windows.
It’s the same with Linux!
I installed a Linux Mint VM on a test PC with three network cards: two green and one blue.
I created three fixed leases in DHCP for each card, each with a different name.
/var/ipfire/dhcp/fixleases
00:0c:29:86:74:c9,192.168.20.11,on,,,,mintPC
00:0c:29:86:74:d3,192.168.20.20,on,,,,mintPC2
00:0c:29:86:74:dd,192.168.10.10,on,,,,mintPCBlue
I created the same addresses in hosts
/var/ipfire/main/hosts
on,192.168.20.11,mintPC,localdomain,on
on,192.168.20.20,mintPC2,localdomain,on
on,192.168.10.10,mintPCBlue,localdomain,on
I connected the three network cards alternately, disconnecting the previous one each time.
And here’s what I get in my Linux Mint terminal:
phili@linuxmint:~$ ssh -p 222 root@192.168.20.1
root@192.168.20.1's password:
Last login: Mon Apr 28 20:51:04 2025 from 192.168.20.20
[root@ipfireTest ~]# unbound-control list_local_data | grep linuxmint
10.10.168.192.in-addr.arpa. 60 IN PTR linuxmint.localdomain.
11.20.168.192.in-addr.arpa. 60 IN PTR linuxmint.localdomain.
20.20.168.192.in-addr.arpa. 60 IN PTR linuxmint.localdomain.
linuxmint.localdomain. 60 IN A 192.168.10.10
linuxmint.localdomain. 60 IN A 192.168.20.20
linuxmint.localdomain. 60 IN A 192.168.20.11
[root@ipfireTest ~]# nslookup linuxmint 192.168.20.1
Server: 192.168.20.1
Address: 192.168.20.1#53
Name: linuxmint.localdomain
Address: 192.168.10.10
Name: linuxmint.localdomain
Address: 192.168.20.20
Name: linuxmint.localdomain
Address: 192.168.20.11
[root@ipfireTest ~]# unbound-control list_local_data | grep 10.10
110.100.in-addr.arpa. 10800 IN NS localhost.
110.100.in-addr.arpa. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800
10.10.168.192.in-addr.arpa. 60 IN PTR linuxmint.localdomain.
10.10.168.192.in-addr.arpa. 60 IN PTR mintPCBlue.localdomain.
linuxmint.localdomain. 60 IN A 192.168.10.10
mintPCBlue.localdomain. 60 IN A 192.168.10.10
[root@ipfireTest ~]# unbound-control list_local_data | grep 20.11
linuxmint.localdomain. 60 IN A 192.168.20.11
mintPC.localdomain. 60 IN A 192.168.20.11
[root@ipfireTest ~]# unbound-control list_local_data | grep 20.20
20.20.168.192.in-addr.arpa. 60 IN PTR linuxmint.localdomain.
20.20.168.192.in-addr.arpa. 60 IN PTR mintPC2.localdomain.
linuxmint.localdomain. 60 IN A 192.168.20.20
mintPC2.localdomain. 60 IN A 192.168.20.20
phili@linuxmint:~$ host linuxmint
linuxmint.localdomain has address 192.168.20.20
linuxmint.localdomain has address 192.168.20.11
linuxmint.localdomain has address 192.168.10.10
What is the host name of your Linux Mint machine ( the name defined in the VM ) ?
I suppose it is linuxmint. If your device signals this name in the DHCP request, it is stored in the unbound name space, also. The other definitions result from reading the hosts file and the fixed leases file in IPFire.
Would be interesting to lookup, whether the unbound {name,IP} relation is injective, surjective or bijective ( and what is defined in the DNS specification about this property ).
Same problem with Android.
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.
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.
That’s exactly what I did.
And even though the PC name is huaweimb
When I connect the Wi-Fi, I have both IP addresses in the IPFire DNS for huaweimb.
[root@ipfire ~]# host huaweimb
huaweimb.pscar.dynu.com has address 192.168.20.49
huaweimb.pscar.dynu.com has address 192.168.20.47
And they both remain independent of the PC connection
Edit : I already described this problem two months ago.
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
indeed this is a challenge on other dhcp/dns solutions too
and as you wrote:
one has to create an exclusive ‘reservation’
for each of the mac adresses at the dhcp system
so the dns can work correctly.
fortunately, other solutions work correctly.
you lucky guy seem to have a hardly
challenging environment
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