Skip to main content

IP in Practice: IPv4 Workarounds

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

Popular posts from this blog

Subnets: Key to Network Organization

Whether it is a to-do list or a big project, organization is key. We have busy lives. The task in itself can have several parts or may require some sort of collaboration with a partner or a team. A project may call to meet deadlines, which means keeping up with those crucial dates and having a system of order. Similarly, our networks are busy, transferring a great deal of data across links and nodes. The amount of traffic generated can lead to bottlenecks, packet loss, and delays. A network’s design can vary in complexity, depending on the environment or needs of a customer. Just as we find a manageable way to handle heavy workloads, our networks have a way of efficiently handling network traffic by creating "mini-networks" within our network. This process is called subnetting.   Why We Subnet To reduce congestion. Just as traffic in cities cause slowdowns and delays, too much traffic can lead to bottlenecks, packet loss, and delays. Subnetting breaks the netwo...

Is MCP the TCP/IP for AI?

  The Internet runs on TCP/IP. We might as well include AI in the mix, but how about AI? TCP/IP allows devices, services, applications, and data to communicate with other devices, services, applications, and data. How does AI talk? This is why I love networking, and the thought of how AI communicates makes me hopeful that the field will survive extensive job replacements. Unless self-healing networks actually come.  I have been reading more into MCP. What exactly is it? Is it necessary for AI models and agents to communicate? Did you know AI agents have their own social media?? Biggest of all, is there any correlation between MCP and TCP/IP for model communication? Can MCP take notes from TCP/IP, or will it rewrite networking? This post explores Model Context Protocol through parallels with TCP/IP to understand how AI communication can become more structured, standardized, and consistent. What is MCP? To understand MCP, a good place to start is APIs. To understand APIs,...

Understanding OSI and TCP/IP Models

Visual breakdown of the OSI Model's 7 layers Whether you are new to IT or a seasoned admin, chances are you have heard of the OSI or the TCP/IP model. These frameworks help us understand how data flows across our networks — from online shopping to high-speed data transfers. However, many job postings require knowledge of TCP/IP but not OSI. Why is that? Is one favored over the other? Let's take a look at both. What is the OSI Model?  Introduced in the 1980s, the Open System Interconnect — OSI — breaks down network communication into seven layers, each with a specific function. Layer Functions 7. Application User and device interaction for network services (web browsing, email, file transfer) 6. Presentation Formats data for applications, ensures readable and secure data 5. Session Establishes, maintains, and ends connections between devices. For example: Online shop...