Public IP Address & NAT (Network Address Translation)

Introduction

Public Address

A public IP address is assigned to every computer that connects to the Internet, where each IP is unique. This addressing scheme makes it possible for computers to find each other online and exchange information.

Private Address

An IP address is considered private if the IP number falls within one of the address ranges reserved for private networks such as a Local Area Network. The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks for private networks:

Private IP address table
Class Starting IP address Ending IP address No. of hosts
A 10.0.0.0 10.255.255.255 16,777,216
B 172.16.0.0 172.31.255.255 1,048,576
C 192.168.0.0 192.168.255.255 65,536

Private IP addresses are used for numbering computers in a private network. Devices with private IP addresses cannot connect directly to the Internet; connectivity is typically provided through a router or another device that supports Network Address Translation.

If the private network is connected to the Internet, then each computer may use a private IP within the local network while the gateway uses a public IP for communication over the Internet.

Network address translation (NAT)

NAT is the virtualization of Internet Protocol addresses. NAT helps improve security and decreases the number of IP addresses an organization needs.

A device configured with NAT will have at least one interface to the inside network and one to the outside network. When a packet leaves the domain, NAT translates the locally significant source address into a globally unique address.

NAT implementation

NAT is secure because it hides the internal network from the Internet. In the simple example shown above, all hosts inside the network use private addresses while the public-facing interface uses a real Internet address.