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

Subnetting Tips

When I was first introduced to subnetting, it was difficult to understand the math and the process behind it. I watched videos but it did not click. I focused more on how to calculate it than on the reasoning behind it. Why do we subnet? I remember seeing forward slashes followed by numbers, classes, letters, network and broadcast addresses - important terms that was overshadowed by just trying to grasp why certain numbers were used.  Years later, I hear the word "subnetting" in one of my courses, and it reminded me of my struggles. Yet, I was excited. It was a time for redemption. Example after example, I started to get them right but also got to understand how to create a subnet with sufficient space for devices. Because of this, I have grown to love subnetting.  For me, it took time - a break that lasted about two years followed by a curriculum that focused on the topic for a few weeks. If you find yourself struggling with subnetting, do not worry. It takes time. If someth...

How to Set Up a Cisco Router as a DHCP Server (Step-by-Step Guide)

Lab time! Want to build a DHCP server?  In this lab, I will show you how to build your own DHCP server on a router using Cisco Packet Tracer, as shown above. By the end of this post, you will be able to create your own DHCP server with a Cisco 2911 router, perhaps in a home lab setting, and prepare you to build your own on other hardware.  Why a Router?  A DHCP server is a centralized, automated service that assigns important network configuration details to devices on a network, such as IP addresses. Without it, we would have to create manual entries for our entire network, which can be time-consuming and lead to errors. Traditionally, there are dedicated servers to handle these functions. There are many ways to implement a DHCP server in your topology, including a dedicated physical server, a virtual machine, cloud-based gateways, and firewalls. However, there are specific benefits to using a router as your DHCP server: Reduced infrastructure: While havi...

New Series: IP in Practice

I have done a few posts on subnetting and the inner workings of DHCP. I wanted to do a post on IPv6 and a hands-on demo on implementing DHCP on actual networking equipment. However, I missed a few parts that I would like to cover that would particularly help in understanding how IP works and why it is needed. Unlike the previous series, this will be a direct approach to a certain protocol: Internet Protocol (IP). I recently started my first series, covering important ports, protocols, and acronyms used in the networking field. However, I realized not only is it difficult to address the ones to mention, but for some letters it's hard to find. The intended structure was to have several per letter not just one. The idea seemed fun and engaging, however, doing over 20 posts alphabetically on acronyms, ports, and protocols lacks order and deviates from the direct approach I want this blog to have. For that reason, I am putting it on hold indefinitely. It was fun at first, but it was not...