NAT Traversal
NAT Traversal removes the requirement users to manually forward ports (though it might be recommended in rare circumstances) and allows multiple LAN players to easily play in the same game room.
For more help it's recommend you visit the NAT Traversal Forum.
|
Contents:
|
Architectural Diagram
A high level architectural diagram is below:
Justification for NAT Traversal
Without NAT traversal the game itself tries to establish connections to all remote players after it is launched. Unfortunately, these days there are a lot of routers (NATs) in use. This causes troubles for games because instead of reaching the remote computer the data ends up getting stuck in the router. To workaround this, users typically have to forward ports to their computer. This causes trouble because (1) it's challenging to port forward for some users (2) some users don't have control over their routers (e.g.: at a wifi hotspot). The path used by the game is the NAT Traversal Off route shown above.
How NAT Traversal works
With NAT Traversal, there are three paths for the game data to go:
- NAT Direct Tunnel - This is a direct path from one user to another (peer-to-peer). It's like the non-NAT Traversal path, however, the Voobly server is used only when the connection is established. The server is used to able to setup a path for the two computers to communicate without first being able to talk to each other. Once the connection is established the server gets out of the way. This works for most users, however, those with symmetric NATs will still have to manually port forward (they break the technique used to establish the connection)
- Fast Proxy Server - This is a dedicated server for relaying game traffic that runs on one of the Voobly central servers. It's only used when a direct tunnel cannot be established. Because it's not direct using this path will increase the time it takes to delay packets and increase the players pings who use it.
- Slow Proxy Server - This proxy server also relays game traffic, however, unlike the fast proxy server it reuses the network connection used for the lobby / game room. Like, fast proxy in-game latency is increased, however, with the slow proxy server it's increased even more as the lobby was never designed for low latency communication, whereas, the fast proxy server was.
When NAT traversal is enabled connections are established in the game room. This is unlike when NAT traversal is off and the game establishes connections after the game is launched. When a user joins the game room a negotiation happens to determine the fastest way those computers can communication. In order of priority they are direct tunnel (peer-to-peer), fast proxy server, and then finally the slow proxy server as a last resort.
To see what the current route is to all the users in the room you can use the /nt_tunnels comment. More commands see Debug Options.
Common Problems
The following is not an exhaustive list. For more help it's recommend you visit the NAT Traversal Forum.
Failed to establish a direct connection
This is the most common problem on Voobly. A user below is shown getting this error:
The caused by the two users not being able to directly connect to each other through the ports specified in the NAT Traversal settings in Voobly. The problem is either you or the person you failed to connect with. If you can connect to most other users it's probably not your problem, so ask the other user if they see this issue a lot.
Things to try (this will fix it for 99% of the people that get this error):
- Try changing the NAT port to port 5000 in Settings.
- Try changing the NAT port to port 3400 in Settings.
- Try changing the NAT port to port 2310 in Settings.
- If none of the above ports worked switch back to 5000 before continue to next steps.
- You can try enabling Universal Plug and Play (UPnP) in Voobly Settings. More information on is available at Universal Plug and Play (UPnP).
- Try disabling an anti-virus / firewall if you have one
- If you have DMZ or the port forward to another PC disable those
- Try rebooting router and PC
- As a last resort forward the port in your router to your PC see Instructions on port forwarding can be found at http://portforward.com/english/routers/port_forwarding/routerindex.htm and Unable To Join Games.
Connection to 'user' is not responsive
Try the same things as in Failed to establish a direct connection.
If you have tried all those things you can try forcing all traffic through the proxy server (NAT Traveral setting) and that should solve this problem though you're ping will increase.
Trouble with multiple players on the same network
Try giving each player a different port setting the NAT traversal options.
Crashing or unable to make it into the game
If you have trouble making it into a game or connecting after the game launches. You can try the forcing the use of the proxy server and disabling the fast proxy. The direct connection is the most complicated and therefore most likely to have problems. The fast proxy server is also more complex than the slow proxy server. To change these options go to Settings.
Direct connections have been disabled
Quote:
<Direct connections have been disabled -- all traffic is being routed through a Voobly proxy server. This will increase your in-game latency. You can change this setting in the "NAT Traversal" panel in settings>
You have selected to always use the proxy server. You can change this in Settings.
Fast proxy server is disabled
Quote:
<Fast proxy server is disabled -- all proxy traffic is being routed through the slow proxy server. This will increase your in-game latency. You can change this setting in the "NAT Traversal" panel in settings>
You have selected to not use the fast proxy server. You can change this in Settings.
My game is lagging now, what do I do?
In 99% of the time this happens because someone is connected through a proxy server. Make sure no one has any warning icons like below:
To ensure everyone is directly connected type /tunnels and make sure the route is direct. If there are any fast proxy connections the player at fault is recommended to read Failed to establish a direct connection.
Settings
General NAT Traversal Settings
The latest two check boxes shouldn't be checked other than for debug.
Game Room settings
To enable NAT traversal for your game room you need to click NAT Traversal in game options.
Game Browser
The game rooms with the white satellites have NAT traversal enabled:
Debug Commands
/nt_tunnels
This command lists the status of the tunnels to everyone in the game room:
Quote:
<[#0] [stef] Sent: 204 B, 5 KiB, 56 B Received: 212 B, 9 KiB, 32 B Remote Port: 2310 Route: fast proxy Retries: 0>
<[#1] [Introduction] Sent: 180 B, 5 KiB, 2 KiB Received: 180 B, 5 KiB, 0 B Remote Port: 0 Route: fast proxy Retries: 0>
<Data sent and received format is [slow proxy], [fast proxy], [direct]>
<[#1] [Introduction] Sent: 180 B, 5 KiB, 2 KiB Received: 180 B, 5 KiB, 0 B Remote Port: 0 Route: fast proxy Retries: 0>
<Data sent and received format is [slow proxy], [fast proxy], [direct]>
/nt_ping [size (optional)] [tunnel (optional)]
Sends a packet and waits for a response from all users in the room. The tunnel used can be "fast", "slow", and "direct". If the option isn't specified the negotiated tunnel is used (i.e.: the fastest one).
Quote:
<Ping of 10 B sent... waiting response...>
<Ping response from stef in 141 ms [direct]>
<Ping response from Introduction in 141 ms [direct]>
<Ping response from stef in 141 ms [direct]>
<Ping response from Introduction in 141 ms [direct]>
