LAG? Disable UPNP on your router!

Hi Everyone

For several months I’ve been plagued with laggy games, low turn rates and extra high latency/choppy games. I have mentioned this in previous forum threads and it seems everyone is as lost as me.

I believe there is an issue with how the game utilises UPNP (NAT-PMP). I would greatly appreciate one of the developers consider if this is a bug that should be patched!

With manual port forwarding disabled and the ‘prefer port 6112’ setting off, my router log reports that a random high level port is forwarded to my PC when I open starcraft. The problem is, this port is never used in game.

I confirm this using Wireshark as packets still send/receive via port 6112. As this port is not forwarded I’m not connectable. With each game played the IP I’m connected to is not my friends and hence must be a proxy. The location of the proxy drastically impacts the performance of the game, in some cases we’re routed via a proxy 300 ms away, when we ping each other at ~ 6ms!

If I disable UPNP, port forward 6112 TCP+UDP and select the ‘prefer port 6112’ in the options then the same game recreated provides a 24 TR, low latency. Wireshark also shows communication on port 6112 and direct communication with my friends IP.

I recommend everyone try for themselves and report their findings! I’m convinced the UPNP implementation in SC:R is broken!

Wireshark is free to download. Once installed switch monitoring on and after a game take a look at the packet flow, ports used and IP address to confirm my theory. Toggling UPNP on your router is quite easy, this can be done via the routers web interface and should be detailed in the manual.

I am running windows 10 and my router is a routerstation pro running OpenWRT 18.06.1.

1 Like

I just logged into my Router and disabled the UPnP and will give this a try to see if it actually helps with the lag on ladder, I feel like both players would need to do this in order for it to work though, unless this is just a common suggestion to fix bad P2P connections in general?

I tried it and it had little to no effect on Ladder games, I feel like it may of helped (a little) in custom games, thanks for sharing bro.

I hope it helps. I’m no expert with this stuff but I believe there is a problem with the way upnp is implemented.

Yes sadly I feel like it’s a losing battle. Upnp disabled will stop a random port being assigned which isn’t used, but if you and your opponents also havn’t port forwarded 6112 TCP+UDP (and possibly ticked the prefer port 6112 option in the main menu settings) you’re unlikely to see an improvement.

With modern day routers I expect very few players port forward anymore, but most routers are shipped with upnp enabled by default.