以太网(内联网)和 Wi-Fi(互联网)同时工作

以太网(内联网)和 Wi-Fi(互联网)同时工作

我已经看到了几个关于此的问题,但我的网络知识非常有限,以至于无法让这些解决方案为我所用。

我正在尝试连接到内部网,以便可以导航到内部站点(例如 Sharepoint 等),但我还需要能够通过 Wi-Fi 连接(即 3G Mi-Fi)访问互联网。

现在的情况是,当我同时插入以太网电缆和 Wi-Fi 时,我的互联网可以使用,但我无法访问内联网。在两者之间切换确实非常麻烦。

我的网络详细信息如下(不确定还需要哪些其他详细信息?):

无线的:

Default Gateway: 192.168.1.1
IPv4 Address: 192.168.1.102 (preferred)
Subnet mask: 255.255.255.0
DNS: 192.168.1.1

有线:

Default Gateway: 172.23.42.1
IPv4 Address: 172.23.42.165 (preferred)
Subnet mask: 255.255.255.0
DNS: 172.24.130.12

我的操作系统是Windows 7。

编辑-附加信息:

===========================================================================
Interface List
15...60 67 20 52 19 f8 ......Intel(R) Centrino(R) Advanced-N 6205
19...60 67 20 52 19 f9 ......Microsoft Virtual WiFi Miniport Adapter #2
16...60 67 20 52 19 f9 ......Microsoft Virtual WiFi Miniport Adapter
14...d4 be d9 6a 63 f0 ......Broadcom NetXtreme 57xx Gigabit Controller
18...74 e5 43 54 5d a4 ......Bluetooth Device (Personal Area Network)
 1...........................Software Loopback Interface 1
26...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
11...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
25...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #8
===========================================================================

IPv4 Route Table
===========================================================================
 Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
        0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.101    281
        0.0.0.0          0.0.0.0      172.23.42.1    172.23.42.164    276
      127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
      127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
    172.23.42.0    255.255.255.0         On-link     172.23.42.164    276
  172.23.42.164  255.255.255.255         On-link     172.23.42.164    276
  172.23.42.255  255.255.255.255         On-link     172.23.42.164    276
    172.23.45.0    255.255.255.0      172.23.42.1    172.23.42.164     21
    192.168.1.0    255.255.255.0         On-link     192.168.1.101    281
  192.168.1.101  255.255.255.255         On-link     192.168.1.101    281
  192.168.1.255  255.255.255.255         On-link     192.168.1.101    281
      224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
      224.0.0.0        240.0.0.0         On-link     172.23.42.164    276
      224.0.0.0        240.0.0.0         On-link     192.168.1.101    281
255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
255.255.255.255  255.255.255.255         On-link     172.23.42.164    276
255.255.255.255  255.255.255.255         On-link     192.168.1.101    281
===========================================================================
Persistent Routes:
Network Address          Netmask  Gateway Address  Metric
  172.23.45.0    255.255.255.0      172.23.42.1       1
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination      Gateway
 1    306 ::1/128                  On-link
14    276 fe80::/64                On-link
15    281 fe80::/64                On-link
14    276 fe80::7d76:b186:8068:d63a/128
                                On-link
15    281 fe80::d0f1:717e:6cbb:fa95/128
                                On-link
 1    306 ff00::/8                 On-link
14    276 ff00::/8                 On-link
15    281 ff00::/8                 On-link
===========================================================================
Persistent Routes:
None

请指教。

答案1

您需要为内网网络添加静态路由。

示例:(来自 CMD 框)

route add 172.23.45.0 mask 255.255.255.0 172.23.42.1 -p

172.23.45.0 是您想要访问的网络。172.23.42.1 是带您到达那里的网关。-p 使其持久,在您重新启动计算机后它将保留。

答案2

我认为您的问题是您有两条默认路由(0.0.0.0)。

所以我很清楚,你的互联网连接是通过无线接口(192.168.1.x/24)并且您的内联网是通过有线接口(172.23.42.x/24)。对吗?我进一步假设您的内部网完全存在于172.23.42.x/24然后172.23.45.x实际上并不存在。(不确定 @Cesar 从哪里得到这个信息)。注意:'/24' 注释是 24 位网络掩码的简写,或者255.255.255.0

假设上述内容准确,则需要删除内网接口的默认路由。

route delete 0.0.0.0 mask 255.255.255.0 172.23.42.1

从您的路由表中,以下路由负责将内联网流量传送到正确的位置:

172.23.42.0    255.255.255.0         On-link     172.23.42.164    276

相关内容