I have a strange problem on my Raspberry Pi.
I've Googled for my problem but I cannot find a solution, maybe someone here had same issue.
I have a Pi connected to cable network (eth0), powered by correct power adapter and always on. The problem is that sometime internet connection of Rberry suddenly stops to work, but local network is working without problems. I'm sure issue is on internet connection because everytime it happens I try to ping http://www.google.com and cannot reach it (I tried to ping ip address directly with same result), but if ping other devices in my network there are no problems (and when I do these tries I'm connected with ssh to the raspberry so network is stable)
When it happens I cannot restore internet connection at all.
I tried also with
ifdown eth0 && sleep 5s && ifup eth0 without luck, the only way seems to reboot raspberry.
This is my
auto lo iface lo inet loopback iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1
Someone have an idea about it? I have other devices on my network (Mac, Linux notebook and Windows PC) but no one suffers of this problem...
Just happened and following some advices found googling I discovered that command
sudo route add default gw 192.168.1.1
restores internet connection without rebooting the Pi. Now the only question is WHY this happens and how avoiding it.