Score:0

Unable to get networking working after changing motherboard

id flag

I have an SSD with Ubuntu Server 20.04, kernel 5.4.0-77 installed on it. I moved house and the SSD made the move, but the server itself didn't. I threw the SSD into a different machine for the time being, but for the life of me I can't get networking going. The network adapter I have on the new machine is a "Realtek RTL8111/8168/8411". At first I tried installing the .deb from here, but it wouldn't build (I think it has to do with pci-aspm.h being merged into pci.h at some point?) Regardless, after that, I purged the files, and grabbed the driver from here (GBE) and built it with the autorun.sh. it seems to have installed fine, but I can't find any evidence it's working. I'll put the output of a couple commands, since I think those'll illustrate better than me trying to explain:

$ lsmod | grep r8168
r8168      540672  0

$ lspci -v
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
        Flags: bus master, fast devsel, latency 0, IRQ 40
        I/O ports at d000 [size=256]
        Memory at f2104000 (64-bit, prefetchable) [size=4K]
        Memory at f2100000 (64-bit, prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel Driver in use: r8168
        Kernel Modules: r8168

$ ifconfig -a
br-0e94947f61e9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
        ether 02:42:c3:55:aa:70  txqueuelen 0  (Ethernet)
        RX packets 43  bytes 1204 (1.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 780  bytes 80552 (80.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ae:d4:6d:fc  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0  (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0  (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5so: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 78:45:c4:fe:20:14  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  base 0x9000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop txqueuelen 1000  (Local Loopback)
        RX packets 7437  bytes 847680 (847.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7437  bytes 847680 (847.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

$ cat /etc/netplan/*.yaml 
# This is the network config written by ‘subiquity’
network:
  ethernets:
    eno1:
      dhcp4: true
  version: 2

Anything else I can provide, I'd be more than happy to. I've been going at this all day, so it's possible I'm forgetting something obvious. Regardless, please help me figure out how to get my network interface up and running, thanks.

chili555 avatar
cn flag
Please edit your question to show the result of the terminal command: `cat /etc/netplan/*.yaml` Welcome to Ask Ubuntu.
Shawnsg avatar
id flag
Added, thanks. Bit confused by the output but hopefully its helpful.
Score:1
cn flag

Networking in Ubuntu server 20.04 and later is handled by netplan. Your netplan file refers to the ethernet interface eno1. Since you moved the SSD to a different motherboard, the interface is actually now enp5s0. We’ll simply change the netplan file to match.

First, we need to know the exact name of the file. From the terminal:

cd /etc/netplan && ls

This will show the exact name of the file. Now let’s edit it to make our change:

sudo nano fileyoufound.yaml

Change this file:

# This is the network config written by ‘subiquity’
network:
  ethernets:
    eno1:
      dhcp4: true
  version: 2

To this:

# This is the network config written by ‘subiquity’
network:
  ethernets:
    enp5s0:
      dhcp4: true
  version: 2

Netplan is very specific about indentation, spacing, etc., so proofread carefully twice. Save (Ctrl+o followed by Enter) and close (Ctrl+x followed by Enter) the text editor nano.

Follow with:

sudo netplan generate
sudo netplan apply

Did you connect?

ping -c3 www.ubuntu.com
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.