USB 以太网连接时 Wi-Fi 断开连接

USB 以太网连接时 Wi-Fi 断开连接

正如标题所述,只要 USB 以太网连接,WiFi 就会断开连接。我的以太网连接提供互联网,WiFi 可访问 LAN。去年它一直正常工作,但突然停止了。

以下是以下命令的输出:

$ nmcli device 
DEVICE             TYPE      STATE         CONNECTION         
enxc84bd6b25f34    ethernet  connected     Wired connection 1 
wlp0s20f3          wifi      connected     TeamX              
p2p-dev-wlp0s20f3  wifi-p2p  disconnected  --                 
enp0s31f6          ethernet  unavailable   --                 
lo                 loopback  unmanaged     --    

$ ip route
default via 192.168.10.254 dev enxc84bd6b25f34 proto dhcp metric 100 
default via 192.168.10.1 dev wlp0s20f3 proto static metric 600 
169.254.0.0/16 dev wlp0s20f3 scope link metric 1000 
192.168.10.0/24 dev enxc84bd6b25f34 proto kernel scope link src 192.168.10.49 metric 100 
192.168.10.0/24 dev wlp0s20f3 proto kernel scope link src 192.168.10.70 metric 600 

$ ifconfig
enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 98:fa:9b:c7:8e:8a  txqueuelen 1000  (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
        device interrupt 16  memory 0xea200000-ea220000  

enxc84bd6b25f34: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.49  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 fe80::83ed:489a:d913:a39b  prefixlen 64  scopeid 0x20<link>
        ether c8:4b:d6:b2:5f:34  txqueuelen 1000  (Ethernet)
        RX packets 2134636  bytes 154615983 (154.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4394247  bytes 6207313755 (6.2 GB)
        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 11709  bytes 1420993 (1.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11709  bytes 1420993 (1.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.70  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 fe80::6ed:33ff:fe3e:beb7  prefixlen 64  scopeid 0x20<link>
        ether 04:ed:33:3e:be:b7  txqueuelen 1000  (Ethernet)
        RX packets 154  bytes 15241 (15.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 611  bytes 142753 (142.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

有任何想法吗?

答案1

问题是您的 wifi 和以太网位于同一子网。wifi 实际上并未被丢弃,而是被降低了优先级。

您有两条到 192.168.10.0/24 的路由和两条默认路由。

您可能能够通过调整两条路线的优先级来解决此问题。

如果这些实际上是独立的网络,则您应该更改其中一个的子网地址,使它们不同。 (即 192.168.1.x)(如果这样做,您必须为该网络上的每个设备更改它,而不仅仅是您的计算机。)

相关内容