仅在 /etc/netplan Ubuntu 20.04 中存在 lo 接口

仅在 /etc/netplan Ubuntu 20.04 中存在 lo 接口

我使用技嘉 GA-MA790XT-UD4P 主板构建了一台 PC。我安装了 Ubuntu 20.04 作为操作系统。但我意识到我没有连接到互联网。直到突然我发现我的Ubuntu机器只有环回接口在使用。我可以确认以太网电缆可以工作,因为它可以在我的 W10 电脑上工作。

root@webserver:/home/foulan# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever 

这是我的网络规划配置

root@webserver:/home/foulan# cat /etc/netplan/01-netcfg-yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

当我运行 commando lspci 时,我们看到它检测到我的网卡。

root@webserver:/home/foulan# lspci

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD780 Host Bridge
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RX780/RD790 PCI to PCI bridge (external gfx0 port A)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD790 PCI to PCI bridge (PCI express gpp port A)
00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD790 PCI to PCI bridge (PCI express gpp port F)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3a)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
02:00.0 SATA controller: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 02)
02:00.1 IDE interface: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 02)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
04:0e.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

03:00.0 你可以看到我的网卡

我尝试从 Realtek 网站安装驱动程序,但也没有成功......

root@webserver:/home/foulan/Desktop/r8125-9.004.01# ./autorun.sh 

Check old driver and unload it.
Build the module and install
./autorun.sh: 31: make: not found

foulan@webserver:~$ sudo lshw -C network 
  *-network UNCLAIMED       
       description: Ethernet controller
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 03
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
       resources: ioport:ce00(size=256) memory:fddff000-fddfffff memory:fddf8000

模组信息 8169

root@webserver:/home/foulan# modinfo r8169
filename:       /lib/modules/5.4.0-42-generic/kernel/drivers/net/ethernet/realtek/r8169.ko
firmware:       rtl_nic/rtl8125a-3.fw
firmware:       rtl_nic/rtl8107e-2.fw
firmware:       rtl_nic/rtl8107e-1.fw
firmware:       rtl_nic/rtl8168h-2.fw
firmware:       rtl_nic/rtl8168h-1.fw
firmware:       rtl_nic/rtl8168g-3.fw
firmware:       rtl_nic/rtl8168g-2.fw
firmware:       rtl_nic/rtl8106e-2.fw
firmware:       rtl_nic/rtl8106e-1.fw
firmware:       rtl_nic/rtl8411-2.fw
firmware:       rtl_nic/rtl8411-1.fw
firmware:       rtl_nic/rtl8402-1.fw
firmware:       rtl_nic/rtl8168f-2.fw
firmware:       rtl_nic/rtl8168f-1.fw
firmware:       rtl_nic/rtl8105e-1.fw
firmware:       rtl_nic/rtl8168e-3.fw
firmware:       rtl_nic/rtl8168e-2.fw
firmware:       rtl_nic/rtl8168e-1.fw
firmware:       rtl_nic/rtl8168d-2.fw
firmware:       rtl_nic/rtl8168d-1.fw
license:        GPL
softdep:        pre: realtek
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <[email protected]>
srcversion:     45049AB10197DBC356B2C41
alias:          pci:v000010ECd00003000sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008125sv*sd*bc*sc*i*
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004302sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010FFd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008161sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
alias:          pci:v000010ECd00002600sv*sd*bc*sc*i*
alias:          pci:v000010ECd00002502sv*sd*bc*sc*i*
depends:        
retpoline:      Y
intree:         Y
name:           r8169
vermagic:       5.4.0-42-generic SMP mod_unload 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        02:B6:04:06:D9:82:F4:38:95:E4:6F:84:9F:1D:B4:8E:C5:85:90:8B
sig_hashalgo:   sha512
signature:      E3:E7:71:69:E2:38:25:43:AC:75:42:97:E9:9E:25:94:82:E4:3F:05:
        C3:77:87:00:6A:1A:F1:E6:BE:97:78:F5:B3:D4:A5:5A:0C:53:02:17:
        73:B8:C1:F3:82:E6:AE:69:78:C2:1C:01:64:7F:B6:D8:21:63:46:E4:
        88:26:8F:AC:83:FB:10:C4:86:4E:27:05:10:FF:61:0C:52:9F:6D:8E:
        F4:29:03:44:D0:D0:83:CD:A8:A7:65:3D:B0:7B:86:5F:D2:69:6B:81:
        73:14:B7:A7:01:2D:8F:70:18:32:FE:52:53:B8:4C:AF:06:7C:FA:1D:
        C3:6A:B2:05:8B:66:BA:01:49:49:0F:A0:D1:F7:80:97:58:E0:4A:6B:
        74:DB:9A:65:4B:44:34:93:C2:88:D8:9B:82:ED:86:41:C1:6E:E9:E8:
        48:4A:96:40:8B:39:49:AC:39:23:B3:75:6B:12:42:45:91:89:5C:59:
        3E:19:65:E8:5C:88:83:86:7C:A6:4E:83:5B:2E:03:88:65:6F:89:BF:
        5F:0D:D0:EB:F9:56:DD:0D:47:99:0B:57:6F:18:22:8B:E2:54:43:DD:
        D1:01:14:67:81:9D:D9:0F:61:BB:84:82:D0:1D:10:37:AD:A4:52:23:
        38:A7:88:02:26:97:C3:F2:49:61:AA:E1:CF:83:58:7C:04:57:E6:9E:
        A8:80:74:24:8F:9B:61:90:3A:74:09:8F:C5:45:9D:2B:63:41:13:EB:
        5B:E6:41:D9:D0:99:DB:DD:0D:91:DE:60:C3:B2:B1:CA:82:6F:4F:A3:
        4D:55:AE:4C:BE:78:8C:73:FB:10:FC:64:FE:F6:F0:87:20:5C:6A:D8:
        60:B9:B3:AB:BF:D5:72:F1:BF:1C:B5:BA:14:09:9E:19:EE:A9:A3:26:
        2B:C0:9F:35:1A:21:20:80:34:F6:FA:30:50:BC:8D:F1:B7:AA:0B:4C:
        0A:E2:FC:7D:42:39:6C:57:72:D7:47:D6:6B:02:54:0D:59:05:FB:13:
        56:DE:CD:DD:32:FE:DD:C5:1B:02:DD:6D:CC:64:F6:68:BC:97:A8:D8:
        22:4E:47:A0:72:ED:C9:D7:F6:1A:1A:F5:2C:0F:02:19:26:74:42:C7:
        54:22:EB:00:1C:75:27:31:89:C8:BA:3E:A6:5A:D0:A8:8E:03:8D:16:
        AA:FC:61:02:20:80:CB:9C:CF:CA:01:64:DB:86:7E:2E:75:27:30:4E:
        0E:62:B9:D7:75:94:74:23:4D:99:1D:1D:3D:8A:89:EA:A5:1D:5A:9A:
        01:EF:DD:09:53:E8:6A:80:B1:5D:06:9D:73:2F:C2:4E:97:7E:CF:04:
        3A:B4:60:18:4A:46:F9:02:01:B3:1C:1E
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)
root@webserver:/home/foulan# dmesg | grep r8169
[ 1.558733] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 1.563274] libphy: r8169: probed
[ 1.563278] r8169 0000:03:00.0: realtek.ko not loaded, maybe it needs to be added to initramfs?
[ 1.581302] r8169: probe of 0000:03:00.0 failed with error -49

任何帮助我的电脑连接到互联网的帮助将不胜感激。

答案1

下载驱动程序后,USB 适配器为我提供了互联网连接(因此不再需要 USB 适配器)。

相关内容