After the upgrade I noticed that I don't have internet access. The wired network and the wifi settings looked good, but it didn't work. After the login the system always switched itself into airplane mode. I tethered the network via USB and Bluetooth by my mobile but they also didn't work.
Update 2: the bugreport was refused because I couldn't reproduce it on the already upgraded system and couldn't provide data for the developers.
Update 1: I reported the bug on launchpad. You can subscribe if you are involved: https://bugs.launchpad.net/ubuntu/+bug/1816530
the ORIGIN of the solution
if the
/etc/resolv.conf
is empty but you can ping 8.8.8.8if the
/etc/resolvconf/resolv.conf.d/head
is empty then you have to repeat the command above after every restart except you do this:then you have to restart the resolvconf and the networking
I agree with some other folks here that the selected answer is probably not the best way to fix the issue:
When a file has a comment at its beginning that says
then there is probably a very good reason to, well, ... not edit that file! ;-)
And here is why, as well as a suggestion for a better (IMHO) solution:
a. the file
/etc/resolv.conf
, that you modified, will be overwritten at boot time, so your modification won't 'stick'.b. the ip address (127.0.0.53) that was originally in there (before you modified it) is actually the address of a DNS stub resolver. It's there! You can ping it! it's running locally on your machine. What is a stub resolver? It takes your DNS queries and looks in its cache for a resolution! If it can't find any, it will reach out to a real DNS server (and then cache the result). So, if you overwrite the address of the stub resolver, you're going to miss out on this important caching function of the stub resolver!
The problem with this new resolver method in Ubuntu 18.04 is that the 'real' DNS server address was never set. So, if the stub resolver doesn't find your requested domain in its cache, it doesn't know what DNS server to query. (Hence your domain name based internet accesses no longer working). So all you have to do is configure the 'real' DNS server that this stub resolver must use. And you do this by editing (sudo!)
/etc/systemd/resolved.conf
Simply add something like
to that file.
Then restart the network, or rather, reboot, so you can verify that you now have a solution that is persistent across reboots.
(What I haven't figured out yet, is why DHCP doesn't properly set the correct DNS server!)
Accepted answer did solve my problem. However, as everyone else stated, that is only until you reboot which I do daily with my machine. Typing 5 to 6 lines in the terminal every time I start the system up isn't something I would find amusing.
After digging on the internet I found a solution to permanently solve the problem. I rebooted 3 times afterward just to be sure, internet connection is there and I don't have to do anything.
Solution:
Start the terminal and type:
Now you gotta figure out which is your Ethernet interface. Mine is listed as
eth1
. Next type:My file only had:
Now what you need to do is to add the following lines afterwards:
Lastly,
$ sudo ifup eth1
, reboot and you're done. Don't forget to changeeth1
with the name of your Ethernet interface.Original answer
tl;dr
First, edit this file
Second, Add the following
After that, restart Ubuntu, should have internet now.
Explain
Some of the solution listed worked, but will failed once restart Ubuntu (in my case, VM),
The above solution is a tl;dr form this solution (https://unix.stackexchange.com/a/128223/243480) and it worked perfectly
I was having the same issue on ubuntu 18.04 and the above answer didn't work for me as I didn't have a folder named
/etc/resolvconf/resolv.conf.d/
. So I did the followingThen I added
nameserver 8.8.8.8
to the file/etc/resolvconf/resolv.conf.d/head
Then a simple network restart solved the issue.
On the non-working updated PC the symlink was :
On a working PC with 18.04 the symlink was :
then I replace the old linked file with a new one :
(work after procedures described below)
Changing
/etc/resolv.conf
is not the best answer to this problem. According to Ubuntu 16.04 documentationresolv.conf
file can be overwritten by system at any time.If you are using static IP configuration you should add one line to you
/etc/network/interfaces
file in you ethernet card configuration. It should look something like:And then to restart your network run:
If you want to avoid any possible problems in the future, you can do one more thing. Upgrading from 16.04 to 18.04 does not change network configuration method from
/etc/network
to new/etc/netplan
used in 18.04. If you want to change it manually look at How to enable netplan on ubuntu server upgraded from 16.04 to 18.04Hello All Almost total noob here but I ran into this problem when I started dual booting between Windows 10 and loaded Ubuntu 18.04 on a separate hard drive. My internet wouldn't connect and my router wouldn't allow me to open up the configuration interface. I finally figured out that it was because I had DCHP set to assign a static IP to Windows 10. After checking all the information I could find and nothing working I loaded Windows 10 and removed the routers static IP from the DHCP settings. That got internet working but I wanted a static IP for Windows and Ubuntu. Best I can figure is that Ubuntu doesn't take the hand off from the routers DHCP server properly despite being set to automatic. Once I manually configured the static IP address and Gateway in Ubuntu could I go back to having aforesaid static IP. Hope this helps someone. Drew
In my case, i have tried many answers, unfortunately, all can not work in my computer. Here is my solution. I think no internet after upgrade from 16.04 to 18.04, this problem is most likely caused by the loss of the network driver. What you need to do is to reinstall it. Visit this link intel network driver, and download the driver. The version I am using is
e1000e-3.8.4
, i haven't tried whether other version can work. After downloading, extract this file to a folder. Enable root privileges:Then, enter the
src
directory.Note that you should change the version if you use a different driver. Compile the driver module.
If this step is successful, it is good. But here i meet a problem.
To solve this problem, you can open this file:
src/kcompat.h
. In this file, there is a function,skb_frag_off
, comment it. And then typemake install
again, this should work. Finally, enterAt this point, you should be able to connect to the network normally.
I solved a connection failure after an upgrade by using a wireless connection using a USB-attached network adapter, then changing to the preferred wired connection directly to the router.