The issue is getting stranger
definitely the "lag" in connection is sourced by this topic. If i force in the hosts file the correct ip, ssh connects immediately.
This should be exactly what the localise_queries option does:
Return answers to DNS queries matching the subnet from which the query was received if multiple IPs are available.
Now the strange part: on my windows box i have a WSL (to build OWRT images, inter alia) and this linux box pings always the correct ip!
It's windows that is pinging the wrong one!
This is linux:
massi@greenbook:~/official$ nslookup rutto.lan
Server: 172.28.32.1
Address: 172.28.32.1#53
Non-authoritative answer:
Name: rutto.lan
Address: 192.168.1.1
Name: rutto.lan
Address: 10.0.0.1
Name: rutto.lan
Address: 10.0.99.1
Name: rutto.lan
Address: 192.168.111.1
Name: rutto.lan
Address: fd96:b8e2:2f12::1
massi@greenbook:~/official$ ping rutto.lan
PING rutto.lan (192.168.1.1) 56(84) bytes of data.
64 bytes from mqttBroker.lan (192.168.1.1): icmp_seq=1 ttl=63 time=1.42 ms
^C
--- rutto.lan ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.417/1.417/1.417/0.000 ms
massi@greenbook:~/official$ ping rutto.lan
PING rutto.lan (192.168.1.1) 56(84) bytes of data.
64 bytes from mqttBroker.lan (192.168.1.1): icmp_seq=1 ttl=63 time=1.42 ms
^C
--- rutto.lan ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.424/1.424/1.424/0.000 ms
and this is windows:
PS C:\Users\Massi> nslookup rutto.lan
Server: RUTTO.lan
Address: fd96:b8e2:2f12::1
Nome: rutto.lan
Addresses: fd96:b8e2:2f12::1
10.0.0.1
10.0.99.1
192.168.111.1
192.168.1.1
PS C:\Users\Massi> ping rutto.lan
Esecuzione di Ping rutto.lan [10.0.99.1] con 32 byte di dati:
Risposta da 10.0.99.1: byte=32 durata=2ms TTL=64
Statistiche Ping per 10.0.99.1:
Pacchetti: Trasmessi = 1, Ricevuti = 1,
Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
Minimo = 2ms, Massimo = 2ms, Medio = 2ms
Control-C
PS C:\Users\Massi> ping rutto.lan
Esecuzione di Ping rutto.lan [192.168.111.1] con 32 byte di dati:
Risposta da 192.168.111.1: byte=32 durata=2ms TTL=64
Statistiche Ping per 192.168.111.1:
Pacchetti: Trasmessi = 1, Ricevuti = 1,
Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
Minimo = 2ms, Massimo = 2ms, Medio = 2ms
Control-C
PS C:\Users\Massi> ping rutto.lan
Esecuzione di Ping rutto.lan [10.0.0.1] con 32 byte di dati:
Risposta da 10.0.0.1: byte=32 durata=1ms TTL=64
Statistiche Ping per 10.0.0.1:
Pacchetti: Trasmessi = 1, Ricevuti = 1,
Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
Minimo = 1ms, Massimo = 1ms, Medio = 1ms
Control-C
same nslookup (at least ) but very different ping behaviour!
Edit to add: seems a consistent behaviour. All my linux VM in different subnets resolves the router ip to the correct one (the one belonging to the same subnet)
and another windows box is showing the same resolution issue. Seems a windows problem, but i'd never encountered this. Ideas?