title | date | lastmod |
---|---|---|
Network Address Translation |
2022-11-08 |
2022-11-21 |
IPv4 addresses are only 32 bits long which provides a maximum of 4.29 billion unique IP addresses.
Introduce NAT devices at the edge of the network, each of which would be responsible for maintaining a table mapping of local IP and port tuples to one or more globally unique (public) IP and port tuples (Figure 3-3).
- Client may not know the public IP address: if the client communicates its private IP address as part of its application data with a peer outside of its private network, then the connection will inevitably fail.
- NAT table may not have the mapping of a public IP of a packet
Helps the application obtain the public IP and port tuple of the current connection:
- Discover the IP address and port tuple for the connection
- Establish the NAT routing entry for the host application
- Keepalive pings to keep NAT entries from timing out
When STUN fails (blocked by firewall etc.), we can use a relay to transmit the data between peers.
Establishes a set of methods to find the most efficient tunnel between participants: direct connection where possible using STUN if needed and TURN if failure.