Share via


NAT Editor Operation (Windows Embedded CE 6.0)

1/6/2010

The NAT driver does not natively translate port and address information for custom protocols built on top of the TCP or UDP architecture for specific applications. These protocols require specialized editors.

For example, a multiplayer game sends a TCP configuration packet to a game server address that requests permission to join the game. In the data portion of the packet, the client includes the ports that the client monitors for the return connection. The server, in turn, receives the configuration packet and initiates new TCP sessions with the client on the ports specified.

The following illustration shows this kind of communication between a server and a client in the absence of an intervening gateway that runs NAT.

Ee494933.5b04c450-1730-4abf-ac4e-f06236b0082b(en-US,WinEmbedded.60).gif

When a gateway that runs NAT separates the client and the server, however, the connection is less straightforward. Clients on the Internet and clients on a home network are handled differently, because the NAT driver handles outbound packets differently from inbound packets. If routing is enabled on the gateway, the NAT driver automatically forwards outbound packets. When the gateway forwards a packet, the NAT driver changes the source address in the packet header to match the public address of the gateway.

In contrast to the way NAT handles outbound packets, NAT requires a port mapping to forward inbound packets to the correct destination on the home network. With a port mapping, the NAT driver changes the destination address and port in the header of the packet to match the mapped private address and port. Without a port mapping, the presence of unmapped addresses for the home network, in the data portion of the packets, prevents the computers on the Internet from finding devices on the home network that are located behind the gateway that runs NAT.

Alternatively, if a NAT editor monitors network traffic for the configuration packets, parses the packets, makes the appropriate port mappings, and dynamically registers the NAT editor for those ports, the client and server can connect as if the gateway is absent.

The following illustration shows how communication is re-established when the gateway that separates the client and the server runs a NAT editor.

Ee494933.43694acf-282e-4316-a92a-7c2be83215b3(en-US,WinEmbedded.60).gif

See Also

Concepts

NAT Editor