Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've read about the Quake 3 networking code that they had to deal with a situation where some older NATs would randomly switch client ports.

How common is this issue these days? Is it worth handling when implementing a game network protocol?

In other words, would a UDP network protocol implementing virtual connection need to handle the case where the NAT suddenly changes the client's port?

share|improve this question

closed as unclear what you're asking by MikeyB, joeqwerty, Zoredache, David Spillett, mfinni Jul 30 '13 at 17:06

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 4 down vote accepted

You should not rely on source ports being stable between connections from the same host, and if you are using UDP (generally recommended for gaming applications as maintaining low latency trumps needing reliable delivery) which is connectionless you should not expect them to be stable between individual packets.

NAT by its nature usually needs to play with source port information so this compounds the situation, and while single-level NAT can be relatively clever and try to keep source ports for packets from a given host to another stable as soon as you have more than one layer (not uncommon in mobile networks and some free wireless access points) that goes out of the window.

share|improve this answer

No, it's not worth handling. Proper networks don't use older NAT, they use the correct tool for the job.

share|improve this answer
    
how likely is one to encounter this in the wild? –  Nuoji Jul 30 '13 at 16:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.