Network address translation was created due to the exhaustion of IP address, Ipv4. Ipv4 is the standard for current day IP addresses, however it was created sometime around 1981. Back then they did not account for the millions of internet connected devices. Ipv4 is a series of 32 bits, which means there is a physical limitation of 2 to the power of 32 unique IP addresses. With the current growth rate, we would use up all these addresses with new smart phones, fridges and any internet connected device. Two major solutions were used to combat this, Ipv6 and NAT. Ipv6 allows us to have 2 to the power of 128 unique IP addresses.
With the limitations of IP addresses, network address translations were used to make better use of the limited addresses. To explain it simply, the router links up all the devices in your home into one public ip address. It is similar to an apartment building. To the outside world, they are one building, but once you go inside you see the different people who live there. The router is the apartment building and the people who live there are the internet devices connected to the router. This means, within the private network, each device is given a unique ip address. Instead of having 6 unique IP addresses, the NAT cuts it down to one. This limits the number of public IP addresses an organisation or household would use. Furthermore NAT’s act as an firewall, lets say you have a printer connected to your router. The NAT only allows private IP addresses access to the printer to ensure no random can print to your printer. This provides a security to the home user or business if they store their files on a NAS (network attached storage).
Now, lets say a computer request to visit bkmedia.co, the NAT see’s that this request is not for a device in the private network, the NAT then makes the exact same request using its own public IP address and delivers the response to the computer which requested the resource. This therefore means all your devices would have the same public IP address to an outside organisation.
NAT’s are very important, without them, security would be breached, we would run out of IP addresses and the internet would look a lot different.