Visitar URL original
Cannot connect GNS3 v2.2.5 to the Windows · Issue #2936 · GNS3/gns3-gui · GitHub
Skip to content

Cannot connect GNS3 v2.2.5 to the Windows #2936

Closed as not planned
Closed as not planned

Description

@v74863

I can connect GNS3 to the Internet when using a local GNS3 server. My topology is exactly as http://docs.gns3.com/1vFs-KENh2uUFfb47Q2oeSersmEK4WahzWX-HrMIMd00/

The router R1 works via dynamips. IPv4 and IPv6 addresses are correctly allocated to the interface f0/0 of R1 by the external DHCP server. Then R1 can ping the default gateway as well as public IP addresses in the Internet. Either IPv4 or IPv6.

GNS3 has installed on physical PC with Windows OS (firewall is disabled). PC can ping the same default gateway and public IP addresses. Either IPv4 or IPv6.

However R1 cannot ping PC itself, despite they both are in the same subnet. Neither IPv4 nor IPv6. For example, currently you cannot copy files from R1 to TFTP-server on host PC.

I have tried GNS3 v2.2.5 with win7, win8 and win10, but got the same result.
Please fix it.

Just for reference, configuration of int f0/0 of R1
!
interface FastEthernet0/0
ip address dhcp
ipv6 address dhcp
ipv6 enable
no shutdown
!

Activity

  1. grossmj commented on Mar 3, 2020

    @grossmj
    Member

    Please try the following:

    Let me know if this works.

  2. modified the milestones: 2.2.6, 2.2.7 on Mar 3, 2020
  3. v74863 commented on Mar 3, 2020

    @v74863
    Author

    No, it still doesn't work.
    Despite the Windows and R1 both know mac-address of each other. They has resolved each other via ARP. Has tested on win7 and win8.1

  4. v74863 commented on Mar 17, 2020

    @v74863
    Author

    I managed to connect GNS3 v2.2.5 to the Windows. Now I can copy files from R1 to TFTP-server of host PC (and back, from TFTP-server to R1). Via either IPv4 or IPv6. It is possible with Microsoft Loopback or Npcap Loopback as Cloud's interface. It seems, Winpcap must be installed. It doesn't work with Npcap.
    Has tested on

    • 64-bit win10, win8.1, win7
    • c7200-adventerprisek9-mz.152-4.M11.bin
    • tftpd64.464
    • WinPcap_4_1_3
    • npcap-0.9987 or npcap-0.9988

    However, Ethernet interface of host PC as Cloud's interface still doesn't work.

  5. grossmj commented on Apr 6, 2020

    @grossmj
    Member

    @v74863 looks like npcap has fixed the issue on their side. Can you confirm please? Thanks 👍

    https://github.com/nmap/npcap/releases/tag/v0.9990

  6. v74863 commented on Apr 6, 2020

    @v74863
    Author

    Hi
    Unfortunately, cannot confirm...
    Has tested GNS3 v2.2.6 on two different physical PCs,
    one with 64-bit windows7 sp1, another with 64-bit windows8.1

    Still the same.

    with WinPcap_4_1_3

    • Microsoft Loopback
      ip address has been resolved by ARP, reachable via PING and TFTP
    • Ethernet adapter
      ip address has been resolved by ARP, but not reachable via PING and TFTP

    with Npcap-0.9990
    ip addresses of both adapters have not been resolved by ARP, not reachable via PING and TFTP

    Besides, Npcap-0.9990 prevents receiving ip address by host PC via DHCP.
    This PC is actually Asus notebook with 64-bit windows7 sp1 and Atheros AR8131 PCI-E Gigabit Ethernet. Another PC with windows8.1 works normally.

  7. dmiller-nmap commented on Apr 6, 2020

    @dmiller-nmap

    Hi, Npcap developer here. Are you choosing "Legacy loopback support" at installation? Does the situation improve if you reinstall without legacy loopback support? Our loopback capture/injection does not use the same code path and probably does not cooperate with this kind of usage, and legacy loopback support forces that code path over the Npcap Loopback Adapter when it is installed. Removing it should enable a more WinPcap-like behavior, while still allowing local loopback capture and injection using the NPF_Loopback capture device.

  8. v74863 commented on Apr 6, 2020

    @v74863
    Author

    Npcap had been installed "by default", without any tweaking, please see attachment.
    Pcap had been installed "by default" also.

    I had tested them separately. It means

    • install Npcap
    • test
    • uninstall Npcap
    • reboot of PC
    • install Pcap
    • test
    • uninstall Pcap
    • reboot of PC
    • etc.

    By the way, I have tested WinPcap_4_1_3 and Npcap-0.9990 on 64-bit windows10 as well.
    I have got the same result.

    Please clarify exactly how Npcap should be installed. May be I did something wrong?

    Npcap09990

  9. dmiller-nmap commented on Apr 7, 2020

    @dmiller-nmap

    Ok, I think I see the problem. There is a subtle difference in how Npcap and WinPcap accomplish the loopback of injected packets.

    Because of its position in the stack as a Protocol driver, WinPcap must set the NDIS_PACKET_TYPE_ALL_LOCAL packet filter in order to see traffic from other protocols (TCP, UDP, etc.). To avoid seeing its own injected traffic, it must further apply a flag, NDIS_FLAGS_DONT_LOOPBACK, to each outgoing packet. This flag is controlled in WinPcap by the PCAP_OPENFLAG_NOCAPTURE_LOCAL option to pcap_open(). Other protocols on the system will still see it because the bottom of the stack sees the NDIS_PACKET_TYPE_ALL_LOCAL filter and sends everything back up.

    As a filter driver, Npcap doesn't need to tell the stack to loop everything back with NDIS_PACKET_TYPE_ALL_LOCAL, so we explicitly filter that out at the pcap/Packet.dll interface. Instead, we set a NDIS 6 flag to loop back injected packets. We capture all injected packets before injecting them, so we ignore the looped-back packets. When the user uses the PCAP_OPENFLAG_NOCAPTURE_LOCAL flag, we don't deliver the captured packet to the originating pcap_t, and we leave off the loopback flag when sending it. This last bit is the problem; we figured that leaving off the loopback flag for NDIS 6 was the same as including the "don't loopback" flag for NDIS 5, but it's not.

    The fix for GNS3 is to avoid using PCAP_OPENFLAG_NOCAPTURE_LOCAL for Npcap 0.9990. Additionally, we will probably (pending research) change this in the next release so that injected packets are always looped back.

    Caveat: NDIS will choose not to loop back the packets if no protocol will see it based on configured addresses and/or promiscuous mode. In other words, packets that ought to route out of the system will do so without looping back unless someone's trying to sniff for them.

  10. grossmj commented on Apr 7, 2020

    @grossmj
    Member

    I will compile uBridge without the PCAP_OPENFLAG_NOCAPTURE_LOCAL flag: https://github.com/GNS3/ubridge/blob/master/src/nio_ethernet.c#L59 and share the binary here.

    However, I understand this could be unnecessary in the next npcap release, is this right? My goal is also to have uBridge work both Npcap and with Wincpap on older Windows versions. (We install Npcap by default for Windows 10 and Winpcap for Windows 7/8).

  11. grossmj commented on Apr 7, 2020

    @grossmj
    Member

    @v74863 here is the modified uBridge version without the PCAP_OPENFLAG_NOCAPTURE_LOCAL flag. Please replace ubridge.exe in the GNS3 installation directory and then test again with Npcap 0.9990 installed.

    https://drive.google.com/file/d/1YI-MDlVsHzSgHQnh1tiqjD4SghdRDJEq/view?usp=sharing

    Thanks 👍

  12. 17 remaining items

  13. modified the milestones: 2.2.10, 2.3 on Jun 6, 2020
  14. v74863 commented on Jul 9, 2020

    @v74863
    Author

    Hi
    Have tested GNS3 v2.2.10 with latest Npcap-0.9994 on Windows 7 SP1 64-bit.
    Still don't work. But it perfectly works with WinPcap_4_1_3.
    It seems, main problem is Npcap itself, not GNS3.

  15. modified the milestones: 2.3, on Jul 22, 2020
  16. v74863 commented on Oct 12, 2020

    @v74863
    Author

    Hi
    I tested GNS3 v2.2.15 with the latest Npcap-1.00 on Win7 SP1 and Win10 (both 64-bit).
    For tests I used topology with one router and two clouds, please see configuration above, in post of April 7.
    Result is the same. So, if you use Dynamips, currently the only way to connect GNS3 to the Windows on host PC is using WinPcap with MS Loopback. WinPcap with Ethernet adapter doesn't work. Npcap doesn't work neither with MS Loopback nor with Ethernet adapter.

    Npcap-1.00

    R1#ping 10.1.0.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
    .....
    Success rate is 0 percent (0/5)
    
    R1#ping 192.168.1.71
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.71, timeout is 2 seconds:
    .....
    Success rate is 0 percent (0/5)
    
    R1#show arp
    Protocol  Address          Age (min)  Hardware Addr   Type   Interface
    Internet  10.1.0.1                0   Incomplete      ARPA
    Internet  10.1.0.2                -   c000.0000.0000  ARPA   FastEthernet0/0
    Internet  192.168.1.71            0   Incomplete      ARPA
    Internet  192.168.1.72            -   c000.0000.001c  ARPA   FastEthernet0/1
    
    

    WinPcap_4_1_3

    R1#ping 10.1.0.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 32/40/48 ms
    
    R1#ping 192.168.1.71
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.71, timeout is 2 seconds:
    .....
    Success rate is 0 percent (0/5)
    
    R1#show arp
    Protocol  Address          Age (min)  Hardware Addr   Type   Interface
    Internet  10.1.0.1                0   0200.0000.0001  ARPA   FastEthernet0/0
    Internet  10.1.0.2                -   c000.0000.0000  ARPA   FastEthernet0/0
    Internet  192.168.1.71            0   0200.0000.0071  ARPA   FastEthernet1/0
    Internet  192.168.1.72            -   c000.0000.001c  ARPA   FastEthernet1/0
    
    

    R1---Clouds

    By the way, the link that open this topic (Connect GNS3 to the Internet) has been changed to
    https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet/

  17. v74863 commented on Oct 19, 2020

    @v74863
    Author

    The only reason why I using GNS3 with Dynamips is simplicity. Probably, this is the simplest way to run the real Cisco IOS on inexpensive low-end PCs. Because issue still open and milestone modified, there is some hope on resolving. I kindly ask developers of GNS3 to shed some light on issue.

  18. grossmj commented on Oct 19, 2020

    @grossmj
    Member

    @v74863 unfortunately this doesn't depend on us, we rely on npcap/winpcap for external connections on Windows. One alternative would be to run the GNS3 VM running with VMware or VirtualBox, external connections are working well out of the box.

  19. v74863 commented on Oct 19, 2020

    @v74863
    Author

    @grossmj Could you clarify whether GNS3 is compiled with the Npcap SDK and, if so, what version? This is the question from nmap/npcap#254

  20. moved this from Triage to TBD in GNS3 trackingon Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions