"From: S, Port 80, To: R1, Port 60000" must be rewritten as "From: S, Port 80, To: R1, Port 60000."
This seems to be a mistake, the port was not rewritten.
The correct description should be:
"From: S, Port 80, To: R1, Port 60000" must be rewritten as "From: S, Port 80, To: R1, Port 50000."
|
Note that Bob has no idea that the router is changing his port number. When the router forwards this packet back to Bob, the fake port number must be changed back to the original port number. "From: S, Port 80, To: R1, Port 60000" must be rewritten as "From: S, Port 80, To: R1, Port 60000." More generally, none of the private clients should need to know or care about their packets getting rewritten. The router should be giving all of them the illusion that they're sending and receiving packets from their private IP address and whatever ports they choose. |
This seems to be a mistake, the port was not rewritten.
The correct description should be:
"From: S, Port 80, To: R1, Port 60000" must be rewritten as "From: S, Port 80, To: R1, Port 50000."
textbook/end-to-end/nat.md
Line 80 in 053540f