Ubuntu 20.04.6 Desktop: No Ethernet Connection - Upgrade from 16.04 via 18.04
If you've upgraded your Ubuntu system from 16.04 to 20.04, passing through the 18.04 release, and suddenly found yourself without an Ethernet connection, you're not alone. This article will guide you through the steps to diagnose and resolve this issue.
Diagnosing the Issue
To start, let's check the current network interfaces by running the lshw -class network command in the terminal. This command will display a list of network interfaces, including their current status.
In some cases, after upgrading to Ubuntu 20.04.6, you may notice two different network interfaces with similar names, such as en01 and eth1.
Understanding the Problem
This issue occurs due to a naming conflict between the old and new network interface naming conventions used by Ubuntu during the upgrade process. Previously, network interfaces were named using the ethX format, while the newer convention uses the enpXsY format to provide a more descriptive name.
In the case of our example, the system has both an old-style name (eth1) and a new-style name (en01) for the same physical network interface. This can cause connectivity issues, as the system may be attempting to use the incorrect interface name.
Resolving the Conflict
To resolve the naming conflict, you can simply create a symbolic link from the new-style name (en01) to the old-style name (eth1). This binding will ensure that the system uses the correct interface name for Ethernet connectivity.
To accomplish this, follow these steps:
- Open a terminal window.
- Edit the
/etc/netplan/01-netcfg.yamlfile using a text editor, such asnano. Replace the existing interface name (en01) with the new, symbolic link name (eth1) and update the MAC address accordingly:networking: version: 2 ethernets: eth1: dhcp4: true match: macaddress: xx:xx:xx:xx:xx:xx set-name: eth1 - Save the file and exit the text editor.
- Create the symbolic link using this command:
- To apply the new configuration, reload the networking service:
sudo ln -s /dev/en01 /dev/eth1
sudo service networking restart
Verifying Connectivity
After carrying out the steps above, you can confirm that network connectivity has been restored by checking the output of the ifconfig or ip a command.
If successful, you should now see the Ethernet interface listed as eth1 with a valid IP address.
- The issue arises when upgrading from Ubuntu 16.04 to 20.04 via 18.04, leaving two different network interface names conflicting.
- To resolve the issue, create a symbolic link from the new-style name (
en01) to the old-style name (eth1). - Correct the interface name within the
/etc/netplan/01-netcfg.yamlfile to the new, symbolic link name (eth1). - Restart the networking service for the changes to apply.
- Verify that the Ethernet interface is now correctly listed as
eth1.