On our home LAN, after rebooting the router, I cannot ssh from laptop A to laptop B except via the router. However, after doing a ping from laptop B to laptop A, I can connect normally from A to B. I can reproduce this issue by rebooting the router. Both laptops are connected to the router via WiFi and there are no other APs or routers connected. There are other devices on the LAN and I am not aware of any other ARP issues.
Demonstrating the problem after the router was rebooted:
scott@laptopa:~$ ip addr show dev wlp58s0 |grep 'inet '
inet 192.168.8.194/24 brd 192.168.8.255 scope global dynamic noprefixroute wlp58s0
scott@laptopa:~$ ssh 192.168.8.131 echo okay
ssh: connect to host 192.168.8.131 port 443: No route to host
scott@laptopa:~$ ssh 192.168.8.131 echo okay
ssh: connect to host 192.168.8.131 port 443: No route to host
scott@laptopa:~$ ssh 192.168.8.131 echo okay
ssh: connect to host 192.168.8.131 port 443: No route to host
scott@laptopa:~$ arp |grep 9c:b6:d0:44:18:09
scott@laptopa:~$
The awkward work-around:
scott@laptopa:~$ ssh -o 'ProxyCommand ssh -q -W %h:%p [email protected]' 192.168.8.131 'ping -c 10 192.168.8.194'
PING 192.168.8.194 (192.168.8.194) 56(84) bytes of data.
64 bytes from 192.168.8.194: icmp_seq=1 ttl=64 time=66.3 ms
64 bytes from 192.168.8.194: icmp_seq=2 ttl=64 time=22.9 ms
64 bytes from 192.168.8.194: icmp_seq=3 ttl=64 time=106 ms
64 bytes from 192.168.8.194: icmp_seq=4 ttl=64 time=230 ms
64 bytes from 192.168.8.194: icmp_seq=5 ttl=64 time=252 ms
64 bytes from 192.168.8.194: icmp_seq=6 ttl=64 time=275 ms
64 bytes from 192.168.8.194: icmp_seq=7 ttl=64 time=298 ms
64 bytes from 192.168.8.194: icmp_seq=8 ttl=64 time=321 ms
64 bytes from 192.168.8.194: icmp_seq=9 ttl=64 time=38.3 ms
64 bytes from 192.168.8.194: icmp_seq=10 ttl=64 time=60.3 ms
--- 192.168.8.194 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9012ms
rtt min/avg/max/mdev = 22.950/167.478/321.937/112.761 ms
Demonstrating that it now works properly:
scott@laptopa:~$ ssh 192.168.8.131 echo okay
okay
scott@laptopa:~$ arp |grep 9c:b6:d0:44:18:09
laptopb.lan ether 9c:b6:d0:44:18:09 C wlp58s0
Laptops A and B are both running Ubuntu 18.04, and the router is Lede (OpenWRT) 17.01.4.
ip addr
command on Laptop B too, please. And for testing purposes, ensure that you've got noiptables
rules set. At all. On either laptop.