Connecting to home network drops internet after about 10 seconds (Ubuntu 16.04)

I have today had a really strange (and confusing) issue, that I cannot seem to remedy. When I connect to my local network (using either ethernet or wifi), the network appears to connect fine, and web pages load. But after ~10s it appears that pages can no longer load, and I see the chrome 'There is no internet connection' error.

Note though that the internet is still connected.

I found other blogs which mentioned similar things, and some useful info I can glean from that is below.

  1. ping 8.8.8.8 This doesn't really work, it just returns the below, and freezes

    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

  2. I disabled ethernet/wifi to see if the other worked, it did not.

  3. With wifi running, I ran ifconfig, which returned the expected block including the ip address line

    inet addr: 192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0

I am not sure where to try next, I was thinking an upgrade (as am on Ubuntu 16.04) but don't think I can without an internet connection (note though I do have other computers I can download and use USBs on).

Any help would be greatly appreciated, as this has been an issue for half a day so far, and I really need to know how to fix it (hopefully without formatting my machine completely).

edit 1

dmesg

[ 4738.843326] wlan0: authenticate with 9c:3d:cf:2d:2a:23
[ 4738.857852] wlan0: send auth to 9c:3d:cf:2d:2a:23 (try 1/3)
[ 4739.194588] wlan0: send auth to 9c:3d:cf:2d:2a:23 (try 2/3)
[ 4739.253551] wlan0: send auth to 9c:3d:cf:2d:2a:23 (try 3/3)
[ 4739.305312] wlan0: authentication with 9c:3d:cf:2d:2a:23 timed out
[ 4747.214155] wlan0: authenticate with 9c:3d:cf:2d:2a:23
[ 4747.228846] wlan0: send auth to 9c:3d:cf:2d:2a:23 (try 1/3)
[ 4747.244260] wlan0: authenticated
[ 4747.249426] wlan0: associate with 9c:3d:cf:2d:2a:23 (try 1/3)
[ 4747.262179] wlan0: RX AssocResp from 9c:3d:cf:2d:2a:23 (capab=0x1411 status=0 aid=4)
[ 4747.262285] wlan0: associated
[ 4803.391017] wlan0: deauthenticating from 9c:3d:cf:2d:2a:23 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 4803.409988] cfg80211: World regulatory domain updated:
[ 4803.409992] cfg80211:  DFS Master region: unset
[ 4803.409994] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 4803.409999] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 4803.410003] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 4803.410006] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 4803.410009] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 4803.410013] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 4803.410016] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 4803.410019] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 4803.410022] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 4806.968013] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 4807.009667] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 4813.836418] wlan0: authenticate with 9c:3d:cf:2d:2a:23
[ 4813.851747] wlan0: send auth to 9c:3d:cf:2d:2a:23 (try 1/3)
[ 4813.853849] wlan0: authenticated
[ 4813.855503] wlan0: associate with 9c:3d:cf:2d:2a:23 (try 1/3)
[ 4813.859434] wlan0: RX AssocResp from 9c:3d:cf:2d:2a:23 (capab=0x1411 status=0 aid=4)
[ 4813.859594] wlan0: associated
[ 4813.859619] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

journalctl --follow | grep error

I first disabled wifi, ran this command, then restarted it. Nothing appeared in the cli, webpage worked, but after ~15s of refreshing, it stopped working again.

Edit 002

Adding other DNS domains I went into Network, then selected the wifi network I am connected to, and added the below line to 'Additional DNS servers'. Then restarted network-manager to test again, sadly no change.

8.8.8.8, 8.8.4.4

Running route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         XPSbadger.local 0.0.0.0         UG    600    0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 br-e83ec14e5fe6
172.17.0.0      *               255.255.0.0     U     0      0        0 docker0
172.18.0.0      *               255.255.0.0     U     0      0        0 br-2af86a86bdb0
172.19.0.0      *               255.255.0.0     U     0      0        0 br-5b58772b6da5
172.20.0.0      *               255.255.0.0     U     0      0        0 br-f76aa0c2dc58
172.21.0.0      *               255.255.0.0     U     0      0        0 br-27966f3ea248
172.22.0.0      *               255.255.0.0     U     0      0        0 br-cbda173ee6bd
172.23.0.0      *               255.255.0.0     U     0      0        0 br-65df59f4d93f
172.24.0.0      *               255.255.0.0     U     0      0        0 br-6d514edfb8e2
172.25.0.0      *               255.255.0.0     U     0      0        0 br-14e3dea71a99
172.26.0.0      *               255.255.0.0     U     0      0        0 br-48746990b42c
172.27.0.0      *               255.255.0.0     U     0      0        0 br-450e7e405a9b
172.28.0.0      *               255.255.0.0     U     0      0        0 br-002104caf6be
172.29.0.0      *               255.255.0.0     U     0      0        0 br-97fdbde621a5
172.30.0.0      *               255.255.0.0     U     0      0        0 br-831de9f3d506
172.31.0.0      *               255.255.0.0     U     0      0        0 br-9f1441b318f1
182.18.18.0     *               255.255.255.0   U     0      0        0 br-86b7b5bb37a1
182.18.19.0     *               255.255.255.0   U     0      0        0 br-f2bc890d9461
182.18.20.0     *               255.255.255.0   U     0      0        0 br-6a9feb1c2cde
192.168.0.0     *               255.255.255.0   U     600    0        0 wlan0
192.168.0.0     *               255.255.240.0   U     0      0        0 br-e83ec14e5fe6
192.168.16.0    *               255.255.240.0   U     0      0        0 br-157d68c1ba49
192.168.32.0    *               255.255.240.0   U     0      0        0 br-20c38da9b3d5
192.168.48.0    *               255.255.240.0   U     0      0        0 br-e36061771a1a
192.168.64.0    *               255.255.240.0   U     0      0        0 br-d4e0712eb056
192.168.80.0    *               255.255.240.0   U     0      0        0 br-515288084e48

Edit 003

sudo ip link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether f0:1f:af:4c:06:42 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 70:18:8b:2b:ef:3d brd ff:ff:ff:ff:ff:ff
4: br-14e3dea71a99: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e1:a8:cc:a9 brd ff:ff:ff:ff:ff:ff
5: br-27966f3ea248: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e8:fd:54:48 brd ff:ff:ff:ff:ff:ff
6: br-48746990b42c: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:fa:e4:3a:45 brd ff:ff:ff:ff:ff:ff
7: br-65df59f4d93f: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:23:c7:1a:7b brd ff:ff:ff:ff:ff:ff
8: br-6a9feb1c2cde: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:67:e9:46:84 brd ff:ff:ff:ff:ff:ff
9: br-cbda173ee6bd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:24:91:e6:c6 brd ff:ff:ff:ff:ff:ff
10: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:7e:b7:b5:03 brd ff:ff:ff:ff:ff:ff
11: br-002104caf6be: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:99:be:40:87 brd ff:ff:ff:ff:ff:ff
12: br-450e7e405a9b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:57:a0:ad:97 brd ff:ff:ff:ff:ff:ff
13: br-5b58772b6da5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:3a:8d:61:de brd ff:ff:ff:ff:ff:ff
14: br-f2bc890d9461: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:ce:f8:7d:a1 brd ff:ff:ff:ff:ff:ff
15: br-f76aa0c2dc58: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:bc:b0:c5:e4 brd ff:ff:ff:ff:ff:ff
16: br-157d68c1ba49: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:10:b5:5f:09 brd ff:ff:ff:ff:ff:ff
17: br-2af86a86bdb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:7e:25:da:fb brd ff:ff:ff:ff:ff:ff
18: br-515288084e48: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:5d:3e:a5:de brd ff:ff:ff:ff:ff:ff
19: br-6d514edfb8e2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:b8:39:16:80 brd ff:ff:ff:ff:ff:ff
20: br-831de9f3d506: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:5c:81:8c:8c brd ff:ff:ff:ff:ff:ff
21: br-9f1441b318f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:b3:7e:4f:d2 brd ff:ff:ff:ff:ff:ff
22: br-e36061771a1a: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e0:47:7f:11 brd ff:ff:ff:ff:ff:ff
23: br-e83ec14e5fe6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:7d:21:a9:00 brd ff:ff:ff:ff:ff:ff
24: br-20c38da9b3d5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:9b:3b:9c:5b brd ff:ff:ff:ff:ff:ff
25: br-97fdbde621a5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:a5:6c:db:87 brd ff:ff:ff:ff:ff:ff
26: br-d4e0712eb056: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e5:02:57:77 brd ff:ff:ff:ff:ff:ff
27: br-86b7b5bb37a1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:e2:b1:ee:65 brd ff:ff:ff:ff:ff:ff
29: vetha46a4db@if28: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-cbda173ee6bd state UP mode DEFAULT group default 
    link/ether 0e:a4:64:96:f0:a4 brd ff:ff:ff:ff:ff:ff link-netnsid 2
31: veth8d800d2@if30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-831de9f3d506 state UP mode DEFAULT group default 
    link/ether 2a:f1:a5:39:e7:51 brd ff:ff:ff:ff:ff:ff link-netnsid 0
33: veth38cfe67@if32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-831de9f3d506 state UP mode DEFAULT group default 
    link/ether 5e:c2:18:b2:4b:02 brd ff:ff:ff:ff:ff:ff link-netnsid 3
35: veth0e87fcd@if34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-cbda173ee6bd state UP mode DEFAULT group default 
    link/ether fe:53:90:21:56:cb brd ff:ff:ff:ff:ff:ff link-netnsid 1

Edit 003

lspci -vv | egrep Kernel | tail -5

Kernel modules: ath9k
Kernel driver in use: rtsx_pci
Kernel modules: rtsx_pci
Kernel driver in use: sdhci-pci
Kernel modules: sdhci_pci

Edit 004

I found a diagnostic script below, and so ran and am pasting output to help.

https://ubuntuforums.org/showthread.php?t=370108

The results are in pastebin: https://pastebin.com/uA74APda


Solution 1:

Possible (temporary) solution found. I do a lot of work with Docker, and there were a lot of docker networks on my machine. Running docker network prune to remove some of the unused networks appears to have helped.

Note though, I do not know why this has resolved the issue, maybe there was one docker site with a dodgy IP, or possibly just the sheer quantity of Docker sites I had locally. I will see if/when it comes back, and update this ticket as I know more.