Computer Networking Basics
Host A (192.168.1.10), inside a router performing NAPT whose outside global address is 198.51.100.7, connects from source port 50000 to port 443 on web server 203.0.113.5. The router translates the source to port 61000 on 198.51.100.7. What is the destination of the response packets the web server sends back?
- APort 50000 on 192.168.1.10
- BPort 443 on 198.51.100.7
- CPort 61000 on 198.51.100.7
Show answer and explanation
Answer: C. Port 61000 on 198.51.100.7
The source the server sees is the translated port 61000 on 198.51.100.7, so the response goes there. The router finds the mapping "61000 ↔ port 50000 on 192.168.1.10" in its translation table, rewrites the destination address and port, and delivers the packet to host A. The server never learns the private address 192.168.1.10, and even if it did, the internet has no routes to private addresses, so packets would not arrive. 443 is the server-side port (HTTPS) and appears as the source port in the response.
- A. This is the destination after the router rewrites it, not what the server sends to.
- B. 443 is the server-side port; in the response it is the source port.
- C. Correct. The server replies to the translated address and port, and the router passes it back to host A.