Share via


NAT Editor Operation (Windows CE 5.0)

Send Feedback

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.

ms883113.nated1(en-us,MSDN.10).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.

ms883113.nated3(en-us,MSDN.10).gif

See Also

NAT Editor

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.