Hello,
I use a Windows11 laptop
on wifi for nomadic use
on ethernet for use at my desktop (the wifi disconnects when I connect ethernet)
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) :
IPFire keeps the two addresses in its DNS while I declared a fixed DHCP address and a different host for ethernet and wifi:
- 192.168.20.49 “huaweimb” (its the name on windows11)
- 192.168.20.47 “huaweimbwifi”
I do not fully understand the mechanism used by IPFire to assign host names and update them in its DNS
To illustrate the problem, I reproduced it on my Test IPFire:
1 VM ipfiretest with 1 red lan and a green lan
1 VM virtual11 with 2 cards on green lan
At the first connection on the green network DHCP assigned the first card of virtual11 the address 192.168.10.100
Feb 17 14:51:00 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:1a via green0
Feb 17 14:51:01 ipfireTest dhcpd: DHCPOFFER on 192.168.10.100 to 00:0c:29:43:5e:1a (virtual11) via green0
Feb 17 14:51:01 ipfireTest dhcpd: DHCPREQUEST for 192.168.10.100 (192.168.10.1) from 00:0c:29:43:5e:1a (virtual11) via green0
Feb 17 14:51:01 ipfireTest dhcpd: DHCPACK on 192.168.10.100 to 00:0c:29:43:5e:1a (virtual11) via green0
I configured dns.cgi
then dhcp.cgi
I reconnected my windows client
Feb 17 14:55:44 ipfireTest dhcpd: uid lease 192.168.10.100 for client 00:0c:29:43:5e:1a is duplicate on 192.168.10.0/24
Feb 17 14:55:44 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:1a via green0
Feb 17 14:55:44 ipfireTest dhcpd: DHCPOFFER on 192.168.10.2 to 00:0c:29:43:5e:1a via green0
Feb 17 14:55:44 ipfireTest dhcpd: uid lease 192.168.10.100 for client 00:0c:29:43:5e:1a is duplicate on 192.168.10.0/24
Feb 17 14:55:44 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 14:55:44 ipfireTest dhcpd: execute_statement argv[1] = commit
Feb 17 14:55:44 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.2
Feb 17 14:55:44 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
Feb 17 14:55:44 ipfireTest dhcpd: DHCPREQUEST for 192.168.10.2 (192.168.10.1) from 00:0c:29:43:5e:1a via green0
Feb 17 14:55:44 ipfireTest dhcpd: DHCPACK on 192.168.10.2 to 00:0c:29:43:5e:1a via green0
Then I enable the second network card on green to my Windows VM
Feb 17 14:57:06 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:24 via green0
Feb 17 14:57:07 ipfireTest dhcpd: DHCPOFFER on 192.168.10.101 to 00:0c:29:43:5e:24 (virtual11) via green0
Feb 17 14:57:07 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 14:57:07 ipfireTest dhcpd: execute_statement argv[1] = commit
Feb 17 14:57:07 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.101
Feb 17 14:57:07 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
Feb 17 14:57:07 ipfireTest dhcpd: DHCPREQUEST for 192.168.10.101 (192.168.10.1) from 00:0c:29:43:5e:24 (virtual11) via green0
Feb 17 14:57:07 ipfireTest dhcpd: DHCPACK on 192.168.10.101 to 00:0c:29:43:5e:24 (virtual11) via green0
I assign a Fixed IP to my second card
And host names in hosts.cgi
I reconnect my second card
Feb 17 14:59:17 ipfireTest dhcpd: uid lease 192.168.10.101 for client 00:0c:29:43:5e:24 is duplicate on 192.168.10.0/24
Feb 17 14:59:17 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:24 via green0
Feb 17 14:59:17 ipfireTest dhcpd: DHCPOFFER on 192.168.10.20 to 00:0c:29:43:5e:24 via green0
Feb 17 14:59:17 ipfireTest dhcpd: uid lease 192.168.10.101 for client 00:0c:29:43:5e:24 is duplicate on 192.168.10.0/24
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[1] = release
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.101
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
Feb 17 14:59:17 ipfireTest dhcp[5811]: Could not find lease for 192.168.10.101
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[1] = commit
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.20
Feb 17 14:59:17 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
Feb 17 14:59:17 ipfireTest dhcpd: DHCPREQUEST for 192.168.10.20 (192.168.10.1) from 00:0c:29:43:5e:24 via green0
Feb 17 14:59:17 ipfireTest dhcpd: DHCPACK on 192.168.10.20 to 00:0c:29:43:5e:24 via green0
I restart IPFire
Then my windows11 VM
Feb 17 15:03:08 ipfireTest dhcpd: Server starting service.
Feb 17 15:03:08 ipfireTest sshd[3292]: Server listening on 0.0.0.0 port 222.
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: service stopped (unbound 1.22.0).
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: server stats for thread 0: 17 queries, 5 answers from cache, 12 recursions, 0 prefetch, 0 rejected by ip ratelimiting
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: server stats for thread 0: requestlist max 1 avg 0.166667 exceeded 0 jostled 0
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: average recursion processing time 0.103725 sec
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: histogram of recursion processing times
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: [25%]=0.032768 median[50%]=0.0873813 [75%]=0.16384
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: lower(secs) upper(secs) recursions
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.004096 0.008192 1
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.008192 0.016384 1
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.016384 0.032768 1
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.032768 0.065536 2
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.065536 0.131072 3
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: 0.131072 0.262144 4
Feb 17 15:03:09 ipfireTest unbound: [1957:0] notice: Restart of unbound 1.22.0.
Feb 17 15:03:09 ipfireTest unbound: [1957:0] notice: init module 0: validator
Feb 17 15:03:09 ipfireTest unbound: [1957:0] notice: init module 1: iterator
Feb 17 15:03:09 ipfireTest unbound: [1957:0] info: start of service (unbound 1.22.0).
Feb 17 15:03:22 ipfireTest dhcpd: uid lease 192.168.10.101 for client 00:0c:29:43:5e:24 is duplicate on 192.168.10.0/24
Feb 17 15:03:22 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:24 via green0
Feb 17 15:03:22 ipfireTest dhcpd: DHCPOFFER on 192.168.10.20 to 00:0c:29:43:5e:24 via green0
Feb 17 15:03:22 ipfireTest dhcpd: uid lease 192.168.10.101 for client 00:0c:29:43:5e:24 is duplicate on 192.168.10.0/24
Feb 17 15:03:22 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 15:03:22 ipfireTest dhcpd: execute_statement argv[1] = commit
Feb 17 15:03:22 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.20
Feb 17 15:03:22 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
I then deactivate the Wifi and restart windows11 with the Ethernet card
Feb 17 15:09:53 ipfireTest dhcpd: uid lease 192.168.10.100 for client 00:0c:29:43:5e:1a is duplicate on 192.168.10.0/24
Feb 17 15:09:53 ipfireTest dhcpd: DHCPDISCOVER from 00:0c:29:43:5e:1a via green0
Feb 17 15:09:53 ipfireTest dhcpd: DHCPOFFER on 192.168.10.2 to 00:0c:29:43:5e:1a via green0
Feb 17 15:09:53 ipfireTest dhcpd: uid lease 192.168.10.100 for client 00:0c:29:43:5e:1a is duplicate on 192.168.10.0/24
Feb 17 15:09:53 ipfireTest dhcpd: execute_statement argv[0] = /usr/sbin/unbound-dhcp-leases-client
Feb 17 15:09:53 ipfireTest dhcpd: execute_statement argv[1] = commit
Feb 17 15:09:53 ipfireTest dhcpd: execute_statement argv[2] = ADDRESS=192.168.10.2
Feb 17 15:09:53 ipfireTest dhcpd: execute_statement argv[3] = NAME=virtual11
Feb 17 15:09:53 ipfireTest dhcpd: DHCPREQUEST for 192.168.10.2 (192.168.10.1) from 00:0c:29:43:5e:1a via green0
Feb 17 15:09:53 ipfireTest dhcpd: DHCPACK on 192.168.10.2 to 00:0c:29:43:5e:1a via green0
And I get under windows11:
PS C:\Users\user> nslookup virtual11 192.168.10.1
Serveur : ipfireTest.localdomainTest
Address: 192.168.10.1
Nom : virtual11.localdomainTest
Addresses: 192.168.10.20
192.168.10.2
PS C:\Users\user> nslookup virtual11wifi 192.168.10.1
Serveur : ipfireTest.localdomainTest
Address: 192.168.10.1
Nom : virtual11wifi.localdomainTest
Address: 192.168.10.20
Same under IPFire:
[root@ipfireTest ~]# nslookup virtual11 ipfireTest
Server: ipfireTest
Address: 192.168.10.1#53
Name: virtual11.localdomainTest
Address: 192.168.10.2
Name: virtual11.localdomainTest
Address: 192.168.10.20
[root@ipfireTest ~]# nslookup virtual11wifi ipfireTest
Server: ipfireTest
Address: 192.168.10.1#53
Name: virtual11wifi.localdomainTest
Address: 192.168.10.20
IPFIre keeps both addresses registered in DNS
and obviously the Ping no longer responds
[root@ipfireTest ~]# ping virtual11
PING virtual11.localdomainTest (192.168.10.20) 56(84) bytes of data.
From ipfireTest.localdomainTest (192.168.10.1) icmp_seq=1 Destination Host Unreachable
From ipfireTest.localdomainTest (192.168.10.1) icmp_seq=2 Destination Host Unreachable
From ipfireTest.localdomainTest (192.168.10.1) icmp_seq=3 Destination Host Unreachable
^C
--- virtual11.localdomainTest ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3086ms
[root@ipfireTest ~]# ping 192.168.10.2
PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data.
64 bytes from 192.168.10.2: icmp_seq=1 ttl=128 time=0.554 ms
64 bytes from 192.168.10.2: icmp_seq=2 ttl=128 time=1.48 ms
64 bytes from 192.168.10.2: icmp_seq=3 ttl=128 time=1.78 ms
64 bytes from 192.168.10.2: icmp_seq=4 ttl=128 time=1.57 ms
64 bytes from 192.168.10.2: icmp_seq=5 ttl=128 time=1.32 ms
64 bytes from 192.168.10.2: icmp_seq=6 ttl=128 time=1.59 ms
64 bytes from 192.168.10.2: icmp_seq=7 ttl=128 time=1.29 ms
64 bytes from 192.168.10.2: icmp_seq=8 ttl=128 time=1.03 ms
^C
--- 192.168.10.2 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7042ms
Restarting ipfire allows to find the correct configuration
But I can’t restart IPFire every time I connect my laptop to my Desktop