cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
699
Views
5
Helpful
2
Replies

question about NAT PAT Overload !?

mohammed hashim
Level 1
Level 1

hi,

in all of the example I saw, the PAT was illustrated as when the host want to communicate with public IP address like:

the issue is when a host want to communicate with the internet, then it generates random source ports. so it is possible that two hosts use something like 192.168.1.2:20001 and 192.168.3.2:20001 according to the example up!

if this happens, then how PAT will work, how it can forward the traffic to the right host when it receives flow from the internet ??

thanks, 

1 Accepted Solution

Accepted Solutions

Luke Oxley
Level 1
Level 1
shako_alyom,

Thanks for your post. The answer to this is very simple, the router or firewall stores every NAT/PAT translation in its translation table, otherwise known as the xlate. I think you are getting confused, the port used on the global/outside IP address does not have to be the same as the port used for the inside IP. This means that when two internal hosts attempt to use the same port number, there is no problem.
In this example, the xlate table would look like the following.
Flow
Inside IP:Port
Outside IP:Port
Flow 1
192.168.1.7:20001
67.210.97.1:2834
Flow 2
192.168.1.3:20001
67.210.97.1:7927
The device handling the NAT'ing will randomly generate a port, as will the computers, being sure that they don't generate a port that is already in use with another flow or translation.

I hope that makes sense.

Kind regards,
Luke


Please rate helpful posts and mark correct answers.

View solution in original post

2 Replies 2

Luke Oxley
Level 1
Level 1
shako_alyom,

Thanks for your post. The answer to this is very simple, the router or firewall stores every NAT/PAT translation in its translation table, otherwise known as the xlate. I think you are getting confused, the port used on the global/outside IP address does not have to be the same as the port used for the inside IP. This means that when two internal hosts attempt to use the same port number, there is no problem.
In this example, the xlate table would look like the following.
Flow
Inside IP:Port
Outside IP:Port
Flow 1
192.168.1.7:20001
67.210.97.1:2834
Flow 2
192.168.1.3:20001
67.210.97.1:7927
The device handling the NAT'ing will randomly generate a port, as will the computers, being sure that they don't generate a port that is already in use with another flow or translation.

I hope that makes sense.

Kind regards,
Luke


Please rate helpful posts and mark correct answers.

thanks a lot Luke,

very nice explained.

sometimes the books or blogs use an example which let you ask questions more than finding answers :)

Review Cisco Networking products for a $25 gift card