Dynamic Routing Of Ports
Can dynamic routing change the port number during program execution? For example (all using 1 UDP per program): Say we have 3 players, A B C. A connects to B (x.x.x.x:xxxxx connects to y.y.y.y:yyyyy). Then B connects to C (y.y.y.y:yyyyy connects to z.z.z.z:zzzzz). Lets assume those 2 connections work fine. Then, without closing the UDP ports, A tries to connect to C. To avoid firewalls, A sends to z.z.z.z:zzzzz while C sends to x.x.x.x:xxxxx. Is that guaranteed to connect? Or is it possible A's port is xxxxx for his connection with B and xxxxx2 for his connection with C? Thanks for any help
That's known as NAT punch-through; there are links in the Forum FAQ to more complete references.
In the case that it works (A and C can talk) then A and C use "cone NAT" which is the most compatible form of NAT (and the most common, these days).
In the case that it doesn't work (A or C get a new external port) then A or C use a "symmetric NAT" which is less compatible, but does still exist, especially in corporate firewalls.
In the case that it works (A and C can talk) then A and C use "cone NAT" which is the most compatible form of NAT (and the most common, these days).
In the case that it doesn't work (A or C get a new external port) then A or C use a "symmetric NAT" which is less compatible, but does still exist, especially in corporate firewalls.
enum Bool { True, False, FileNotFound };
Interesting stuff. That appears to eliminate any possibilities of p2p communication. Is that true? Is my matchmaking server useless unless it wants to route packets?
That's not what it says. It says that p2p punch-through works for clients that have cone NAT, only symmetric NAT poops the party.
enum Bool { True, False, FileNotFound };
Right. So there is no way to have p2p communications with either person behind a symmetric NAT?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement