PDA

View Full Version : About PAT(Port Address Translation)


Frank
01-19-2010, 05:37 AM
I have some questions about PAT
Does PAT reduces over load on the Server or Router ?

How is port addressing done?

Fuzz
01-19-2010, 06:30 AM
Ports are a way to keep data separate between applications. As a host (generally) has only one IP address, there must be a way for sending and receiving devices to know what application is involved. In other words, ports can address an application, in the way an IP address addresses a device.

A NAT router can take one IP address and translate it to another, keeping a record of which addresses have been swapped so it can keep the data separate. When using PAT, the router can use ports to address the host. As there are over 65k port numbers available, one IP address can be used to translate thousands of addresses.

The ports used for translation do not correspond to an application, it's a way of referencing a particular data flow from a particular host. This gets around the need for a 1:1 ration of local to global addresses.

Frank
01-19-2010, 10:08 AM
Thanks for your reply Fuzz,

I forgot ,what do you mean by application?

Fuzz
01-20-2010, 05:13 AM
By application, we're reffering to protocols like DHCP, DNS, HTTP, FTP etc. Remember that source ports are generally chosen pseudo-randomly, whereas destination ports are specific, port 80 for HTTP, for example.

Frank
01-20-2010, 10:39 AM
By application, we're reffering to protocols like DHCP, DNS, HTTP, FTP etc. Remember that source ports are generally chosen pseudo-randomly, whereas destination ports are specific, port 80 for HTTP, for example.

Fuzz,

Thanks for refreshing my memory,what about the ports of DNS,FTP and DHCP? I think microsoft site can give the list of ports used by different protocols.

But Fuzz, I donot understand how we actually map ports ourself or is it
a dynamic process?

Just as we have option of maping private ip address to public ip address,so can we also do the same with ports?

Fuzz
01-20-2010, 12:27 PM
That wouldn't be possible, as source ports are chosen randomly. There's no way of knowing what port an application will use, ergo, it must happen dynamically.