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

A Nesting Doll of Networks: Types of Networks

  PAN, WAN, MAN, LAN, CAN - what is up with all these rhyming words? As fun it us to relive kindergarten, these are acronyms for the types of networks that exist today. Think of them as digital nesting dolls: PANs can be found in LANs, LANs make up our WANs, and there is more in between. Let's take a closer look at these networking nesting dolls. Personal Area Networks (PANs) Have you ever grown frustrated at how your Bluetooth headphones seem to take forever to pair to your phone? Do you use a wired mouse or a wireless mouse with your desktop? Do you "tap to pay"? These are examples of personal area networks.  A personal area network connects devices close in range, from a few centimeters to a few meters. These types of networks can be wired or wireless.  A wired PAN may be a computer connected to a printer by a USB cable or Ethernet cable.  A wireless PAN may use communication methods, such as Bluetooth, infrared, or radio waves. Think of your wireless Bluetooth ea...

IP in Practice: The Need for IPv6

 It is time for IPv6. Not just for our network infrastructure, but for this series. The IPv4 section has come to an end, and now it is time for a deep dive into IPv6. More than ever, it is time to consider systems that can handle heavier workloads, more devices, and fewer address limitations - AI agents, IoT devices, edge computing. This post will examine why we need IPv6 and why it is an important network solution.   Why do we need IPv6? We need more space. IPv6 literally increases the address space exponentially. The IPv6 address space is 2 128 total addresses, 3.4 followed by 38 zeroes. Technology is no longer limited to servers, office computers, and mobile devices. Today's systems integrate AI infrastructure, edge computing, IoT devices, cloud networking, virtual machines, and more. Simply, more devices mean more space.  We need more scalability. As more devices connect to systems, administrators need to consider not only the number but the distribution. System...

My Trek up Mount Net

   Networking is ...          Let me hold off on that. Expect a definition later. First, let's set the scene.         This is a new platform, new field, new everything for me. You might or might not ask yourself - how?   If you are part of the "might not", I get it. I am currently a college student just trying to make sense at staring at the daunting Mount Net - one of many peaks among the IT Mountain Range that grows not centimeters every year, but centimeters every second it seems like. Yet this is a trek I know I want to take step by step.         Let me just say, my journey to networking started a few years ago. When I graduated high school, I had different interests - psychology, math, animal science, just to name a few. I had a brief stint of interest in electrical engineering that sparked from a fascination with electricity. My mother also told me that my grandfather used to be in ...