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

IP in Practice: Public and Private IP Addresses

Do you speak another language? Personally, I love learning new languages, but one of the hardest parts is translation. When it comes to networking, it is something similar. Devices within our home and office networks do not directly go to the internet. There needs to be a "translator". What does this have to do with public and private IPv4 addresses? In this post, we will explore: IPv4 Addresses Private Ranges  The difference and teamwork between NAT and PAT Helpful troubleshooting commands such as ipconfig or ping A demo that puts it altogether.  (Link to topology here .) By the end of this post, you will see how public and private IP addresses work together in action.  IPv4 Address Private Ranges RFC1918 Private IP Address Ranges Class IANA Blocks Range Total Addresses A 10.0.0.0/8 10.0.0.0 - 10.255.255.255 16.7 million (16,777,216) ...

IP in Practice: Special IPv4 Addresses

We have already discussed three private ranges used in classful and classless subnetting. The list does not stop there. This post identifies five types of special IP addresses that you will encounter. By the end of this post, you should have a clearer understanding of how these addresses are used in troubleshooting, how they appear on certification exams, and how they shape the way traffic moves across the Internet. 1. Loopback Address (127.0.0.1) Every networked device has a loopback address. Most commonly, it is 127.0.0.1 . The loopback address is typically used to test internal connections. You may wonder, “Why do I need to know if my device can connect to itself? Shouldn’t it connect to other resources and the Internet?” Think about it this way. Before you walk out the door, you make sure you look presentable by taking a shower, brushing your teeth, ironing your clothes, and checking yourself in the mirror. Once everything looks good, you are ready to go. Similarly, your comput...

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...