Reputation: 57
I have two machines on my internal network, one of which (the server) is exposed to the Internet through port forwarding on the router. If I try to ssh into the server from my laptop (or ping the server from the laptop) using the server's static internal IP address, I frequently get "No route to host".
In order to get the server to respond to it's internal static IP address once this happens, I must ssh into the server via its internet-facing domain name, then ping my laptop from the server. It takes a moment for the server to find the laptop, but once it does, I can exit from the server, and then my laptop is able to ping and/or ssh to the server using the internal static IP for a few days until the problem repeats again.
What could cause this? I'm not sure what configs to even look at to try to debug the problem.
Server and laptop are both running Lubuntu 10.16.
Upvotes: 1
Views: 4058
Reputation: 41
My guess it is route or arp related. Is the laptop sending an arp request from your laptop in the first place?
When you don't know what hardware address a thing on the local subnet is at, you do an Ethernet level "broadcast" to ask where a given IP address is at. This is called an ARP request.
An ARP reply is sent from the MAC with the IP on it. If either of those is failing, no bueno.
The other problem could be if the laptop or something doesn't know what it's local subnet IS. For instance, if I have a 192.168.1.4 with a subnet mask of 255.255.255.255, and another machine with 192.168.1.208 with a subnet mask with 255.255.255.128, then the first and the second will not talk to each other because the first will think the second is local, but the second will the the first is foreign.
EVERYTHING above the Ethernet layer does an ARP if it's not in the cache and the address is on the local broadcast segment.
Check masks on Ubuntu with:
ifconfig -a
That's where I'd start unraveling the mystery, along with
route print
Upvotes: 1