As an example of NAT, suppose your workstation has an IP address of 10.10.20.10 and it wants to communicate with a website at IP 74.125.236.195. The traffic has a source IP of 10.10.20.10 and a destination IP of 74.125.236.195. The traffic reaches your router, which performs Network Address Translation and changes the source IP from the internal 10.10.20.10 IP address into the external address on the public Internet. For example, let’s say the public IP address is 95.1.1.1. Now the traffic source IP is 95.1.1.1 and the destination IP address remains the same at 74.125.236.195. The traffic makes it way to the web server at 74.125.236.195 and wants to respond back so it reverses the source and destination IP addresses. Now the source IP is 74.125.236.195 and the destination IP is 95.1.1.1. The router receives the information and performs NAT again to translate 95.1.1.1 back to the internal IP of 10.10.20.10.
NAT stands for Network Address Translation
- All home routers use NAT to present an entire LAN of computers to the Internet as a single machine. It hides all of your computers and makes them appear invisible to other computers on the Internet. All anyone sees is your public IP address, which is the IP address your ISP gives you. All the computers in your LAN use private address that are invisible to the world. NAT acts as a firewall protecting your internal network from probing or malicious users on the outside.
- DNAT: Computers can share a smaller pool of routable IP address with dynamic NAT. AKA pooled NAT. You can have multiple routable IP addresses and when a computer requests information beyond the network, the NAT distributes a routable IP address from its pool.