Currently Available: Need a skilled Software Developer for your next project?
Categories
Linux Servers

How to Troubleshoot an Ethernet Connection That Won’t Come Up on Ubuntu Server

When an Ethernet connection fails on Ubuntu Server, Ubuntu may not see the network port, the port may have no physical or virtual link, the server may lack an IP address, or traffic may fail even after the server gets an address. Each of those failures happens in a different layer, so if you restart services or change settings at random, you can hide the cause.

Ubuntu uses Netplan to describe network settings, and Netplan passes those settings to a service called a renderer. That renderer, either systemd-networkd or NetworkManager, configures the network port. First check whether Ubuntu sees the port and detects a link, then find out which renderer manages it and inspect its configuration. Working in that order lets you separate a cable or hardware fault from an IP, route, or DNS error.

Check whether Ubuntu sees the port and link

Start by listing the server’s network interfaces, their addresses, and its routes:

ip -br link
ip -br addr
ip route

An interface name might look like enp3s0 or eno1, while older or differently configured systems may use names like eth0. Use the exact name ip prints when you edit configuration files or run diagnostic commands. Ubuntu’s network configuration documentation covers both ip and ethtool for inspecting interfaces and Ethernet settings.

If the port shows up, check its link state and Ethernet details:

ip link show dev 
sudo ethtool 

Replace <IFACE> with the name from ip, such as enp3s0. If ethtool prints Link detected: no, the interface has no carrier, meaning it does not detect the signal of a physical or virtual link. Check the cable, switch port, transceiver, and any virtual machine or virtual-switch link settings. That output tells you the link is down, though it cannot tell you which component failed.

If the interface is missing from ip -br link, Ubuntu has not exposed that port as a network interface. Check whether the operating system detects the network hardware and has a driver loaded for it. On a virtual machine, check whether you attached and connected a virtual network adapter. You need to fix a missing interface at the device level before Netplan can configure it.

If the interface has a carrier but no expected IP address, look into DHCP or your static address settings. DHCP (Dynamic Host Configuration Protocol) lets the network assign an IP address automatically. If the interface has an address but cannot reach another network, check its subnet and route. If you can reach IP addresses but hostnames fail to resolve, troubleshoot DNS separately, because a DNS failure does not mean the Ethernet link is down.

Identify Netplan’s configuration and renderer

Netplan reads YAML files (text configuration files structured by indentation) from /lib/netplan, /etc/netplan, and /run/netplan. Netplan generates settings for a renderer and does not manage the port directly. Ubuntu documents systemd-networkd as Netplan’s default renderer, and server installations commonly use it. Netplan also supports NetworkManager, so check the active configuration and device status instead of guessing which service manages the interface. See Ubuntu’s overview of Netplan.

Inspect Netplan’s merged settings and the files that feed into them:

sudo netplan get
ls -l /lib/netplan /etc/netplan /run/netplan
sudo grep -R . /lib/netplan /etc/netplan /run/netplan 2>/dev/null

Netplan reads files across all three directories. A file in a higher-priority directory overrides a file with the same name in a lower-priority directory, while differently named files load in alphabetical order and combine their settings. The grep command only gives you a rough look at the raw files, so rely on netplan get and Netplan’s own validation to see the effective configuration. The Netplan generation reference explains how Netplan reads and merges these files.

Make sure the YAML file uses the exact interface name Ubuntu reports, and look for another file that switches the renderer or adds conflicting settings. Before you edit or remove a file, check which tool created it, since installer- or cloud-generated files may be part of the server’s setup.

For a port that should get an IPv4 address through DHCP, a minimal Netplan configuration looks like this:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: true

Use your real interface name and the renderer intended for that server. Netplan’s configuration examples use this same DHCP pattern. Netplan does not enable DHCP by default, so if your network provides DHCP, you must turn it on explicitly for the port to receive an address.

A static configuration specifies an IP address and prefix, a default route for traffic leaving the local subnet, and DNS server addresses:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
        - 10.10.10.2/24
      routes:
        - to: default
          via: 10.10.10.1
      nameservers:
        addresses: [10.10.10.1, 1.1.1.1]

Replace those example values with the address, prefix, gateway, and DNS servers assigned to your network. Ubuntu’s server documentation notes that Ubuntu 18.04 required the older gateway4 syntax instead of to: default, so check what your installed Ubuntu release supports before copying an example written for a newer version.

Check the service that manages the port

Once you know which renderer manages the interface, use its tools to inspect the port and read its logs. systemd-networkd and NetworkManager are separate services for managing a device. Do not enable or restart both as a blanket fix; confirm which one Netplan or the current device status points to.

For systemd-networkd, check the service, the interface state, and the logs from the current boot:

networkctl list
networkctl status 
systemctl status systemd-networkd
journalctl -u systemd-networkd -b

networkctl reports states such as no-carrier, carrier, degraded, and routable. In plain terms, no-carrier means the port has no link, while routable means it has a routable address. The systemd networkctl manual documents these states and commands. Because available subcommands vary by systemd version, run networkctl --help before trying commands like renew or reconfigure on an older Ubuntu release.

For NetworkManager, inspect the device and its connection profiles:

nmcli device status
nmcli device show 
nmcli connection show

A connection profile holds the settings NetworkManager applies to a device. If the profile you want exists and NetworkManager manages the device, bring it up with:

nmcli connection up 

Replace <PROFILE> with the profile name shown by nmcli connection show. If NetworkManager marks the device as unmanaged, nmcli connection up will not make it take control automatically. Check NetworkManager’s management settings and device status; its command reference explains how nmcli reports and manages devices and profiles.

When Netplan supplies the configuration, edit the Netplan YAML files and apply them through Netplan instead of treating generated backend files as the source of truth. A manually written .network file for systemd-networkd follows a different configuration path.

Apply a change without losing remote access

Netplan can validate your YAML and generate backend configuration without applying it:

sudo netplan generate --debug

Run this first to catch generation errors before you touch the live network. Once the configuration validates cleanly, you can apply it. Netplan’s tutorial walks through how Netplan generates and applies backend settings.

If you are connected over SSH and your change could drop your session, use netplan try:

sudo netplan try

Netplan applies the proposed configuration and waits for you to confirm it. Its default timeout is 120 seconds; if you do not confirm within that window, Netplan attempts to roll back the change. After a timeout or cancellation, check the server’s actual network state instead of assuming the rollback succeeded. If you have console access or you know the change is correct, you can run netplan apply directly. The Netplan try documentation explains the confirmation and rollback behavior.

Match the symptom to the next check

What you see What to check next
The interface is absent from ip -br link Check device and driver visibility, or confirm that a virtual network adapter is attached.
The interface shows NO-CARRIER or ethtool reports Link detected: no Check the cable, switch port, transceiver, and virtual link state.
The interface has carrier but no expected address Check the interface name, renderer, DHCP or static settings, and backend logs.
The interface has an address but cannot reach other networks Check the address prefix and default route or gateway.
IP connections work but hostnames fail Check DNS settings and the resolver separately.

A working IP address does not prove that your default route or DNS settings are right. In the same way, NO-CARRIER tells you the link is missing, though it cannot tell you whether the cable, switch, NIC, or virtual network caused it.

What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Email updates

Usually a new article and a few links I found interesting.

No spam. Unsubscribe with one click.

Leave a Reply

Your email address will not be published. Required fields are marked *