1

In the last couple of weeks, I replaced Windows 10 on my main desktop machine with Lubuntu 18.04, as I had long grown tired of forced Windows 10 updates with lengthy processing that tended to fail anyway.

The desktop in question is using a Wifi dongle to access the internet, as a wired connection would be very awkward for where my computer is located. Connection to the Wifi network itself is consistently successful. Often, as per now, I am able to browse the internet, use the Software Updater, etc. But, I can come to the computer say a couple of days later, and although Wifi is connected, trying to go to sites in Firefox gives an 'Unable to connect' error page.

Once the connectivity is in the 'broken' state, I find that sudo service network-manager restart does not sort it, nor do repeated reboots. In such situations, I still have Windows 10 on a laptop and can go on there to perform whatever task requires online access. However, I would very much prefer to keep use of Windows 10 to a minimum if I could.

I can then come back to the the desktop Lubuntu machine say a couple of days later, and sometimes it might still not be able to browse sites; but at some point it 'fixes itself' without me having done anything.

The laptop I mentioned is dual-boot Windows 10/Ubuntu, and when using Ubuntu 17.10, I would have a similar experience. I could go on some days and be able to browse; then on another day, browsing would not be working; then at some point it would 'fix itself'; and then at a later date, browsing would again not be working; then it would fix itself; and this cycle seems to repeat.

Before I replaced Windows 10 on the desktop, it was dual-boot Windows 10 and Linux Mint. I had the same intermittent connectivity problems with Mint.

So it seems to me that out-of-the-box Ubuntu family distros can be prone to this intermittent inability to browse - and have been for a considerable time??

Does anyone know of any diagnostics that can be tried while the affected machine is working fine? Or, is it necessary to wait for the problem to occur, and only then are the diagnostics useful?

TLDR: Wifi on Ubuntu family distros consistently connects, but on some days I can browse and on others I can't; then another day it's 'fixed itself'; and this cycle seems to repeat.

  • This sounds like a DNS issue. Are you using DHCP? If so, can you control the DHCP server's DNS assignments? Or, alternatively, can you edit your connections and apply a static address and name servers? (I recommend 8.26.56.26 for Secure DNS, backed up by 1.0.0.1) – SDsolar May 13 '18 at 14:34
  • Thankyou for the responses. In the Wifi connection dialog, IPv4 Settings tab, Method drop-down reads 'Automatic (DHCP)', so clearly the answer is yes, it's using DHCP. Can I control the DHCP server's DNS assignments? - I suspect this will be supported although I don't have knowledge of that. There is also clearly the ability to edit the connections with static addresses (it's not obvious to me how to add a screenshot here). So...it seems as if an 'OOTB new connection' just does this Automatic DHCP; and the user needs to add static addresses; name servers. Will try it... – PaulS May 13 '18 at 20:06
  • [comodo.com/secure-dns/] 'Comodo Secure DNS is a domain name resolution service that resolves your DNS requests through our worldwide network of redundant DNS servers. This can provide a much faster and more reliable Internet browsing experience than using the DNS servers provided by your ISP...' So...I think I better understand the problem. This isn't necessarily an 'Ubuntu problem' - it's more like if you use Ubuntu and in my case use TalkTalk as ISP, etc. So the 2 suggested name servers work around possible shortcomings of the ISP's default DNS servers. – PaulS May 13 '18 at 20:17
  • So far I have the one change to the automatically-created connection details: Additional DNS Servers: 8.26.56.26, 8.20.247.20, 1.0.0.1 imgur.com/a/xgWsAcd? Perhaps this in itself will be enough to work on Automatic (DHCP) - i.e. if it will move over to use those if TalkTalk's servers can't find an address...? I had a quick Google on static addresses and it looks quite complicated, so I'm tempted to see how this configuration goes over the next couple of weeks. If anyone thinks it's still insufficient and I definitely will need the static address part then please do advise. – PaulS May 13 '18 at 21:10
  • Yes, good deal. You said it right: you can add "additional" DNS servers just fine in Ubuntu, as opposed to Windows where you can override DHCP-given DNS entries. Note that each DNS it tries will cost a few seconds if it does not get a response. So I always skip the second Comodo address. 1.0.0.1 is called the Fastest DNS Server On The Net (along with 1.1.1.1 which is incompatible with some routers). Hence my suggestion of using 8.26.56.26, 1.0.0.1 - Static is one sure way to override the DHCP server, of course. "Advanced IP Scanner" in Windows helps to verify available addresses to use – SDsolar May 13 '18 at 23:53
0

Key points:

(1) Static addressing, not DHCP, seems to be a reliable way around these problems. (2) NetPlan (new from Ubuntu 17.10) provides a one-stop shop where all aspects of the connectivity can be configured. The YAML configuration file under /etc/netplan needs to be sudo edited appropriately. Below is my example which seems reliable since setting up earlier today. Indentation must be correct (Python):

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  wifis:
    wlx8cae4cf82ee6:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.2/24, '2001:1::1/64']
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.26.56.26, 1.0.0.1]
      access-points:
        TALKTALKnnnXnn:
          password: your_password_goes_here

So the 'static address for this computer' part is 192.168.1.2/24. My understanding is that if you have multiple computers you could set them up as:

192.168.1.3/24
192.168.1.4/24

etc.

The wlx8cae4cf82ee6 is the Device name for the WiFi dongle. So to get the device name you should be specifying, on a Lubuntu connection this is the 'Device' field value on the WiFi tab.

Anyway, once the YAML changes are incorporated (sudo netplan apply), NetPlan should automatically create a connection named netplan-devicename-SSID. So in summary this can all be done by editing a single YAML file, whereas pre-NetPlan solutions would be split across more than one file, etc. It should also work the same regardless of whether you're on Mint, Ubuntu, Lubuntu, etc.

  • I've since had the above static addressing have a problem whereby it works in the early seconds of switching the computer on and its possible to connect to websites, but then very quickly the ability to browse to sites becomes lost again. So I can't yet say that static addresses is a guaranteed reliable way to be able to get online. – PaulS May 26 '18 at 14:37
  • A feature of the new problem: if I do sudo service network-manager restart, the ability to browse is re-enabled - although it becomes lost again in less than a minute. So it's possible to accomplish online tasks, but having to repeatedly restart the Network Manager again and again. – PaulS May 30 '18 at 21:06
  • An important point: the full-blown Ubuntu laptop I'm typing this from does NOT require the network manager restarts; it's been reliable with the static address solution. I therefore suspect that the restarts problem is Lubuntu-specific? Furthermore, I tried Manjaro on the desktop PC - worked yesterday, hit by the TalkTalk DNS problem today. I believe an effective solution will be to go with full-blown Ubuntu on the desktop, and apply the static address solution straight after installation. I like the blinding speed of Lubuntu but Ubuntu will still do very nicely. Fingers crossed... – PaulS Jun 9 '18 at 17:53

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.