How to enable secondary ethernet NIC card?

I recently set up a new Ubuntu 20.04 install on an old PC of mine. It's running some docker containers just fine. However, its installed ethernet NIC doesn't support 1000 Mbps speed. I'd like to be able to take advantage of my home network speed, so I bought this ethernet NIC. I'm new to hardware modification, but I believe I installed it correctly. I just plugged it into a PCIe port. I can see that my PC recognizes it, but does not use it.

lspci shows 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8161 (rev 15)

ip addr shows new ethernet connection:

2: enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 40:3f:8c:76:a2:c0 brd ff:ff:ff:ff:ff:ff

I restarted my PC a couple times, and realized that the NIC would not appear on ipconfig, only on ipconfig -a. After doing sudo ipconfig enp5s0 up, it would appear on ipconfig. What does this mean? How can I make it appear on boot so that I can use it as my primary connection?

The company does not offer an official Linux driver, but the Realtek r8168 driver supposedly works. I installed it by updating the package lists to "universe" and did sudo apt update && sudo apt install r8168-dkms. lsmod shows me that both r8169 (buggy driver) and r8168 (driver I want) are installed but not used by enp5s0:

r8168                 548864  0
r8169                  90112  0

I also blacklisted r8169 by adding it to /etc/modprobe.d/blacklist.conf. Still, ethtool -i enp5s0 shows me that it's still "driver: r8169".

I've tried using nmtui, but it won't let me apply the connection to the device because 'the device is strictly unmanaged'. I googled this, but all that came up was changing a line in /etc/NetworkManager/NetworkManager.conf from managed=false to managed=true. Restarted network manager service but still nmcli d shows all devices as unmanaged. Not sure if related.

All in all, plugging in an ethernet cable to the new port is not working. I use SSH to manage this pc because it's headless, so I can't connect when I use that port. Perhaps I'll get a monitor and keyboard and see what the previous commands say when I plug in just to the new port. If anyone had a similar problem, please let me know. I appreciate any help

Edit: Output of sudo dmesg -l emerg,alert,crit,err,warn: https://paste.ubuntu.com/p/7zp2MFg84g/

Edit: output of @chili555's commands: https://paste.ubuntu.com/p/25Rfdknr7p/

Answers 1

  • My suggestions are to make sure that the new NIC will connect and get an IP address:

    sudo dhclient -v enp5s0
    

    Did it get an IP address? Confirm:

    ip addr show
    

    If it did, then amend the netplan file to use only enp5s0. Carefully follow the examples: cat /usr/share/doc/netplan/examples/static.yaml

    Netplan is strict about indentation, spacing, etc, so be cautious. Once the file is set, follow with:

    sudo netplan generate
    

    And then:

    sudo netplan apply
    

    It ought to take immediate effect. Did the interface get the requested address? Check:

    ip addr show
    

    If so, you are all set and you can detach the ethernet cable from the old NIC.


Related Questions