Windows 7 或 8 中的两个环回适配器通信

Windows 7 或 8 中的两个环回适配器通信

一旦我们的开发系统从 Windows XP 升级到 Windows 7,我的调试设置就停止工作了。
原始设置(Windows XP)中遵循的步骤:

  1. 添加两个环回适配器
  2. 将 ipv4 172.16.16.1 分配给一个适配器,将 172.16.24.1 地址分配给另一个适配器
  3. 启动一个 Java 应用程序(源代码在我们这里),它将绑定到 172.16.24.1 地址
  4. 启动另一个 Java 应用程序(源代码是不是与我们一起),它将绑定到 172.16.16.1

两个应用程序将在同一台机器上运行,并且它们将开始相互通信。一切正常!
我在 Windows 7 和 Windows 8 中遵循了类似的程序,但没有奏效。
我捕获了两个环回适配器的 wireshark 日志,每个适配器的一个数据包如下:

172.16.16.1


Frame 58: 42 bytes on wire (336 bits), 42 bytes captured (336 bits) on interface 0
    Interface id: 0 (\Device\NPF_{6643679F-0401-414D-836C-1DAF07029D29})
    Encapsulation type: Ethernet (1)
    Arrival Time: Dec 29, 2015 16:10:34.776507000 India Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1451385634.776507000 seconds
    [Time delta from previous captured frame: 1.277163000 seconds]
    [Time delta from previous displayed frame: 1.277163000 seconds]
    [Time since reference or first frame: 57.308582000 seconds]
    Frame Number: 58
    Frame Length: 42 bytes (336 bits)
    Capture Length: 42 bytes (336 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:arp]
    [Coloring Rule Name: ARP]
    [Coloring Rule String: arp]
Ethernet II, Src: 172.16.16.1 (02:00:4c:4f:4f:50), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
    Source: 172.16.16.1 (02:00:4c:4f:4f:50)
    Type: ARP (0x0806)
Address Resolution Protocol (request)
    Hardware type: Ethernet (1)
    Protocol type: IPv4 (0x0800)
    Hardware size: 6
    Protocol size: 4
    Opcode: request (1)
    Sender MAC address: 172.16.16.1 (02:00:4c:4f:4f:50)
    Sender IP address: 172.16.16.1 (172.16.16.1)
    Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)
    Target IP address: 172.16.24.1 (172.16.24.1)

172.16.24.1


Frame 31: 138 bytes on wire (1104 bits), 138 bytes captured (1104 bits) on interface 0
    Interface id: 0 (\Device\NPF_{4D43D976-8431-4537-B619-E810440F0221})
    Encapsulation type: Ethernet (1)
    Arrival Time: Dec 29, 2015 15:53:53.591436000 India Standard Time
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1451384633.591436000 seconds
    [Time delta from previous captured frame: 2.500999000 seconds]
    [Time delta from previous displayed frame: 2.500999000 seconds]
    [Time since reference or first frame: 72.662379000 seconds]
    Frame Number: 31
    Frame Length: 138 bytes (1104 bits)
    Capture Length: 138 bytes (1104 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:udp:adwin_config]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Ethernet II, Src: 172.16.16.1 (02:00:4c:4f:4f:50), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
        Address: Broadcast (ff:ff:ff:ff:ff:ff)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
    Source: 172.16.16.1 (02:00:4c:4f:4f:50)
        Address: 172.16.16.1 (02:00:4c:4f:4f:50)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 172.16.24.1 (172.16.24.1), Dst: 172.16.255.255 (172.16.255.255)
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
    Total Length: 124
    Identification: 0x0c2a (3114)
    Flags: 0x00
        0... .... = Reserved bit: Not set
        .0.. .... = Don't fragment: Not set
        ..0. .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 128
    Protocol: UDP (17)
    Header checksum: 0xbe25 [validation disabled]
        [Good: False]
        [Bad: False]
    Source: 172.16.24.1 (172.16.24.1)
    Destination: 172.16.255.255 (172.16.255.255)
    [Source GeoIP: Unknown]
    [Destination GeoIP: Unknown]
User Datagram Protocol, Src Port: 57488 (57488), Dst Port: 57488 (57488)
    Source Port: 57488
    Destination Port: 57488
    Length: 104
    Checksum: 0x662b [validation disabled]
        [Good Checksum: False]
        [Bad Checksum: False]
    [Stream index: 0]
ADwin configuration protocol
    Pattern: Unknown (0x5359434e)
    Reboot: False
    MAC address: 39:3e:c2:5d:00:00 (39:3e:c2:5d:00:00)
    Unused
    Unused

有人可以指出我解决这个问题的方法吗?

相关内容