更换主板后,Ubuntu 19.04 没有以太网连接

更换主板后,Ubuntu 19.04 没有以太网连接

所以我最近组装了一台新电脑,并保留了我的 SSD/HDD,所以除了安装了 ubuntu 的磁盘驱动器之外,其他一切都变了。以太网连接不工作了(以前在安装了相同 ubuntu 的旧电脑上可以工作),Wi-Fi 仍然通过 USB 适配器工作。以太网连接在安装了 Windows 的另一个驱动器上工作,所以我知道端口工作正常,只是在 Ubuntu 上。我正在寻找一种无需重新安装 ubuntu 即可使以太网工作的方法

我的ifconfig:

r0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet6 fe80::3c60:9eff:fe5b:8d94  prefixlen 64  scopeid 0x20<link>
    ether 3e:60:9e:5b:8d:94  txqueuelen 1000  (Ethernet)
    RX packets 40313  bytes 5565185 (5.5 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 1515  bytes 472236 (472.2 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 78701  bytes 6556181 (6.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 78701  bytes 6556181 (6.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:71:a9:c1  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

wlx0024010c2ae6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.41  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::bf4c:1503:726:f000  prefixlen 64  scopeid 0x20<link>
        ether 00:24:01:0c:2a:e6  txqueuelen 1000  (Ethernet)
        RX packets 73240  bytes 82584023 (82.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 51703  bytes 7315654 (7.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

如您所见,ifconfig 中没有 eth0 或 eth1,也许这与问题有关?

我的 /etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

sudo lshw -C 网络“ 输出

    *-network DISABLED        
       description: Ethernet interface
       product: Ethernet Connection (7) I219-V
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       logical name: eno1
       version: 10
       serial: 04:d4:c4:47:ce:15
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list 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=0.5-4 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:126 memory:a5200000-a521ffff
  *-network:0
       description: Ethernet interface
       physical id: 2
       logical name: br0
       serial: 3e:60:9e:5b:8d:94
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=no multicast=yes
  *-network:1
       description: Ethernet interface
       physical id: 3
       logical name: virbr0
       serial: 52:54:00:71:a9:c1
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip=192.168.122.1 link=no multicast=yes
  *-network:2
       description: Wireless interface
       physical id: 4
       bus info: usb@3:13.4
       logical name: wlx0024010c2ae6
       serial: c6:35:71:76:9b:db
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt73usb driverversion=5.0.0-25-generic firmware=1.7 link=no multicast=yes wireless=IEEE 802.11
  *-network:3 DISABLED
       description: Ethernet interface
       physical id: 5
       logical name: virbr0-nic
       serial: 52:54:00:71:a9:c1
       size: 10Mbit/s
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s

“cat /etc/network/interfaces”输出:

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown

“猫/ etc / netplan /.yaml”输出

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s31f6:
      dhcp4: yes
  bridges:
    br0:
      dhcp4: yes
      interfaces:
        - enp0s31f6

此外,当我点击右上角的网络图标时,它会显示“以太网网络设备未管理”

眼镜:

ASUS Maximus XI Hero (No Wi-Fi)
Intel Core i9 9900k @ 3.6Ghz
MSI GEFORCE RTX 2080 Ti
32GB DDR4 Ram @ 2666MHz

答案1

在您的/etc/netplan/01-netcfg.yaml文件中,请将 enp0s31f6 的两个实例更改为 eno1,即您的以太网的新逻辑名称。然后:

sudo netplan generate
sudo netplan apply

您的以太网现在应该可以正常工作了。如果不行,请尝试重新启动。

相关内容