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 126.96.36.199 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 188.8.131.52:80 source 10.10.10.10:1500 and the other client sends packet destination 184.108.40.206:80 source 10.10.10.11:1501
Router performing PAT keeps the destinations 220.127.116.11:80 but changes the source to 18.104.22.168:1500 and 22.214.171.124:1501
When yahoo replies the destination is 126.96.36.199:1500 and 188.8.131.52:1501 but the source is 184.108.40.206:1503 and 220.127.116.11: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?