You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04服务器重启后网络彻底故障排查求助

Ubuntu 22.04服务器重启后网络彻底故障排查求助

我这台Ubuntu 22.04服务器的网络问题已经困扰我好一阵子了——每次重启后,网络时不时就会彻底罢工。之前折腾一下网络配置文件,总能把它救回来,但今天试遍了所有办法都没用。

目前所有配置看起来都没问题,之前一直能从本地笔记本通过SSH连接,但现在连SSH连不上,ping任何主机都失败,甚至ping localhost也不行。我试过静态IP(平时用的就是静态),也切换过动态IP——DHCP确实分配了地址,但还是没用。现在切回了静态IP,下面是我收集的一些信息:

netplan配置文件(/etc/netplan/*.yaml)

network:
  version: 2
  ethernets:
    ens160:
      dhcp4: false
      addresses: [192.168.0.20/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [192.168.0.1, 8.8.8.8]

netplan --debug apply执行输出

DEBUG:command apply: running ['/lib/netplan/generate']
DEBUG:generate: processing input file /etc/netplan/00-installer-config.yaml..
DEBUG:generate: starting new processing pass
DEBUG:NetworkManager: definition ens160 is not for us (backend is networkd)
DEBUG:ens160: setting default backend to networkd
DEBUG:generating output files..
DEBUG:networkd: generated netplan-ens160.network
DEBUG:command apply: executing: ['systemctl', 'stop', '--no-block', 'systemd-networkd.service', 'NetworkManager.service']
DEBUG:command apply: executing: ['systemctl', 'start', 'systemd-networkd.service']
DEBUG:command apply: waiting for systemd-networkd to start
DEBUG:command apply: executing: ['networkctl', 'reload']
DEBUG:command apply: successfully applied configuration

netplan status输出

WARNING:root:Cannot call networkctl: Unit dbus-org.freedesktop.network1.service not found.
WARNING:root:Networkd is not running, output will be incomplete.

/etc/resolv.conf内容

# Generated by NetworkManager
nameserver 127.0.0.53
options edns0 trust-ad
search .

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
2: ens160: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:50:56:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.20/24 brd 192.168.0.255 scope global ens160
       valid_lft forever preferred_lft forever

ip route输出

192.168.0.0/24 dev ens160 proto kernel scope link src 192.168.0.20

arp输出

Address                  HWtype  HWaddress           Flags Mask            Iface

ping测试情况

不管是ping localhost、127.0.0.1、网关192.168.0.1还是公共DNS8.8.8.8,命令都会直接卡住,没有任何响应或错误提示。

同一台VMware ESXi上的其他虚拟机都正常工作,只有这台出问题。实在搞不懂哪里出问题了,有没有大佬能给点排查思路?万分感谢!

备注:内容来源于stack exchange,提问作者Yoshi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 06:53:02