20.04 上未检测到网络接口

20.04 上未检测到网络接口

我正在使用 LTS 版本 20.04,出于某种原因,NetworkManager 服务从系统中消失了。我手动安装了 Network Manager 服务,但仍然看不到检测到的网络接口。从 ifconfig 中,我只看到环回接口:

user-MS-7823:~$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 162358  bytes 11529428 (11.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 162358  bytes 11529428 (11.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

user-MS-7823:~$ ping www.google.com
ping: www.google.com: Temporary failure in name resolution

我甚至尝试了dmesg命令,但在输出中没有检测到任何接口。

编辑:输出lshw -C network

user-MS-7823:~$ sudo lshw -C network
[sudo] password for uor: 
  *-network DISABLED        
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 0c
       serial: d8:cb:8a:55:ef:d4
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical
       configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes
       resources: irq:16 ioport:d000(size=256) memory:f7200000-f7200fff memory:f2100000-f2103fff
  *-network DISABLED
       description: Ethernet interface
       product: 82574L Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: 00
       serial: 00:1b:21:b6:60:17
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.8-0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:18 memory:f71c0000-f71dffff memory:f7100000-f717ffff ioport:c000(size=32) memory:f71e0000-f71e3fff memory:f7180000-f71bffff

有人能帮我找出连接/检测接口的解决方案吗?

答案1

我看到了这个问题,并且在我的例子中切换了网卡,导致它被禁用。因此,我有一个现有的静态配置,但接口错误。一旦我在 01-network-manager-all.yaml 中正确设置了接口名称,一切就绪了。

答案2

就我而言,英特尔作物以太网控制器 I225-V 必须linux-modules-extra-5.15.0-87-generic在 Ubuntu 中安装该包,否则没有可用的驱动程序。

相关内容