
After upgrading to a new version of an operating system, it’s not uncommon to encounter a few hiccups. One such issue that many users have reported after upgrading to Ubuntu 18.04 is a lack of internet access. This article will guide you through several potential solutions to this problem.
Understanding the Issue
Before diving into the solutions, it’s important to understand the root of the problem. The issue of no internet access after upgrading to Ubuntu 18.04 can be attributed to a number of factors, including but not limited to, changes in network configuration files, outdated network drivers, or issues with the DNS resolver.
Solution 1: Edit /etc/resolv.conf
File
The /etc/resolv.conf
file is used to define the DNS servers that your system uses for domain resolution. If this file is not configured correctly, it can lead to internet connectivity issues.
To edit this file, open a terminal and run the following command:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
This command uses echo
to output the string “nameserver 8.8.8.8”, which is then piped into the sudo tee /etc/resolv.conf
command. The tee
command is used to write the output to the /etc/resolv.conf
file. The > /dev/null
part of the command discards the standard output, so it doesn’t clutter your terminal.
If the /etc/resolvconf/resolv.conf.d/head
file is empty, run the following command:
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolvconf/resolv.conf.d/head > /dev/null
This command appends the “nameserver 8.8.8.8” line to the head
file.
Finally, restart the resolvconf and networking services with these commands:
sudo systemctl enable resolvconf
sudo systemctl start resolvconf
sudo /etc/init.d/networking restart
Solution 2: Edit /etc/systemd/resolved.conf
File
The /etc/systemd/resolved.conf
file is used by the systemd-resolved service to configure network parameters. You can add the DNS servers directly to this file.
Open the file with a text editor using the following command:
sudo vim /etc/systemd/resolved.conf
Then, add the following line to the file:
DNS=8.8.8.8
Save the file and reboot your system to apply the changes.
Solution 3: Edit /etc/network/interfaces
File
The /etc/network/interfaces
file is used to configure network interfaces. You can manually define your Ethernet interface in this file to fix the internet connectivity issue.
Open the file with a text editor using the following command:
sudo gedit /etc/network/interfaces
Then, add the following lines to the file, replacing eth1
with the name of your Ethernet interface:
auto eth1
iface eth1 inet dhcp
The auto
keyword is used to automatically start the network interface when the system boots. The iface
line defines the interface and sets it to use DHCP for IP address assignment.
After editing the file, use the following command to bring up the interface:
sudo ifup eth1
Finally, reboot your system to apply the changes.
Solution 4: Edit /etc/resolvconf/resolv.conf.d/base
File
The /etc/resolvconf/resolv.conf.d/base
file is used to define the base configuration for the resolv.conf file. You can add the DNS servers directly to this file.
Open the file with a text editor using the following command:
sudo vim /etc/resolvconf/resolv.conf.d/base
Then, add the following lines to the file:
nameserver 8.8.8.8
nameserver 8.8.4.4
These lines define the primary and secondary DNS servers that your system will use for domain resolution.
Save the file and reboot your system to apply the changes.
Solution 5: Reinstall Network Driver
In some cases, the issue might be due to an outdated or incompatible network driver. In such cases, reinstalling the network driver might solve the problem.
First, download the appropriate network driver for your system from the Intel website. Extract the downloaded file and navigate to the src
directory.
Compile the driver module using the command:
make install
If you encounter an error related to skb_frag_off
, comment out the function in the src/kcompat.h
file and run make install
again.
Finally, load the driver module using the commands:
modinfo e1000e
modprobe e1000e [parameter=port1_value,port2_value]
The modinfo
command is used to display information about a kernel module, in this case, e1000e
. The modprobe
command is used to add a module to the Linux kernel.
Conclusion
These are some of the potential solutions to the issue of no internet access after upgrading to Ubuntu 18.04. Please note that these solutions have been suggested by users and may not work for everyone. It is recommended to try them one by one and see which one resolves the internet connectivity issue after the upgrade. If none of these solutions work, it might be worth reaching out to the Ubuntu community or seeking professional help.
You can check the contents of your /etc/resolv.conf
file by opening it with a text editor or running the command cat /etc/resolv.conf
. If the file does not contain any nameserver
lines or if it contains incorrect IP addresses for the DNS servers, it is likely misconfigured.
You can use the command ifconfig -a
to list all network interfaces on your system. Look for the interface with an Ethernet connection, which is usually named eth0
or enpXsY
(where X and Y are numbers).
Yes, you can use any DNS servers you prefer. In the provided solutions, 8.8.8.8 and 8.8.4.4 are Google’s public DNS servers, but you can replace them with the IP addresses of other DNS servers if you wish.
You can check the version of your network driver by running the command modinfo e1000e
(replace e1000e
with the name of your network driver). Compare the version with the latest version available on the manufacturer’s website. If your driver version is older, it may be worth updating it.
If none of the provided solutions resolve your internet connectivity issue, it is recommended to reach out to the Ubuntu community for further assistance. You can post your problem on forums or community support channels where experienced users and developers can help troubleshoot the issue.