0

Say I'm behind some NAT (the type doesn't matter), and I want to send packets to the public Internet. The first time I send a packet, my packet gets NATed and the NAT allocates and maps some external port number for my packet. If I continue (very frequently) to send packets with the same source port from my private machine, the same NAT mapping persists as far as I can tell (by examining packet addresses on the server destination).

However, if I wait ~1-2 minutes between sending a packet, the next time I send a packet, the NAT appears to have recycled the NAT mapping and assigns a different external port. How long do NATs typically wait until they recycle a mapping? Is there any minimum time that all NATs conform to (like a standard spec)?

1 Answer 1

1

The closest thing to an answer I could find was page 14 of draft-audet-nat-behave-00. This document states NATs must not expire dynamic UDP bindings before 2 minutes with a recommended time of 5 minutes, and 7800 seconds for TCP bindings.

In practice, we have ended up sending a trivial refresh packet every 50 seconds to ensure our UDP binding remains active in our application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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