I’ve been diving into the public and private IP addresses, as I could understand public IP addresses are assigned by Internet Service Providers, but I couldn’t understand how and by whom are private IP addresses assigned. I couldn’t understand as well what’s the purpose of private IP addresses.
Any help is appreciated. Thank you for helping me out.
In: Other
> what’s the purpose of private IP addresses.
Private addresses are used explicitly to share the public address space between devices, similar to how an apartment building squeezes more people into valuable real estate. The scale of the internet has _massively_ exceeded it’s original design, and there are finitely many IPv4 addresses to assign to machines that participate in the internet.
Your ISP owns a finite number of addresses. In the olden days, when your ISP sold all the IP address space they owned, they could buy a new block of IP addresses from the Regional Internet Registry (RIR) in their region.
APNIC (RIR serving Asia) ran out of address in 2011. RIPE (RIR serving Europe) ran out of addresses to give in 2012. ARIN (RIR serving North America) ran out of addresses to give in 2015.
Roughly speaking, there are no more IPv4 addresses left, and if you want a publicly routable address, you must obtain it on the open market from someone who is willing to sell their allocation. As a result, ISPs in some cases now arrange for even larger groups of customers to share a single address. This entire event is generally called [IPv4 address exhaustion](https://en.wikipedia.org/wiki/IPv4_address_exhaustion).
You should understand that there is a tremendous technical cost to this exhaustion. It [greatly hinders Peer-to-Peer communications](https://en.wikipedia.org/wiki/STUN). It [slows down the internet](https://blog.apnic.net/2023/01/06/bgp-in-2022-the-routing-table/). It [encourages abuse, and stymies the ability of service providers to combat that abuse](https://www.arin.net/blog/2022/11/17/ipxo-ip-address-abuse/). Private/Public addresses would likely not be used in IPv4 if it weren’t for the scarcity of addresses, and instead each device would only have a single “public” IPv4 address. The internet did operate this way at the beginning of its life, before it became apparent that address exhaustion would be a serious issue.
The next addressing scheme for the internet, IPv6, was created mostly to address this problem, but [deployment has been very slow](https://www.google.com/intl/en/ipv6/statistics.html) in part because IPv6 networks cannot conventionally connect with IPv4 networks, necessitating “dual-stack” deployments where every host participates in both a v4 and v6 network until the entire world can transition to v6. Still, some networks today are entirely IPv6, notably T-Mobile in the US. They use transitional technologies to allow customers to connect to IPv4 only services, and yes this does potentially introduce a new bottleneck and new latency into the system, along with all the old drawbacks of IPv4. You should prefer IPv6 connectivity when it is available.
IPv6 actually also includes private address ranges, but not for the purpose of sharing the (greatly expanded) public address space. IPv6 hosts are typically assigned one or more public “GUA” addresses, which are similar to public IPv4 addresses in addition to their private addresses.
Latest Answers