Unstable NAT Routing with WLAN and VMWare

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Unstable NAT Routing with WLAN and VMWare

Postby BlueBerry » Oct 22 23 7:35 am

I am testing the NAT-Routing feature of WinGate, and I have some trouble with NAT-routing to external networks that are connected via WIFI / WLAN network adapter.
NAT-Routing to external network connected with WLAN is only working short time after system startup (about 1 minute), is very unstable and fails reproducable. Altough NAT-activity is shown and recorded in the Activity monitor, after some time no IP-Pings are sucessful to external networks from WLAN-connections. Before they are working well.

Restarting the WinGate Engine or the Windows „qbit WinGate Engine“ service is not helping. When deactivating the WLAN-Adapter in the windows controls an re-activating it, it is again working for a short time. Same with restarting Windows.
The second ‚external‘ connection with Ethernet cable is working stable, so I think the general IP settings, routing tables etc.are correct.
The Problem is reproducable if a replace the USB Ethernet adapter with another USB WLAN Adapter and connect to Dlink Router Wifi.
Unfortunetaly I don't have enough equipment to test on a physical host.

Setup Overview:
Client 1 (Source): Host PC
VMWare Net 2 Virtual Interface, IP 192.168.100.98, Gateway 192.168.100.5 (static)


WinGate PC: VMWare Virtual Machine
VMWare Net 2 Virtual Interface, IP 192.168.100.5 (static) [Internal]
USB WLAN Adapter, IP 192.168.178.97, Gateway 192.168.178.1 (via DHCP)
USB Ethernet Adapter, IP 192.168.214.201 (static)

VMWare Net 2 Virtual Interface is configured as ‚internal network‘
Both USB Adapters are configured as ‚external network‘.


Destination 1: Generic Dlink WLAN Switch
LAN Slot 1: IP 192.168.214.241, connected to USB Ethernet Adapter of WinGatePC

Destination 2: FritzBox Internet Router
LAN IP: 192.168.178.1, DHCP Server
WAN: xxx.xxx.xxx.xxx
WLAN Access point, connected to USB WLAN Adapter of WinGate PC

WLAN Adapter are ‚cheap‘ USB WLAN dongles, but didn’t expierience any problems with them until now.
I also tried WinGate 9 and WinGate 7 with same behavoir.
5Ghz and 2,4GHz also same behavior
HTTP Proxy to configuration pages seem to be more stable, but I didn't verify that completely.

Question:
- Are there any known stabilty issues with NAT, WLAN, USB-WLAN, maybe in connection with VMWare? Is there anything to solve this?
- Pings from Client 1 to ‚external interface IP‘ of the WinGate PC (192.168.178.97 or 192.168.214.201) only work if the „Routing and RAS“ Service of Windows is activiated. Does WinGate not route to its own interface, only NAT to external IPs?

Thanks in advance.
BlueBerry
Attachments
NATIssue.png
NATIssue.png (188.18 KiB) Viewed 1266 times
BlueBerry
 
Posts: 3
Joined: Oct 22 23 7:01 am

Re: Unstable NAT Routing with WLAN and VMWare

Postby adrien » Oct 25 23 6:18 am

Hi BlueBerry

It sounds like WinGate Network driver is losing network packet buffers somewhere and when it runs out, comms stops.

Normally these are recycled pretty well, but if the driver for the network interface is not notifying completion of delivery then they can be held quite a long time. There may be some relief by increasing the buffer pool in the WinGate driver, and enabling scavenging. This is done using the WinGate Advanced Options applet. You'll need to reboot after this.

Also, what vm network driver do you use? Is it vmxnet3 or el1000? We tend to have better results with the latter.

Regards

Adrien de Croy
adrien
Qbik Staff
 
Posts: 5461
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Unstable NAT Routing with WLAN and VMWare

Postby BlueBerry » Oct 25 23 8:53 am

Hi Adrien,
thanks for your quick answer.
I tried increasing the Buffer Size, (512->2048 / 200 -> 500, Scavenging On, 10s -> 5s / 1s), but did'nt notice a significant difference. Which values do you suggest?

I'm using the default network driver in VMWare, can't really tell which one it is. (Workstation 17, Guest+Host both Win10). But I also had those problem when only using USB Network adapters in VM without the virtual one and acessing WinGate PC via WLAN.

Regards
BlueBerry
BlueBerry
 
Posts: 3
Joined: Oct 22 23 7:01 am

Re: Unstable NAT Routing with WLAN and VMWare

Postby adrien » Oct 25 23 5:15 pm

I'd set the buffer amount to the maximum you can.

It defaults to a smaller amount to save kernel memory, but that isn't really an issue these days.

What kind of traffic are you putting through the system? Is it mostly just http/https?

You should be able to see the type of virtual network adapter in the hypervisor, or it should also show in the guest SO in the network adapter properties.

Adrien
adrien
Qbik Staff
 
Posts: 5461
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Unstable NAT Routing with WLAN and VMWare

Postby BlueBerry » Nov 01 23 10:45 am

Hello,
I made some additional tests:
- Increasing the buffer did not make any improvements
- With a third (different) USB WLAN Dongle connected to the VM, it is the same behavior and connection drops after few minutes.
- For testing, traffic data is mostly ICMP Echo / Ping. The HTTP Proxy seems a bit more stable and still works, even if ping is already 'dead'. But I cant quantify this obersavtion.
- For the 'real' use case it would be TCP / UDP connections, http is not really important. So 'real NAT' is necessary.
- I made another test with two VMs in a virtual Network, and a 'Bridged' WLAN dongle from the host. It is stable there. (It is also stable with the build-in WLAN card of the host in 'bridged mode')
DLINK Router --[WLAN]----Host----[VMNet1/Bridged WLAN]----- VM -----[VMNet2]-------- VM2
Ping from VM2 with VM1 running WinGate NAT to DLINK is stable


So it really seems to be an issue with USB WLAN connected to VMWare. If you have some other ideas i will be happy to try them.
If you want, I can also tell you more detailed information about my testing setup. (Unfortunetly not about the VMWare driver, sorry I do not find that in the adapter settings:)
As I now know pretty sure when it occurs, I will work around that and use Host-USB or wired connections.

Regards
BlueBerry
 
Posts: 3
Joined: Oct 22 23 7:01 am


Return to WinGate

Who is online

Users browsing this forum: Google [Bot] and 7 guests