Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Host A ( is connecting to 2 servers (TCP and UDP) on host B ( both running on port 53. How does a traditional NAT handle this?

share|improve this question
You mean 10.x is the server and the external is coming into it? And is this an actual issue you're trying to understand or is it a hypothetical homework-type question? – Bart Silverstrim May 22 '12 at 17:28

A NAT rule mapping tcp/53 to tcp/53 is unrelated to a rule mapping udp/53 to udp/53.

So you can have the same numerical value for a port using different IP protocols result in two different translations, if you want.

share|improve this answer

Static NAT – Mapping an unregistered IP address to a registered IP address on a one-to-one basis. Particularly useful when a device needs to be accessible from outside the network.

ex: In static NAT, the computer with the IP address of will always translate to

Dynamic NAT – Maps an unregistered IP address to a registered IP address from a group of registered IP addresses. Dynamic NAT also establishes a one-to-one mapping between unregistered and registered IP address, but the mapping could vary depending on the registered address available in the pool, at the time of communication.

ex: In dynamic NAT, the computer with the IP address of will translate to the first available address in the range from to

Is that what you are asking?

share|improve this answer

Host A will select some random high (<1024) port, and connect to B. NAT box (usually a router) will change the source IP(of box A) to a public IP it owns (and if the outgoing port is used, it will also change the port number), and remember the change. When B recieves packet, it answers back with a packet to a public IP assigned to the router (where the packet seems to have come from because of the NAT). The router will then check the NAT table, and notice the translation it has done before, and reverse it (change the destination IP to IP(of box A), and also the port, if it has done this before), and send it to box A.

With tcp, it can forget the nat table entry after TCP FIN/RST/..., or it waits for a timeout. With UDP it just waits for a timeout (after no packets come either way on this IP/port combo).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.