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

Ubuntu 22.10桌面版RTL8125 2.5GbE网卡无IPv4地址、无法联网的问题排查求助

Ubuntu 22.10桌面版RTL8125 2.5GbE网卡无IPv4地址、无法联网的问题排查求助

各位大佬好,我刚新装了Ubuntu 22.10,重启之后以太网完全没网,只能临时用旧WiFi棒凑活。我自己做了一些排查,情况如下:

首先我查了网卡硬件和当前驱动:

~$ lspci -nnk | grep -iA2 net
0f:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
Subsystem: ASRock Incorporation RTL8125 2.5GbE Controller [1849:8125]
Kernel driver in use: r8169

接着看网络接口状态:

~$ ip l show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp15s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether a8:a1:59:ec:ba:7d brd ff:ff:ff:ff:ff:ff
9: wlxaca2137f9bfa: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether ac:a2:13:7f:9b:fa brd ff:ff:ff:ff:ff:ff

用ifconfig查看地址情况,发现以太网接口只有IPv6地址,没有IPv4地址:

~$ ifconfig
enp15s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet6 2a02:810d:12c0:2758:aaa1:59ff:feec:ba7d  prefixlen 64  scopeid 0x0<global>
inet6 fe80::aaa1:59ff:feec:ba7d  prefixlen 64  scopeid 0x20<link>
ether a8:a1:59:ec:ba:7d  txqueuelen 1000  (Ethernet)
RX packets 46579  bytes 40502901 (40.5 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 22370  bytes 4855246 (4.8 MB)
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 26380  bytes 2292970 (2.2 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 26380  bytes 2292970 (2.2 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlxaca2137f9bfa: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 192.168.0.106  netmask 255.255.255.0  broadcast 192.168.0.255
inet6 2a02:810d:12c0:2758:aa8c:be9f:e0ff:b362  prefixlen 64  scopeid 0x0<global>
inet6 2a02:810d:12c0:2758:e4a7:abbe:7116:ac05  prefixlen 64  scopeid 0x0<global>
inet6 2a02:810d:12c0:2758:21ee:a417:25a7:28e5  prefixlen 128  scopeid 0x0<global>
inet6 fe80::51dd:9aeb:5494:b7ef  prefixlen 64  scopeid 0x20<link>
ether ac:a2:13:7f:9b:fa  txqueuelen 1000  (Ethernet)
RX packets 79599  bytes 97671453 (97.6 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 48421  bytes 6691084 (6.6 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

而且我的WiFi路由器里明明显示这个以太网网卡已经分配了IPv4地址:

Name: a8:a1:59:ec:ba:7d
IPv4: 192.168.0.80
IPv6: 2a02:810d:12c0:2758:5884:f3e5:1af4:20ca
MAC: a8:a1:59:ec:ba:7d
Geschwindigkeit: 1 Gbps

我以为是IPv6的问题,试着关闭IPv6:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

但完全没用,关闭后ifconfig显示以太网接口连IPv6都没了,还是没IPv4:

~$ ifconfig
enp15s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
ether a8:a1:59:ec:ba:7d  txqueuelen 1000  (Ethernet)
RX packets 47466  bytes 40630730 (40.6 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 22423  bytes 4864695 (4.8 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

后来我看到有人说RTL8125不该用r8169驱动,于是把r8169加入黑名单:

echo "blacklist r8169" | sudo tee /etc/modprobe.d/blacklist_r8169.conf

结果更糟,网卡直接不显示了:

~$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
ether 02:42:64:99:78:2d  txqueuelen 0  (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

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 322  bytes 26855 (26.8 KB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 322  bytes 26855 (26.8 KB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我查了模块关联,发现系统确实把RTL8125绑定到r8169了:

~$ modprobe -c | grep 8125 | grep 10EC
alias pci:v000010ECd00008125svsdbcsci* r8169

后来试了用dhclient手动请求IPv4:

dhclient -4 enp15s0

居然能上网了!ifconfig显示拿到了IPv4地址:

enp15s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 192.168.0.80  netmask 255.255.255.0  broadcast 192.168.0.255
inet6 2a02:810d:12c0:2758:aaa1:59ff:feec:ba7d  prefixlen 64  scopeid 0x0<global>
inet6 fe80::aaa1:59ff:feec:ba7d  prefixlen 64  scopeid 0x20<link>
ether a8:a1:59:ec:ba:7d  txqueuelen 1000  (Ethernet)
RX packets 18089  bytes 11957535 (11.9 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 7174  bytes 755765 (755.7 KB)
TX errors 8  dropped 0 overruns 0  carrier 0  collisions 0

看syslog里的dhclient日志,确实成功拿到了地址:

tail -200 /var/log/syslog | grep dhclient
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: xid: rand init seed (0x63d1fc16) built using gethostid
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: DHCPDISCOVER on enp15s0 to 255.255.255.255 port 67 interval 3 (xid=0xc0ef4636)
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: DHCPOFFER of 192.168.0.80 from 192.168.0.1
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: DHCPREQUEST for 192.168.0.80 on enp15s0 to 255.255.255.255 port 67 (xid=0x3646efc0)
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: DHCPACK of 192.168.0.80 from 192.168.0.1 (xid=0xc0ef4636)
Dec 30 15:00:39 gandalf-the-white dhclient[42914]: bound to 192.168.0.80 -- renewal in 286134 seconds.

现在我疑惑的是,是不是驱动用错了?或者为什么系统不能自动获取IPv4地址,必须手动用dhclient?有没有大佬能帮忙解决这个问题?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.23 09:07:42