Ubuntu 16.04 有线和无线连接路由器时出现问题

Ubuntu 16.04 有线和无线连接路由器时出现问题

我正在运行 Ubuntu 16.04。我的网络设置非常简单,一个带有 wifi 和有线连接的路由器。我可以使用 wifi 或以太网分别连接到路由器,并且两者都运行良好。但是,当我同时连接两者时,互联网停止工作并且页面停止加载。我曾尝试在线查找类似的问题,但大多数人都试图连接到不同的网络。我的情况似乎很简单,但我一直找不到解决方案。非常感谢任何帮助。

Working LAN Only:
$ ip addr
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: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c8:5b:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.164/24 brd 192.168.1.255 scope global enp0s31f6
       valid_lft forever preferred_lft forever
    inet6 fe80::6916:d619:b127:b0a7/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether e4:a4:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ff:4a:f3:d0 brd ff:ff:ff:ff:ff:ff

$ ip route
default via 192.168.1.1 dev enp0s31f6  proto static  metric 100 
169.254.0.0/16 dev enp0s31f6  scope link  metric 1000 
192.168.1.0/24 dev enp0s31f6  proto kernel  scope link  src 192.168.1.164  metric 100 

Working Wifi Only:
$ ip addr
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: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c8:5b:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:a4:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.163/24 brd 192.168.1.255 scope global wlp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::631:b92:a78:cc61/64 scope link 
       valid_lft forever preferred_lft forever
4: docker0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ff:4a:f3:d0 brd ff:ff:ff:ff:ff:ff

$ ip route
default via 192.168.1.1 dev wlp1s0  proto static  metric 600 
169.254.0.0/16 dev wlp1s0  scope link  metric 1000 
192.168.1.0/24 dev wlp1s0  proto kernel  scope link  src 192.168.1.163  metric 600 

Non-working Wifi and LAN
$ ip addr
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: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c8:5b:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.164/24 brd 192.168.1.255 scope global enp0s31f6
       valid_lft forever preferred_lft forever
    inet6 fe80::6916:d619:b127:b0a7/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:a4:ff:aa:bb:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.163/24 brd 192.168.1.255 scope global wlp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::631:b92:a78:cc61/64 scope link 
       valid_lft forever preferred_lft forever
4: docker0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ff:4a:f3:d0 brd ff:ff:ff:ff:ff:ff

$ ip route
default via 192.168.1.1 dev enp0s31f6  proto static  metric 100 
default via 192.168.1.1 dev wlp1s0  proto static  metric 600 
169.254.0.0/16 dev enp0s31f6  scope link  metric 1000 
192.168.1.0/24 dev enp0s31f6  proto kernel  scope link  src 192.168.1.164  metric 100 
192.168.1.0/24 dev wlp1s0  proto kernel  scope link  src 192.168.1.163  metric 600

答案1

网络设计中不希望同一子网上有多个接口。

即使您设置了接口以使用静态路由,其他设备也不会知道您的设备设置。因此,您的设备在一个接口上发送数据包,其他设备则不关心,它们的数据包不会定向到特定接口,而只是 IP。因此,传入的数据包在哪个接口接收它们是不确定的。

更多信息检查如何连接同一子网上的两个网络接口?但不是规范答案。

我不是专家,但多次经历过这种情况。这比同一网络上的重复 IP 更常见。让每个应用程序都知道(两组 IP/DEV)在一个上发送并在两个上接收似乎很困难。

一些笔记本电脑制造商在 BIOS/UEFI 固件中实现了一项功能,如果检测到有线接口处于打开状态(直接电缆或通过扩展坞),则自动关闭 Wifi(WLAN)/MobileData(WWAN)接口。

至少,我在 Dell Precision/Latitude 上使用它。Dell 中的设置:以太网连接时无线功能被禁用

相关内容