Private and Public IP Addresses

TCP-based networks can be private Local Area Networks (LANs) used in offices, buildings, etc., or public Wide Area Networks (WANs) used to connect devices worldwide.

Private IP address: It is an IP address used within a local network (LAN), such as a home or business network. Private IP addresses are not unique and can be reused across different local networks. For example, many routers have the private IP 192.168.1.1.

Public IP address: It is a unique IP address that identifies a device on the Internet. It is globally unique and typically assigned by the provider. The public address can be assigned to the router or directly to the device. The website www.mioip.it displays this address.

The router assigns private IPs to various devices on the network via the Dynamic Host Configuration Protocol (DHCP) and enables browsing by mapping multiple private IPs to a single public IP.

Public IP Assignment

Public IP addresses are assigned for specific purposes, such as the network infrastructure of an end user or a company.

To map information about who can use which IP addresses, there are designated authorities such as IANA (Internet Assigned Numbers Authority), which manages them centrally and distributes through RIRs (Regional Internet Registries) like ARIN (American Registry for Internet Numbers) for North America, RIPE (Réseaux IP Européens) for Europe, and APNIC (Asia Pacific Network Information Centre) which manages the Asia-Pacific region.

Private IP Classes

Private IP address classes (not routable on the Internet) are defined by IANA and include the following ranges:

  • Class A: 10.0.0.0 to 10.255.255.255
  • Class B: 172.16.0.0 to 172.31.255.255
  • Class C: 192.168.0.0 to 192.168.255.255

These addresses are dedicated to local LAN networks. Typically, home networks use Class C.

Static or Dynamic IP Addresses

Both public and private IPs can be static or dynamic.

A static IP address is a permanent IP address assigned to a device. This address does not change over time or upon reboot. On a local network, a static IP is typically assigned to printers, servers, network devices, and anything used for continuous operations. On the Internet, static IPs are used for web servers, email servers, and other services.

A dynamic IP address is assigned each time a device connects to the network. In a LAN, the router assigns dynamic private IPs to devices such as PCs, tablets, smartphones, IoT devices, etc., via the Dynamic Host Configuration Protocol (DHCP). On the Internet, dynamic IPs are assigned to routers by the provider. The dynamic IP may change upon device or router reboot or when a smartphone switches cell towers.