LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ping Issue Over LAN - "Destination Host Unreachable" (https://www.linuxquestions.org/questions/linux-newbie-8/ping-issue-over-lan-destination-host-unreachable-4175734523/)

jonshaw199 03-04-2024 12:03 AM

Ping Issue Over LAN - "Destination Host Unreachable"
 
Hello! I am running into an issue when pinging my desktop PC from my laptop (Lenovo X1 Carbon).

- Both machines are running Ubuntu 22.04
- Both machines are connected using wifi
- The issue starts to happen after I close my laptop lid (or click "suspend"), and then open the lid back up

Things work fine at first and I get a response:

Code:

PING 192.168.1.12 (192.168.1.12) 56(84) bytes of data.
64 bytes from 192.168.1.12: icmp_seq=1 ttl=64 time=7.53 ms
64 bytes from 192.168.1.12: icmp_seq=2 ttl=64 time=8.14 ms

Then, when I close the lid on my laptop, reopen it, and try to ping again, I get a "Destination Host Unreachable" and "No route to host" error:

Code:

PING 192.168.1.12 (192.168.1.12) 56(84) bytes of data.
From 192.168.1.14 icmp_seq=1 Destination Host Unreachable
ping: sendmsg: No route to host

However, I can ping other machines on my network without an issue after opening the lid (i.e. Windows PC, TV, etc.). And I can ping my laptop from my desktop at this point too (the other direction). When I try the ping in the other direction like this, it actually fixes the issue and my laptop can ping my desktop again afterwards!

Any help would be greatly appreciated. My ultimate goal here is to remote into my desktop PC from my laptop. Thanks in advance, Jon.

frankbell 03-04-2024 08:57 PM

A traceroute might shed some more light on the problem.

jonshaw199 03-04-2024 09:35 PM

Thanks for the suggestion. I tried the traceroute command before and after suspend:

Code:

jon@jon-thinkpad:~$ traceroute 192.168.1.12
traceroute to 192.168.1.12 (192.168.1.12), 30 hops max, 60 byte packets
 1  192.168.1.12 (192.168.1.12)  9.752 ms  9.683 ms  9.708 ms
jon@jon-thinkpad:~$ traceroute 192.168.1.12
traceroute to 192.168.1.12 (192.168.1.12), 30 hops max, 60 byte packets
 1  jon-thinkpad (192.168.1.14)  3048.633 ms !H  3048.422 ms !H  3048.359 ms !H


rkelsen 03-04-2024 09:36 PM

Quote:

Originally Posted by jonshaw199 (Post 6487448)
Then, when I close the lid on my laptop, reopen it, and try to ping again, I get a "Destination Host Unreachable" and "No route to host" error:

Most laptops will disconnect from the WiFi when you close the lid, in order to save power. If you want to prevent this from happening you could try connecting an external screen.
Quote:

Originally Posted by jonshaw199 (Post 6487448)
My ultimate goal here is to remote into my desktop PC from my laptop. Thanks in advance, Jon.

Are you using KDE? If so, then you can try KRFB/KRDC. It works well.

jonshaw199 03-04-2024 09:54 PM

Quote:

Originally Posted by rkelsen (Post 6487681)
Most laptops will disconnect from the WiFi when you close the lid, in order to save power. If you want to prevent this from happening you could try connecting an external screen.

Are you using KDE? If so, then you can try KRFB/KRDC. It works well.

That makes sense, but I need my laptop for on-the-go and after I close and reopen the lid once, then I can no longer ping or remote into my desktop PC (I can still access the internet and reach other local devices though). But until then, I don't have issues and I can remote into it. Also, I'm currently using gnome and Remmina but I will check those out! Very new to linux in general.

___ 03-06-2024 02:32 AM

Maybe try: ip r ; arp -a # while not working vs. working
Quote:

However, I can ping other machines on my network without an issue after opening the lid (i.e. Windows PC, TV, etc.). And I can ping my laptop from my desktop at this point too (the other direction). When I try the ping in the other direction like this, it actually fixes the issue and my laptop can ping my desktop again afterwards!
Maybe wait a minute for network to start back up. Check logs/dmesg/journalctl ...

jonshaw199 03-06-2024 11:18 PM

Ok thanks, I will try that when I get home on Friday and report back.

jefro 03-07-2024 03:27 PM

Bios may have settings for what happens on lid close.

MadeInGermany 03-08-2024 06:03 AM

Asymmetric routing can cause such a problem.
Does your desktop PC have two networks configured?

jonshaw199 03-09-2024 02:50 PM

Ok I'm back in town and continuing this investigation. I will look into each of these suggestions and get back to you.

I will say that I'm starting to wonder if the problem lies with the desktop computer (the one I'm trying to connect to; never had issues with the laptop and I just built the desktop). I'm experiencing a number of seemingly intermittent network issues, maybe unrelated though. For example, I disabled ssid broadcasting on the router (I guess that means "hidden"), and I have to repeatedly try connecting until it finally succeeds. This PC has a TUF GAMING B550-PLUS WIFI II motherboard w/ a MT7921 wifi card; also my kernel version is 6.5.0-25-generic if that matters. I wouldn't be surprised if a wired connection would help, but I'm hoping I don't have to do that.

jonshaw199 03-09-2024 02:53 PM

Also, I realize this might be the wrong forum for this question. But it's really hard for me to say; don't even know where to start on this. Thanks everyone for the input.

jonshaw199 03-09-2024 04:44 PM

I thought I had updated everything on the desktop, but the software updates dialog JUST popped up and I noticed some firmware changes specifically for this wifi card. So I proceeded with the updates, repeated the suspend/awake process about 10 times, and I'm no longer able to reproduce the issue. I can ping and remote into the desktop from my laptop every time. Maybe this isn't related and it's just a coincidence, but it seems like a good sign...

I took a picture but keep getting an error on upload. This was one of the updates in the list that caught my eye.

jonshaw199 03-09-2024 04:58 PM

What I don't understand is why suspending/awaking the laptop would make a difference if the issue did lie with the desktop firmware. Maybe this is just a coincidence of some sort. Will do a bit more testing...


All times are GMT -5. The time now is 09:10 PM.