Interactive end-of-chapter exercises


Supplement to Computer Networking: A Top Down Approach 8th Edition


"Tell me and I forget. Show me and I remember. Involve me and I understand." Chinese proverb

Textbook Cover

Network Address Translation

Consider the scenario below in which three hosts, with private IP addresses 10.0.1.10, 10.0.1.17, 10.0.1.23 are in a local network behind a NAT'd router that sits between these three hosts and the larger Internet. IP datagrams being sent from, or destined to, these three hosts must pass through this NAT router. The router’s interface on the LAN side has IP address 10.0.1.25, while the router’s address on the Internet side has IP address 135.122.197.211

Before doing this problem, you might want to reread the section on the NAT protocol in section 4.3.4 in the text.


Suppose that the host with IP address 10.0.1.23 sends an IP datagram destined to host 128.119.172.189. The source port is 3373, and the destination port is 80.



Question List


1. Consider the datagram at step 1, after it has been sent by the host but before it has reached the router. What is the source IP address for this datagram?

2. At step 1, what is the destination IP address?

3. Now consider the datagram at step 2, after it has been transmitted by the router. What is the source IP address for this datagram?

4. At step 2, what is the destination IP address for this datagram?

5. Will the source port have changed? Yes or No.

6. Now consider the datagram at step 3, just before it is received by the router. What is the source IP address for this datagram?

7. At step 3, what is the destination IP address for this datagram?

8. Last, consider the datagram at step 4, after it has been transmitted by the router but before it has been received by the host. What is the source IP address for this datagram?

9. At step 4, what is the destination IP address for this datagram




Solution


1. The source address will be the local host's IP, which is 10.0.1.23

2. The destination address will be the remote machine's IP, which is 128.119.172.189

3. The source address will be the router's public IP, which is 135.122.197.211

4. The destination address will be the remote machine's IP, which is 128.119.172.189

5. Yes, the NAT will change the source port.

6. The source address will be the remote machine's IP, which is 128.119.172.189

7. The destination address will be the router's public IP, which is 135.122.197.211

8. The source address will be the remote machine's IP, which is 128.119.172.189

9. The destination address will be the local host's IP, which is 10.0.1.23

10. No, an entry is made when there's an outbound request, which only happens between step 1 and step 2.



That's incorrect

That's correct

The answer was: 10.0.1.23

Question 1 of 10

The answer was: 128.119.172.189

Question 2 of 10

The answer was: 135.122.197.211

Question 3 of 10

The answer was: 128.119.172.189

Question 4 of 10

The answer was: Yes

Question 5 of 10

The answer was: 128.119.172.189

Question 6 of 10

The answer was: 135.122.197.211

Question 7 of 10

The answer was: 128.119.172.189

Question 8 of 10

The answer was: 10.0.1.23

Question 9 of 10

The answer was: No

Question 10 of 10

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2021 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu