AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1353677
Accepted
Frappy
Frappy
Asked: 2021-07-24 11:41:47 +0800 CST2021-07-24 11:41:47 +0800 CST 2021-07-24 11:41:47 +0800 CST

以太网无法连接:“无 IP 配置”

  • 772

经过几个小时的故障排除后,我终于能够与 Windows 一起双启动最新版本的 Kubuntu (21.04)。完全全新安装,没有任何改变,被篡改等。但是,没有互联网。它尝试连接一段时间,但随后失败并出现错误“没有可用的 IP 配置”。在遵循教程并且真的不了解发生了什么之后,我发现 ifap 甚至没有安装。我最好的猜测是,正如一位遇到完全相同问题的人所说,缺少一些 linux 内核头文件。我不知道要安装哪些标头,甚至现在如何安装。我检查了一下,我仍然有包含一些文件的网络文件夹,但是接口文件本身丢失了。据我所知,我从 18.04 起也有 netplan 及以上使用它。不管怎样,我

sudo lshw -C network输出:

*-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: enp7s0
       version: 0c
       serial: e0:d5:5e:6a:e9:11
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.11.0-25-generic duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.1.194 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:18 ioport:d000(size=256) memory:f7100000-f7100fff memory:f2200000-f2203fff

cat /etc/netplan/*.yaml输出:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

dkms status什么都不显示。

networking
  • 1 1 个回答
  • 209 Views

1 个回答

  • Voted
  1. Best Answer
    heynnema
    2021-07-28T07:27:49+08:002021-07-28T07:27:49+08:00

    为 Ubuntu 20.xx 中的某些以太网卡启用了 MSI/MSIX 中断。这可能会导致间歇性以太网操作。这是修复它的补丁。按照嵌入式说明进行安装。

    #!/bin/sh
    
    # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1779817
    #
    # Attached is a work-around for the in-kernel driver that is as unhacky as I can make it.
    
    # filename: r8169_disable_msi
    
    # Drop it in /etc/initramfs-tools/scripts/init-top and chmod a+x it. Add 'r8169_disable_msi'
    # to your kernel command line (/etc/default/grub, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    # usually.) 
    
    # Remember to update-initramfs and update-grub as necessary.
    
    # sudo update-initramfs -c -k $(uname -r)
    # sudo update-grub
    # reboot
    
    # For the moment it disables MSI on everything with the ID 0x10ec:0x8168, as there seems to
    # be no way to get the MAC version from userspace - and certainly not before the driver is
    # loaded. Other PCI IDs may need adding..
    
    # Still hoping we can cherry pick the in-driver workaround for bionic...?
    
    PREREQ=""
    prereqs()
    {
        echo "$PREREQ"
    }
    case $1 in
    # get pre-requisites
    prereqs)
        prereqs
        exit 0
        ;;
    esac
    
    disable_msi () {
        for i in /sys/bus/pci/devices/*; do 
            if [ $(cat $i/vendor) = "0x10ec" -a $(cat $i/device) = "0x8168" ]; then
                echo 0 >$i/msi_bus
            fi
        done
    }
    
    for x in $(cat /proc/cmdline); do
            case ${x} in
            r8169_disable_msi)
            disable_msi
            break
                    ;;
            esac
    done
    
    • 0

相关问题

  • 如何设置 VLAN 转发?

  • 如何将主机 Ubuntu 上的 VPN (tun0) 网络适配器映射到 VirtualBox 来宾 Windows?

  • 如何限制下载/上传带宽?

  • 如何通过 Windows 网络共享文件?

  • 面板小程序以文本形式显示当前网络流量?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve