Port address translation
Posted on 2011-10-31
How does PAT work?
Can you only use less the 65,000 hosts per one real ip address?
My understanding is this.
One external address for example 220.127.116.11 and two internal addresses of 10.10.10.10 and 10.10.10.11
Both internal clients want to go to yahoo.com on port 80
So one client sends packet destination 18.104.22.168:80 source 10.10.10.10:1500 and the other client sends packet destination 22.214.171.124:80 source 10.10.10.11:1501
Router performing PAT keeps the destinations 126.96.36.199:80 but changes the source to 188.8.131.52:1500 and 184.108.40.206:1501
When yahoo replies the destination is 220.127.116.11:1500 and 18.104.22.168:1501 but the source is 22.214.171.124:1503 and 126.96.36.199:1504
Our external router sees destination ports of 1500 and 1501 and knows which internal hosts to send to?
Where is the port translation? It seems that the ports remain the same but only the source ip address changes?
Would a better name be SAT? Source address translation?
The 65,000 limit comes from the fact that there are less than 65,000 unique source ports.
Or maybe I don't understand what is actually happening in PAT?