V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
dw2693734d
V2EX  ›  Linux

Ubuntu Server 更换 cpu 后连不上网络,咋办?

  •  
  •   dw2693734d · 2022-11-15 17:54:22 +08:00 · 1301 次点击
    这是一个创建于 500 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Ubuntu Server 22.04

    把原来的 i3 12100 换成了 i7 12700f 之后, 连不上网络了
    6 条回复    2023-01-30 12:23:46 +08:00
    raysonx
        1
    raysonx  
       2022-11-16 01:46:11 +08:00
    有可能是因为网卡名改变了(比较新的内核是用网卡所在的 PCIe 插槽编号给网卡命名的,比如 enp2s0 表示第 2 个 pcie bus 的第 0 个 slot )。`ip link`看一下新的网卡名字,重新在新的网卡上配置。
    dw2693734d
        2
    dw2693734d  
    OP
       2022-11-16 12:32:54 +08:00
    @raysonx 谢谢大佬,的确是这个问题,原来是 enp3s0, 换了 cpu 后变成了 enp4s0
    dw2693734d
        3
    dw2693734d  
    OP
       2022-11-16 12:33:42 +08:00
    @raysonx

    但是我的网卡所在的插槽没有动啊
    raysonx
        4
    raysonx  
       2022-11-16 12:45:37 +08:00 via iPad
    pcie 控制器在 cpu 内部,具体每个编号分配给哪个插槽都是控制器决定的。
    dw2693734d
        5
    dw2693734d  
    OP
       2022-11-16 12:47:31 +08:00
    @raysonx 原来如此,学习了
    feelinglucky
        6
    feelinglucky  
       2023-01-30 12:23:46 +08:00   ❤️ 1
    更方便的方案是使用 match driver 这种方式,以后就可以避免类似的情况

    参见 https://netplan.io/reference/#properties-for-device-type-ethernets%3A

    下的 Common properties for physical device types 章节
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2749 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 12:45 · PVG 20:45 · LAX 05:45 · JFK 08:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.