nmap / npcap

Nmap Project's Windows packet capture and transmission library
https://npcap.com
Other
2.91k stars 509 forks source link

Problem using Npcap wiht GNS3 and Dynamips #254

Open v74863 opened 3 years ago

v74863 commented 3 years ago

Hi Npcap claims compatibility with WinPcap. However, in my case WinPcap works, while Npcap doesn't.

In short, if you use Dynamips, the only way to connect GNS3 to the Windows on host PC is using WinPcap with Microsoft Loopback adapter. Npcap doesn't work neither with MS Loopback nor with Ethernet adapter. Please see https://github.com/GNS3/gns3-gui/issues/2936

Could you kindly comment this issue? it seems, Npcap isn't 100%-compatible with Winpcap.

P.S. Please note, Uninstall doesn't remove Npcap-1.00 directory completely. Still need manually delete Npcap directory in C:\Program Files

fyodor commented 3 years ago

Just as a clarification, Npcap is Winpcap-compatible at an API level. You should be able to just recompile software without changes using the Npcap SDK. If you're using 3rd party software that was already compiled using the WinPcap SDK (which hasn't been updated in more than 7 years), those 3rd party software binaries may not work perfectly (or at all) with Npcap. The best solution is to ask the software author to compile with Npcap SDK (available from https://npcap.org). If they can't do that, you might actually have better luck using an older Npcap (those were also compiled with older compilers and such) or just using WinPcap if that still works for you.

Your specific issue may be something different, but it would be helpful to at least know whether GNS3 is compiled with the Npcap SDK and, if so, what version. It also might depend on what options you specify during GNS3 installation.

I will update the title to something useful and keep this issue open for a while in case anyone else has feedback related to the Npcap, GNS3, and Dynamips combination.

v74863 commented 3 years ago

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.

dias-yelgonov commented 3 years ago

I usually install Npcap with Wireshark (3.4.0). Last time I spent a whole week to find the nature of problem. OS: Win 10 x64 (2004 Build 19041.572) up to date, VMware Workstation, GNS3/EVE/Any VM with Host-only/NAT adapter(-s). Situation:

  1. Run ping between Host and VM with Host-only/NAT adapter - Everyrthing OK.
  2. You have installed Wireshark with Npcap (1.0.0) adn reboot PC. (e.g. for GNS3/Eve Labs) - Still ok, ping is till working.
  3. !!!Shutdown!!! PC. Turn it on. Run ping between Host and VM - Here is the problem. Destination Host Unreachable or Reqeusted Timed out. Ofc you can't ssh to the VM or any other actions like ping/sftp/etc.
  4. Fix for step #3. Turn off and on VMware Net adapter. Now it's pinging and VM is reachable. !!!OR!!! (Little magic for me) run Wireshark and try to sniff the traffic from VMnet adapter and after several seconds it will work.
  5. Repeat: !!!Shutdown!!! the PC. Turn on. Try to ping/ssh Vm = Fail. (if you reboot the pc after step #4 - it will still work)
  6. Fix for me: Wireshark installation without Npcap. Because when I've isntalled wireshark with Npcap with every options combination (legacy/winpcap mode/ etc.) the result will be the same = no ping/ssh. What I also tried while looking for a solutiong (inefficiently) :
    • Restore Windows Network Configs
    • Update Win Ver/Downgrade Win Ver/Install Fresh Win 10
    • Restore VMware WS network Configs
    • Reinstall VMware WS
v74863 commented 3 years ago

@fyodor Hi Developers keep silence, so I decided to look into sourses by myself. It looks like dynamips-0.2.17 and ubridge-0.9.14 never heard about Npcap. Dynamips is required for running IOS routers (using real IOS images), uBridge interconnects the nodes. As dependencies they use WinPcap on Windows (please see README in https://github.com/GNS3/gns3-gui/releases/download/v2.2.17/GNS3-2.2.17.source.zip). It seems, GNS3 just rely on dynamips and uBridge for external connections on Windows. I'm not a developer, could you try to recompile dynamips and uBridge with Npcap SDK? Merry Christmas and Happy New Year!