Communication between the Intranet and the Internet
Communication between the Intranet and the Internet
Public Network to lan process:
The IP address of computer A is the lan IP address (192.168.31.11), which is allocated from the lan port of the router.
When we pass through the wan port of the router for hundreds of degrees, the corresponding IP address and port conversion: 192.168.31.11: 80-> 10.221.0.24: 8080. Therefore, the address that goes out from the wan port is: 10.221.0.24: 8080.
Finally, after the carrier, the carrier will map the corresponding port (and dynamic port ing), The subnet IP (10.221.0.24: 8080) to the public IP (128.0.0.1: 8888 ), use this public IP address to access the Baidu server.
Similarly, the process of B is the same. This layer-by-layer port ing ensures the uniqueness of the address (IP + port. A and B access Baidu servers. Although their LAN IP addresses are the same, they eventually access
Baidu's IP address (IP + port) is unique. Therefore, when the Baidu server replies, the original return can identify who to return.