IPv4 has been dealing with burnout since 2011. Yet we work it to the ground by finding workarounds. Why? The Internet as we know it still runs on it. IPv6 is not as pervasive or widely accepted as IPv4 and often requires adding new infrastructure or reworking what is already in place. So far, the alternatives have extended the use of IPv4 beyond its intended design.
How have we continued to stretch IPv4? If you are studying networking, building a home lab, or managing large-scale networks, these techniques should ring a bell. This post will revisit four current IPv4 workarounds.
Workaround #1 - Private IP Addresses
Instead of every server, device, and client getting their own public IP address and taking up space, private IP addresses provide reusable address spaces for local networks. These addresses are not directly accessible via the Internet. Routers will drop external traffic trying to directly access them.
To the outside world, only public IP addresses are visible. Test it for yourself on sites like whatismyip.com. Private IP addresses are not routable on the internet, so servers must be translated to a public IP when accessing external resources.
| RFC1918 Private IP Ranges | |
|---|---|
| Class | IP Ranges |
| A | 10.0.0.0/8 |
| B | 172.16.0.0/12 |
| C | 192.168.0.0/16 |
Workaround #2: Address Translation
NAT allows private devices to communicate over the public Internet. There are two types of address translation:
- Network Address Translation (NAT) maps each private IP address to its own distinct public IP address. This is often used for servers or resources that need a static IP address for easy access.
- Port Address Translation (PAT) maps multiple private IP addresses to one public IP address. Each internal, private IP address gets a unique port number to track its connection. This is often used within SOHO networks and enterprise environments with multiple devices that need to reach external resources or the Internet.
NAT maintains state. ISPs utilize their version of NAT on a grander scale.
Workaround #3: VLSM
Variable-Length Subnet Masks allows you to divide a network into subnets of different sizes based on what is needed for device space. This preserves address space and utilizes resources efficiently.
VLSM offers flexibility but can introduce complexity. Clear documentation makes it easier to handle IP address management and subnet design.
Workaround #4: CGNAT
CGNAT is NAT at the ISP level. On the customer side, their device's private IP address is translated by the home router. On the ISP's side, it reaches the CGNAT gateway, becomes translated again before reaching the ISP router and sent out to the Internet. We do not see this side of translation occurring, but CGNAT IPs can be within the 100.64.0.0/10 as standard or the private ranges set by the ISP.
CGNAT comes with extra overhead and layers of transmission that can affect network metrics, such as latency and performance, such as port forwarding and inbound connections. Any inbound traffic must be mapped in the CGNAT gateway's routing table, which includes routes and ports. Because of this, customers cannot freely host custom servers, create VPN connections to home network, or accept unsolicited traffic without involving the ISP. This is a major drawback with CGNAT. Customers have contacted their ISP to get their own public IP address. Many ISPs include a dual-stack architecture, providing customers with an IPv4 and IPv6 address.
CGNAT Demo
I built a small lab that shows how traffic moves from a private device, through a home router, into a CGNAT gateway, and out to the public internet.
This demo highlights where translation occurs, why return traffic depends on NAT tables, and why inbound connections become difficult in CGNAT environments. A full lab walkthrough will be published soon.
What's Next?
This series has thus far discussed the various uses of IPv4 addresses. It still remains the primary addressing scheme and backbone of the Internet. Of course, it is not without its limitations. In a world with over 8.3 billion people and even more devices, many systems have implemented a solution that supports IPv4 and its extended counterpart - IPv6. In the next post, we will see how IPv6 addresses the need for more space with much to spare.



Comments
Post a Comment