P2P connection troubleshooting

THE PROBLEM:

Failing to connect to other players in a peer-to-peer online game? It's a common problem.

Lag wise, P2P is the fastest netcode to play fast-paced games such as fighting games (no middleman server, just 2 players communicating to each other directly), but the truth is that P2P connections don't have a 100% success rate. This might depend on a number of factors from both players such as invasive firewalls, bad router settings, Internet Service Providers being cheap, playing on Wi-Fi, living in a heavily filtered/censored country, or even poor hole punching techniques used by the game.

THE SOLUTIONS:

You can take a few steps to reduce the number of unsuccessful connections, such as:

  • play wired instead of wireless
  • turn off any firewall from both Windows and the router (uninstall them if necessary)
  • your router settings might have an option called "Game Mode": enable it
  • your router settings might have an option called "DMZ": enable it on your local IP. On Windows, you can find the local IP of the PC you're using like this:
    Win+R -> cmd -> ipconfig and copy your IPv4 Address
  • all routers should have the basic functionality of letting you open ports. Which ports to open? Try ALL UDP ports with a huge range from 1 to 65535 on your machine (the proper range is probably 49152~65535 because of https://www.speedguide.net/port.php?port=49152 but if you're testing just open all). I'm serious, because some online P2P games tend to choose random ports
  • your connection might be crippled by multiple layers of NAT. This can be caused by:
    1. using multiple routers in your house, info & solutions: https://portforward.com/help/doublerouterportforwarding.htm
    2. your ISP is doing a CGNAT on you (highly likely). This is when your ISP gives a single IP address to multiple customers simultaneously. Why is that a thing? Because almost all possible IP combinations are taken so ISP's are desperate and use cheap workarounds. Sometimes this can be fixed by phoning your ISP and asking them to take you out of their CGNAT to use a "true" public IP instead... maybe they'll do it for free, or maybe you'll pay an extra. Article with more info & solutions: https://winbuzzer.com/2020/05/29/windows-10-how-to-tell-if-your-isp-uses-carrier-grade-nat-cg-nat-xcxwbt/
      You can easily check if you are affected by this problem by running a traceroute on yourself like this:
      Win+R -> cmd -> tracert YOUR_PUBLIC_IP (grab YOUR_PUBLIC_IP from a site like this https://api.ipify.org)
      GOOD RESULT, ONLY 1 HOP = NO PROBLEM: https://i.imgur.com/pRf483E.png
      BAD RESULT, MORE THAN 1 HOP = PROBLEM!: https://i.imgur.com/UTmCNB7.png
      There's an alternative, longer CGNAT checker test at http://ip.bieringer.net/cgn-test.html. Quick guide on its usage: run it on Firefox (works on Chrome but it doesn't show your progress while it's running), Test supported protocols -> Start initial test -> Amount of connections to use for test: 1024 -> Start normal test
      GREEN=GOOD: https://i.imgur.com/qOlHPQ6.png
      YELLOW/RED=BAD: https://i.imgur.com/UwivIXR.png

NOTE:

You can access your router settings usually by typing 192.168.1.1 on your browser address bar, but the method does vary from router to router. Port Forward has tutorials for many different router brands and models https://portforward.com/router.htm

TL;DR:

access your router settings and enable DMZ, it's the easiest and most successful solution. If it fails, try the other solutions

Edit
Pub: 13 Jul 2022 20:18 UTC
Edit: 13 Jul 2022 20:20 UTC
Views: 849