3

When reading Data Communications and Network (5th edition) by Behrouz A. Forouzan, I have trouble with the explanation for NAT. On page 546, the book describes a modifying-IP-only NAT (a.k.a. basic NAT; not the commonly-used modifying-IP-and-port NAT or NAPT) with a pool of public IP addresses. It says "No private-network host can access two external server program (e.g., HTTP and TELNET) at the same time." But in my understanding, it can. Here's my argument:

Say the private-network host's IP address is 10.1.1.1, one of the NAT's public IP addresses is 200.2.2.2 (one is sufficient; a pool is overkill in this case), and the server's IP address is 30.3.3.3.

When the host visits the server's HTTP service, the outgoing packet from the host is [10.1.1.1:1111 -> 30.3.3.3:80]. After going through the NAT, the packet is changed to [200.2.2.2:1111 -> 30.3.3.3:80], that is, the source IP address is replaced by NAT with its public IP address, while leaving everything else untouched. The NAT also makes a new entry in its translation table, mapping 30.3.3.3 to 10.1.1.1. When the reply packet, which is [30.3.3.3:80 -> 200.2.2.2:1111], arrives, the NAT looks up the source IP address (30.3.3.3) in its translation table and find the just-made mapping entry which says the real destination is 10.1.1.1. The NAT thus translates the reply packet to [30.3.3.3:80 -> 10.1.1.1:1111].

If, at the same time, the host logins TELNET on the server, the outgoing packet is [10.1.1.1:1112 -> 30.3.3.3:23], and is translated to [200.2.2.2:1112 -> 30.3.3.3:23] by the NAT. Note that no new mapping entry is made this time because it would be the same as the previous one. The reply packet is [30.3.3.3:23 -> 200.2.2.2:1112], and is translated to [30.3.3.3:23 -> 10.1.1.1:1112] by the NAT in the same way.

So both the (translated) reply packet will reach the (single) correct host. And since their destination ports are different, they will each be delivered to its initiating program on the host correctly. Done.

Am I missing something? Thank you.

Addendum: Here is Data Communications and Network (4th edition) for your reference.

  • I'm not sure what you actually mean.You can refer to RFC 2663, IP Network Address Translator (NAT) Terminology and Considerations to get the proper terminology and edit your question to properly explain what you are asking. – Ron Maupin Jun 13 '18 at 1:28
  • I went through the DCN book, and I feel the confusion arises because the author considers (Private IP, Public IP, DST IP , DST port) as one connection tuple instead of (Private IP, Source Port, Public IP,Source Port, DST IP, DST port). He does this while explaining the concept of an IP pool for NAT and I believe his argument is that if 10.1.1.1 wants to access 30.3.3.3 for HTTP then it would be NATTed to 1 public IP (P1). If it wants to access telnet on the same host, another public IP (P2) would be needed for the same host. As Ron suggested, go through the RFC and read the PAT section! – surya Jun 13 '18 at 9:44
  • @surya I skimmed RFC 2663 and 1631, but few is said about basic NAT. I also reread the relevant stuff in Computing Networks (5/e) by A.S.Tanenbaum and found no EXPLICIT answer there, either. And, note that, the statement "No private-network host can access two external server programs ..." is made with a pool of public IP addresses in place (since it is made in the section Using a Pool of IP Addresses). – dingcurie Jun 14 '18 at 2:37
0

It seems what you are discussing is referred to in the Cisco world (among others) as a Dynamic NAT. Which essentially works like this:

enter image description here

You are asking if the a single internal host can make a request to a single external host over multiple services (ports). The answer is, emphatically, yes. You are correct in your assertion and description of how the Translation Table would be populated.

If the book is discussing what is commonly referred to as a Static NAT... then all the more so it is absolutely possible for a single internal server to access multiple services externally.

I do not have access to the book, so can not infer if there might be other stipulations or concessions the author is making. But given simply what you have provided, I can confirm your understanding of NAT is accurate.

  • I added a link to the 4/e of the book for reference, so you might have time someday to make sure if there are any stipulations or concessions. Thank you very much. – dingcurie Jun 14 '18 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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