If all else fails and if you have control over the range of addresses that DHCP gives out (at least enough to tell it to leave a few un-assigned), you could always force the server to be at a static IP address.
That is, either using network manager or whatever method you desire (including editing /etc/network/interfaces, see below) and setting it to not use DHCP but to have a static address.
Then, if it is alive, it should always be at that IP address. Just make sure DHCP never allocates a new host there.
Here’s the syntax for making static in interfaces file:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth2
iface eth2 inet static
address 192.168.0.149
netmask 255.255.255.0
-------end---
You may have to fiddle with <something> to get the name of the Ethernet device right (or static), including hacking around with udev rules…. Especially since eth0 went away recently, being replaced with wonderful names like enp3s0… (I understand the logic, but sometimes I want the first Ethernet device to be eth0, period. NO funny enp3s0/1/2/3 enp4s1 stuff… but I digress!)
And, I’m NOT going to even MENTION the totally sick hack of finding the actual IP address that the host got from DHCP by using broadcast ping from a different host… ;-)
Rusty
From: PLUG-discuss [mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of Michael Butash
Sent: Tuesday, October 30, 2018 2:14 PM
To: PLUG Phoenix List
Cc: joe@actionline.com
Subject: Re: How to fix 'no route to host' problem
If you can't ping it, see no arp on your local network, or "no route to host", it's not there on that ip any more. Doesn't mean it didn't get another ip address different as recommended above to static your dhcp, but it's not on that IP any longer.
I like to do "nmap -sP 192.168.1.0/24<http://192.168.1.0/24>" or whatever your subnet is there, and see what comes back for what lives there, if name resolution is present, or mdns capable, you should see names. It probably just got a new lease.
-mb
On Tue, Oct 30, 2018 at 7:17 AM Stephen Partington <cryptworks@gmail.com<mailto:cryptworks@gmail.com>> wrote:
DHCP IP Address reservation or Assignments in your router will be a bit odd looking in most home routers, but once you find it very simple. This will still vary based on device but an example can be found here. https://www.linksys.com/us/support-article?articleNum=135673
On Mon, Oct 29, 2018 at 8:21 PM Joe Lowder <joe@actionline.com<mailto:joe@actionline.com>> wrote:
I still need help to solve this problem:
I recently wrote this:
> For many months, I have been using rsync to copy files
> from one of my computers to two others, and it has worked flawlessly. But
> today, it quit working and I cannot figure out why and how to correct the
> problem. Below is the error message I now see:
>
> ssh: connect to host 192.168.0.4 port 22: No route to host
> rsync: connection unexpectedly closed (0 bytes received so far) [sender]
> rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
>
> What do I need to do to correct this problem?
One reply said, "Can you ping it?"
Yes, I can, ping the device ip address. Also did these 2 commands:
d: arp -an
? (192.168.0.19) at c4:1c:ff:30:c5:9c [ether] on wlan0
? (192.168.0.7) at 10:0b:a9:9a:99:a8 [ether] on wlan0
? (192.168.0.1) at 52:b9:e5:c9:b9:cc [ether] on wlan0
d: ip neighbor
192.168.0.19 dev wlan0 lladdr c4:1c:ff:30:c5:9c REACHABLE
192.168.0.7 dev wlan0 lladdr 10:0b:a9:9a:99:a8 STALE
192.168.0.1 dev wlan0 lladdr 52:b9:e5:c9:b9:cc DELAY
But I don't know what to do with the results.
Another reply suggested:
> So: Go to the target machine and find out what its
> IP and MAC are--"/sbin/ifconfig" from the command line
> will show that info. Then set up your router such that
> it will always give out 192.168.0.4 to that MAC.
But I don't know how to set my router so that it will
always give out 192.168.0.4 to that MAC.
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org<
mailto:PLUG-discuss@lists.phxlinux.org>
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
--
A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.
Stephen
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org<
mailto:PLUG-discuss@lists.phxlinux.org>
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss