This software is a chat tool written in C language. The files inside have been compiled and can be run. The running client is in Debug. Run the server first, then the client, and enter the host IP address (this is the IP address of the computer) , you can run multiple clients for chat testing.
NAT (Network Address Translators): Network Address Translation was created when IP addresses were increasingly scarce. Its main purpose is to enable address reuse. NAT is divided into two categories, basic NAT and NAPT (Network Address/Port Translator).
Initially, NAT was a functional module running on the router.
The first one proposed was basic NAT, which was based on the fact that only a few nodes in a private network (domain) need to be connected to the external network (haha, this was proposed in the mid-1990s) . Then only a few nodes in this subnet actually need globally unique IP addresses, and the IP addresses of other nodes should be reusable.
Therefore, the function implemented by basic NAT is very simple, using a reserved IP subnet segment within the subnet, and these IPs are not visible to the outside world. Only a few IP addresses within a subnet can correspond to truly globally unique IP addresses. If these nodes need to access the external network, then basic NAT is responsible for converting the IP of this node's subnet into a globally unique IP and then sending it out. (Basic NAT will change the original IP address in the IP packet, but will not change the port in the IP packet)
For basic NAT, please refer to RFC 1631
Another type of NAT is called NAPT. From the name, we can also see that NAPT will not only change the IP address of the IP datagram passing through this NAT device, but also change the TCP/UDP port of the IP datagram. We may not see many basic NAT devices (haha, I haven't seen them), but NAPT is the real protagonist of our discussion.
Expand