Hi all i have been running Ubuntu Server 16.04 on my headless server for several months without issue, recently i took the server offline for some routine cleaning & replaced a PSU, upon booting it back up for some reason the server has no outgoing internet connection here are the results of some tests
ben@ubuntu:~$ ping -c5 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=23.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=23.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=23.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=23.3 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=29.9 ms
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 23.396/24.844/29.937/2.556 ms
trying to ping a hostname
ben@ubuntu:~$ ping www.cisco.com -c 1 -s 1472 -M do
ping: unknown host www.cisco.com
ben@ubuntu:~$
Ping www.cisco.com via IP adress
ben@ubuntu:~$ ping -c5 23.204.15.199
PING 23.204.15.199 (23.204.15.199) 56(84) bytes of data.
64 bytes from 23.204.15.199: icmp_seq=1 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=2 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=3 ttl=46 time=239 ms
64 bytes from 23.204.15.199: icmp_seq=4 ttl=46 time=229 ms
64 bytes from 23.204.15.199: icmp_seq=5 ttl=46 time=229 ms
contents of resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
contents of if config
ben@ubuntu:~$ ifconfig
enp8s0 Link encap:Ethernet HWaddr 00:1e:67:51:8e:8c
inet addr:192.168.0.251 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:67ff:fe51:8e8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:20820 errors:0 dropped:50 overruns:0 frame:0
TX packets:16017 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4243433 (4.2 MB) TX bytes:4596251 (4.5 MB)
Interrupt:16 Memory:c2300000-c2320000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:18434 errors:0 dropped:0 overruns:0 frame:0
TX packets:18434 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:2225861 (2.2 MB) TX bytes:2225861 (2.2 MB)
contents of /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp8s0
iface enp8s0 inet static
address 192.168.0.251
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
contents of /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I can SSH into the box from my mobile phone using 4G connection (outside of my local network)
Any ideas, system has been running great now all of a sudden no internet access,
Thank You
-Ben
dnsmasq
service is not working? Did you try what it says in theresolve.conf
file to runsystemd-resolve --status
? If you want, you can turn offdnsmasq
by commenting out thedns=dnsmasq
line in the/etc/NetworkManager/NetworkManager.conf
file then restart. That is what I have done on my system and found I have less issues. – Terrance Nov 19 '17 at 04:31below is the outcome
systemd-resolve: unrecognized option '--status'
– gimpacause Nov 19 '17 at 06:27resolve.conf
was suggesting that you run it. But, did you try the other part of my suggestion so that DNS is not handled by your computer and handled by the DHCP / DNS server? – Terrance Nov 19 '17 at 06:35grep 127.0.0.53 /etc/resolvconf/resolv.conf.d/*
and see if there is any output. There might be a chance that if we set proper DNS in/etc/resolvconf/resolv.conf.d/original
that it might fix your DNS problem. – Terrance Dec 11 '17 at 16:56[code]
ben@ubuntu:~$ grep 127.0.0.53 /etc/resolvconf/resolv.conf.d/* grep: /etc/resolvconf/resolv.conf.d/*: No such file or directory ben@ubuntu:~$
[/code]
Thank you
– gimpacause Dec 17 '17 at 09:20systemd-resolved
as none of my systems are using it and they seem to be holding DNS pretty well. Have a look at https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu – Terrance Dec 18 '17 at 14:17browsing around google i came across a page describing an issue similar to mine and tried the fix there i entered the command sudo dhclient enp8s0 and i regained internet access, what file should i look at see what went wrong, thank you for your help so far
– gimpacause Dec 30 '17 at 12:00/etc/network/interfaces
file and giving it a reserved IP in your router. Or you might need to give that system a reserved IP in the router regardless so that the router doesn't try to give out that IP to another system. That could have happened. – Terrance Dec 31 '17 at 21:09