I've read many askubuntu and other forum posts about loss of Internet connection. I've installed Debian 8.2 Jessy on a laptop, and used static IPv4 config:
- IP Addr. 10.0.0.5
- Mask 255.255.255.0
- Gateway 10.0.0.138
- Dns 8.8.8.8 (Google's DNS) + ISP's DNS
It worked. Then, after some work on it, from nowhere the connection is lost. I've tried pinging the router:
root@debian82:/home/user# ping 10.0.0.138
PING 10.0.0.138 (10.0.0.138) 56(84) bytes of data.
64 bytes from 10.0.0.138: icmp_seq=1 ttl=255 time=1.37 ms
64 bytes from 10.0.0.138: icmp_seq=2 ttl=255 time=1.60 ms
64 bytes from 10.0.0.138: icmp_seq=3 ttl=255 time=0.740 ms
64 bytes from 10.0.0.138: icmp_seq=4 ttl=255 time=0.734 ms
64 bytes from 10.0.0.138: icmp_seq=5 ttl=255 time=0.668 ms
64 bytes from 10.0.0.138: icmp_seq=6 ttl=255 time=0.707 ms
^C
--- 10.0.0.138 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5003ms
rtt min/avg/max/mdev = 0.668/0.971/1.601/0.372 ms
I've tried pinging Google:
root@debian82:/home/user# ping google.com ping: unknown host
google.com
I've tried switching to dhcp and refreshing its config.:
root@debian82:/home/user# dhclient -r -v eth0 && rm
/var/lib/dhcp/dhclient.*; dhclient -v eth0 Internet Systems Consortium
DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All
rights reserved. For info, please visit
https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:02:a5:b5:e1:eb Sending on
LPF/eth0/00:02:a5:b5:e1:eb Sending on Socket/fallback DHCPRELEASE on
eth0 to 10.0.0.138 port 67 Internet Systems Consortium DHCP Client
4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:02:a5:b5:e1:eb Sending on
LPF/eth0/00:02:a5:b5:e1:eb Sending on Socket/fallback DHCPDISCOVER
on eth0 to 255.255.255.255 port 67 interval 5 DHCPREQUEST on eth0 to
255.255.255.255 port 67 DHCPOFFER from 10.0.0.138 DHCPACK from 10.0.0.138 bound to 10.0.0.11 -- renewal in 110048 seconds.
Here's what I got:
etc/networking/interfaces
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
# address 10.0.0.11
# netmask 255.255.255.0
# gateway 10.0.0.138
nameserver 8.8.8.8
nameserver 194.90.0.1
dns-nameservers 8.8.8.8 194.90.0.1 8.8.4.4
I tried everything I could possibly find, and rebooted between each trial. Where am I wrong?
The content of /etc/resolv.conf
is:
user@debian82:~$ nano /etc/resolv.conf
nameserver 10.0.0.138
EDIT: I've added the other name servers (Google's and ISP's) to /etc/resolv.conf
. I'm writing this edit from the computer that had no internet.
etc/resolv.conf
and now it works.