连接以太网端口时 wifi 不工作 ubuntu 服务器,同时操作互联网(wifi)和 LAN(eth)

连接以太网端口时 wifi 不工作 ubuntu 服务器,同时操作互联网(wifi)和 LAN(eth)

我搜索过同样的问题,也发现一些类似的问题,但没有一个解决方案对我有用。

我有一台运行 ubuntu server 22.04.3 的电脑,它的 wifi 适配器设置为

192.168.1.111

我可以通过 SSH 达到上述目的,一切正常。

我使用以下地址建立了一个以太网连接,IP 地址为 192.168.2.22

/etc/netplan/50-cloud-init.yaml

我有一台带 192.168.2.64 的相机

当我通过 wifi 连接并连接以太网线时,它会断开 wifi 连接并保持断开状态。

目前我正在通过以太网使用 ssh 连接,但我需要能够访问互联网。

所以我尝试过,

检查 bios 中与 wifi/以太网相关的任何内容,没有任何可关联的设置。

检查了网络管理器中 ipv4 选项卡下的路由,以便选项“仅将此连接用于其自身网络上的资源”检查了连接文件

[connection]
id=Ethernet connection 1
uuid=8eac2307-8e13-4dca-ae46-d45552704db5
type=ethernet
interface-name=enp2s0

[ethernet]
mac-address=64:00:6A:16:A5:66

[ipv4]
address1=192.168.2.22/24
method=manual
never-default=true

[ipv6]
addr-gen-mode=stable-privacy
method=ignore

[proxy]

配置以太网静态地址时,我没有配置默认网关,因为它告诉我网关与“从不默认”不兼容

我已经将WIFI连接的优先级提高多了。

我还应该尝试其他什么故障排除方法吗?

是否配置

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:99ff:fea7:7a72  prefixlen 64  scopeid 0x20<link>
        ether 02:42:99:a7:7a:72  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 43  bytes 6487 (6.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.22  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::6600:6aff:fe16:a566  prefixlen 64  scopeid 0x20<link>
        ether 64:00:6a:16:a5:66  txqueuelen 1000  (Ethernet)
        RX packets 709  bytes 68874 (68.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 567  bytes 67735 (67.7 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 228  bytes 20303 (20.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 228  bytes 20303 (20.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vetha1df66d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::9476:cbff:fe3f:7c70  prefixlen 64  scopeid 0x20<link>
        ether 96:76:cb:3f:7c:70  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 10522 (10.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.111  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f70b:d185:5201:b9f2  prefixlen 64  scopeid 0x20<link>
        ether a4:c4:94:38:f2:de  txqueuelen 1000  (Ethernet)
        RX packets 240  bytes 22054 (22.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 86  bytes 11016 (11.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

当使用 GUI 登录时,以太网连接显示从未使用过,即使我使用它通过 SSH 连接到服务器。

etherner 从来没用过?

ip 作为-

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: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 64:00:6a:16:a5:66 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.110/24 brd 192.168.1.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet 192.168.2.22/24 brd 192.168.2.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::6600:6aff:fe16:a566/64 scope link
       valid_lft forever preferred_lft forever
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a4:c4:94:38:f2:de brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.111/24 brd 192.168.1.255 scope global noprefixroute wlp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::f70b:d185:5201:b9f2/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:04:6a:8b:e6 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:4ff:fe6a:8be6/64 scope link
       valid_lft forever preferred_lft forever
6: veth45f0596@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether ba:4b:4b:c8:ae:df brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::b84b:4bff:fec8:aedf/64 scope link
       valid_lft forever preferred_lft forever

ip rs-

default via 192.168.1.1 dev wlp3s0 proto static metric 600
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
192.168.1.0/24 dev wlp3s0 proto kernel scope link src 192.168.1.111 metric 600
192.168.2.0/24 dev enp2s0 proto kernel scope link src 192.168.2.22

192.168.1.110/24 是我之前用于以太网 NIC 的 IP 地址。我已将其删除,但问题仍然存在。

还有另一条路由供 wifi 和以太网到网关,我删除了以太网路由。

相关内容