한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › L3 Home network

NAT mapping expiry NAT mapping timeout

Cause ID hn-nat · Primary owner Game team (Client development) · Also Game team (Server development)

Open the interactive card with figures and simulations →

Routers remove idle connections that haven’t carried packets for a while from their NAT table. It’s a common reason the connection drops the moment you move after standing still.

Why The router records the “inside device ↔ outside server” connection in its NAT table (address translation table) → Effect If no packets pass for a while, the entry is deleted (for UDP, often after 30–120 s) → On screen Server packets can no longer get into the home, so the connection drops

Symptoms
Disconnect
Factors
Packet loss
Who’s affected
Just me, Same household
When
After sitting idle
Owner
Primary owner Game team (Client development) · Also Game team (Server development)
Game team action items
Client: send heartbeats at no more than half the shortest idle timeout (UDP mappings are reliably refreshed only by packets going out of the home, so the client sends them), reconnect automatically after a disconnect. Server: answer heartbeats, clean up the connection first when none arrive for a set time, and when a deleted mapping changes the outside address and port, confirm it’s the same player with the session token (an ID issued when the player connects) and resume the session.
On the graph
Mass disconnect · Disconnects (heartbeat timeouts), idle time before disconnect
Where to look
Collect the server’s disconnect reasons and the time elapsed since the last packet on that connection before it dropped (idle time), and look at the distribution. To test, increase the UDP packet interval to 30 s, 60 s, and 120 s and find the interval at which responses stop
Confirmed if
Only idle connections drop, and idle times cluster just past a specific value such as 30–120 s. A heartbeat interval shorter than that makes it go away
Ruled out if
Drops even while moving: the connection or route side. Clustered at a short value only on a specific mobile carrier: “ISP-shared IP addresses (CGNAT)”
Check with
Game server or client logs and metrics

Sources

  1. RFC 4787: Network Address Translation (NAT) Behavioral Requirements for Unicast UDP IETF
    The UDP mapping timer must not expire in under 2 minutes, and a default of 5 minutes or more is recommended; refreshing on outbound packets is required, refreshing on inbound packets is optional
  2. An Experimental Study of Home Gateway Characteristics (IMC 2010) ACM
    Measurements of 34 home routers: UDP mappings lasted 30–691 s with a 90 s median, over half under 2 minutes; TCP median about 60 minutes
  3. RFC 9308: Applicability of the QUIC Transport Protocol IETF
    On an internet path with NATs, keep-alives about every 30 s are reasonable; more frequent ones waste traffic and power

See also

Same layer: L3 Home network

Same symptom (Disconnect), other layers

View the interactive card with figures and simulations