# "No Route to Host" / Can't get network connection

**URL:** <https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924>\
**Category:** Troubleshooting\
**Created:** [31 January 2021 16:49 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924 "2021-01-31T16:49:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [31 January 2021 16:49 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/1 "2021-01-31T16:49:28Z")

</div>

Hello everyone.

Unfortunately, I am experiencing some very strange behavior of my Raspberry Pi 4 with DietPi;  
For some reason, it does not seem to be accessible via SSH anymore, every time I try to connect to my raspberry pi, I get the error “No route to host”. When taking a look into the devices connected to my router, the DietPi shows up, however. Trying to ping it results in the same routing error.

I have not changed anything or installed anything prior to this issue, I noticed because my OwnCloud suddenly lost connection on every one of my devices.  
After tinkering around with hard-restarting my raspi, I suddenly was able to connect to my raspi again (via ssh and owncloud) but shortly after it lost connection again after me trying to edit cronjobs via vim.

Since then nothing has changed. Do you guys have an idea how I should proceed debugging this?

EDIT: When disconnecting my Raspberry from power it for some reason stays in the list of connected devices of my router…

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 January 2021 18:55 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/2 "2021-01-31T18:55:16Z")

</div>

Hi,

easiest would be if you would connect a screen and keyboard to check status on your device as soon as it is not reachable. Do you connect via eth0 or wlan0? As well you could switch to FULL log mode to be able check what happen before you reboot your system.

---

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [31 January 2021 19:27 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/3 "2021-01-31T19:27:18Z")

</div>

Well, then I have to buy a micro-hdmi adapter…

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 January 2021 19:33 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/4 "2021-01-31T19:33:20Z")

</div>

as said, you could switch to FULL log mode and try checking logs once rebooted, if they contain information about the hanging situation.

---

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [31 January 2021 19:35 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/5 "2021-01-31T19:35:37Z")

</div>

Where do I need to set the appropiate parameter? I can for sure pop out the micro-SD and have a look at log files.

---

<div class="post-metadata">

**Author:** ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)\
**Post date:** [31 January 2021 19:45 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/6 "2021-01-31T19:45:17Z")

</div>

> [@](#):
>
> EDIT: When disconnecting my Raspberry from power it for some reason stays in the list of connected devices of my router…

Most likely it is the dhcp lease, which won’t detect a sudden disconnection of the device due to freeze or power cut.  
Only if there is a graceful dhcp release it will vanish from the list.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 January 2021 19:47 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/7 "2021-01-31T19:47:52Z")

</div>

> [@](#):
>
> Where do I need to set the appropiate parameter? I can for sure pop out the micro-SD and have a look at log files.

dietpi-software \> Log System \> Full

are you using WLAN or Ethernet?

---

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [31 January 2021 19:58 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/8 "2021-01-31T19:58:12Z")

</div>

Wifi only

> [@](#):
>
> > [@](#):
> >
> > EDIT: When disconnecting my Raspberry from power it for some reason stays in the list of connected devices of my router…
> 
> Most likely it is the dhcp lease, which won’t detect a sudden disconnection of the device due to freeze or power cut.  
> Only if there is a graceful dhcp release it will vanish from the list.

so… It will disapper after a while?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 January 2021 20:18 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/9 "2021-01-31T20:18:13Z")

</div>

> Wifi only

probably your device is loosing WiFI connection. You could try setting auto reconnect feature

dietpi-config \> 7 : Network Options: Adapters \> WiFi \> Auto Reconnect : [On]

---

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [31 January 2021 21:13 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/10 "2021-01-31T21:13:10Z")

</div>

Thank you. I already ordered a micro-hdmi to hdmi cable and will get into it when it arrives. Until then 🙂

---

<div class="post-metadata">

**Author:** ![Sir\_Photch](https://dietpi.com/forum/user_avatar/dietpi.com/sir_photch/32/2803_2.png) [@Sir\_Photch](https://dietpi.com/forum/u/Sir_Photch)\
**Post date:** [1 February 2021 12:21 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/11 "2021-02-01T12:21:47Z")

</div>

A restart of my router made my DietPi accessible again, and now everything is working fine so far. I activated full logging and wifi-reconnect. Thank you!

---

<div class="post-metadata">

**Author:** ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)\
**Post date:** [1 February 2021 13:56 UTC](https://dietpi.com/forum/t/no-route-to-host-cant-get-network-connection/4924/12 "2021-02-01T13:56:57Z")

</div>

> [@](#):
>
> so… It will disapper after a while?

Yes, after the lease time is expired.
