我有一台通过有线和无线连接到网络的PC。当然,它有2个IP地址:192.168.5.111和192.168.5.112。(子网掩码255.255.255.0)
像往常一样,PC选择有线IP(192.168.5.111)作为其主IP,而无线IP几乎被“ 禁用 ”。这意味着:
1/ No other PC could ping to the wireless IP
2/ No other PC could make a TCP connection to wireless IP.
3/ When I broadcast to "192.168.5.255" or send any UDP packet, the recipients never
see that sender's address as the wireless IP
这是预期的行为。奇怪的是,当我拔下电缆去掉有线网络时。
1/ Other PCs could now ping my wireless IP
2/ Other PCs could now make TCP connection to wireless IP
3/ BUT : When I broadcasted to "192.168.5.255", no other PC in LAN received my packet.
When other PCs broadcasted to "192.168.5.255", my PC received nothing as well.
我尝试播放“255.255.255.255”,事情按预期工作。但是,收件人将我的IP视为192.168.5.111(未插入的IP)而不是 192.168.5.112(我的无线IP)。另一方面,我知道很多专家推荐的“255.255.255.255”广播并不是一个好的解决方案。
当我打开网络设备并禁用“以太网(有线)”设备时,我已经走了一步。之后我可以做No.3 /并按预期工作。
所以我的问题是:我的有线连接是否缓存在我的PC中,如果没有禁用有线设备,我无法通过无线IP正常广播?有没有解决方法来解决这个问题?
实用数据:
当我启用网络适配器(有线和无线)时,这是routeTable:
===========================================================================
Interface List
11...5c ff 35 0b d8 34 ......Atheros AR8131 PCI-E Gigabit Ethernet Controller
14...00 26 82 a5 62 82 ......Broadcom 802.11n Network Adapter
1...........................Software Loopback Interface 1
12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.5.1 192.168.5.102 30
0.0.0.0 0.0.0.0 192.168.5.1 192.168.5.104 20
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
192.168.5.0 255.255.255.0 On-link 192.168.5.102 286
192.168.5.0 255.255.255.0 On-link 192.168.5.104 276
192.168.5.102 255.255.255.255 On-link 192.168.5.102 286
192.168.5.104 255.255.255.255 On-link 192.168.5.104 276
192.168.5.255 255.255.255.255 On-link 192.168.5.102 286
192.168.5.255 255.255.255.255 On-link 192.168.5.104 276
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 192.168.5.102 286
224.0.0.0 240.0.0.0 On-link 192.168.5.104 276
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 192.168.5.102 286
255.255.255.255 255.255.255.255 On-link 192.168.5.104 276
===========================================================================
当我拔下有线网络的电缆时,这是routeTable:
===========================================================================
Interface List
11...5c ff 35 0b d8 34 ......Atheros AR8131 PCI-E Gigabit Ethernet Controller
14...00 26 82 a5 62 82 ......Broadcom 802.11n Network Adapter
1...........................Software Loopback Interface 1
12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.5.1 192.168.5.102 30
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
192.168.5.0 255.255.255.0 On-link 192.168.5.102 286
192.168.5.102 255.255.255.255 On-link 192.168.5.102 286
192.168.5.255 255.255.255.255 On-link 192.168.5.102 286
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 192.168.5.102 286
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 192.168.5.102 286
===========================================================================
route print
),以便在拔下插头时检查它是否看起来不正确。此外,通过以太网连接时“禁用”的WiFi绝不是正常的。