需要使用以太网访问本地网络,使用 Wi-Fi 访问互联网。以太网也可以访问互联网,但这不是必需的。运行 Windows 10。
阅读多篇文章。使用指标更改优先级不允许两个网络都可用。只能使用 Wi-Fi。
通过路由找到解决方案 以太网(内联网)和 Wi-Fi(互联网)同时工作 互联网和 LAN 域网络的 Wi-Fi - 多源 DNS 解析(使用第二个答案)
我的配置是:
Wireless:
Default Gateway: 100.112.96.1
Subnet mask: 255.255.252.0
Wired:
Default Gateway: 172.16.122.1
Subnet mask: 255.255.254.0
===========================================================================
Interface List
4...b8 81 98 7d 1b 8f ......Intel(R) Dual Band Wireless-AC 3165
10...b8 81 98 7d 1b 90 ......Microsoft Wi-Fi Direct Virtual Adapter
9...ec 8e b5 49 43 fc ......Realtek PCIe FE Family Controller
17...00 ff f6 7f 18 4f ......TAP-Windows Adapter V9
12...b8 81 98 7d 1b 93 ......Bluetooth Device (Personal Area Network)
1...........................Software Loopback Interface 1
6...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 100.112.96.1 100.112.98.101 3
100.112.96.0 255.255.252.0 On-link 100.112.98.101 258
100.112.98.101 255.255.255.255 On-link 100.112.98.101 258
100.112.99.255 255.255.255.255 On-link 100.112.98.101 258
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
172.0.0.0 255.255.254.0 172.16.122.1 172.16.123.231 36
172.16.0.0 255.255.254.0 172.16.122.1 172.16.123.231 36
172.16.122.0 255.255.254.0 On-link 172.16.123.231 291
172.16.123.231 255.255.255.255 On-link 172.16.123.231 291
172.16.123.255 255.255.255.255 On-link 172.16.123.231 291
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 100.112.98.101 258
224.0.0.0 240.0.0.0 On-link 172.16.123.231 291
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 100.112.98.101 258
255.255.255.255 255.255.255.255 On-link 172.16.123.231 291
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 100.112.96.1 1
172.16.0.0 255.255.254.0 172.16.122.1 1
===========================================================================
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 331 ::1/128 On-link
4 321 fe80::/64 On-link
9 291 fe80::/64 On-link
4 321 fe80::6db3:1b53:13ba:4f35/128
On-link
9 291 fe80::a460:bc4e:1c8e:1ef1/128
On-link
1 331 ff00::/8 On-link
4 321 ff00::/8 On-link
9 291 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
Wi-Fi 度量设置为 2,当然是为了优先级。删除 0.0.0.0 路由并添加持久路由(上文)后
我可以访问 172.16.0.30,这是默认的 Cyberoam 登录页面,可以使用 Internet,但不能使用任何其他本地地址,例如 172.16.xxx.xxx 等
我还尝试添加 172.0.0.0 的路由,显然没有任何变化
编辑:显然,以太网的 0.0.0.0 允许访问除 172.16.0.30 之外的其他本地地址,添加和删除它也会改变互联网连接。不幸的是,这不可行。