Why have we not run out of ip addresses?

274 views

[ad_1]

With the massive growth in internet devices, shouldn’t we have used up all possible ipv4 numbers?

In: Technology
[ad_2]

Not every IP address is “unique”.

To the internet, all the devices in your house connected to your router is using 1 IP address provided by your internet company.

We did, sort of. We have way more devices than ipv4 addresses, but a lot of them are using the same address and hiding behind a local network. For most broadband setups, your entire WiFi network is only consuming one public IP and it’s using a whole bunch of local IPs behind your router.

This bought us some time. Ipv6 was invented to make sure this “never” happens again, it has a far (far far far) larger number of addresses.

We have, essentially. There are five regional internet registries (RIRs) and in the last ten years they have all run out of new IPv4 addresses, most recently in November 2019 when the RIR for Europe, the Middle East, and Central Asia used up their last one.

Some individual ISPs still have unused addresses, and both ISPs and RIRs can recycle old addresses that are no longer being used.

We ran out of unique IPv4 addresses a long time ago. The way it works is that your computer, smartphone, and other devices each have a unique address within your local network, provided by your network router. They all begin with the same numbers. So, all of your devices’ IP addresses might begin 10.20.30.xxx, where each device has a unique number (up to 255) in the fourth position.

That only enables them to “see” each other, though. In order to get out to the internet, you need a modem and an external IP address from your internet service provider. The modem passes the internet traffic to the router, which matches the unique IP address to the destination device’s local IP address. That way, you only really need 1 real IP address per local network.

Google “subnetting” if you’re interested in further research.

1. We switched to ipv6 – this increased the number of ips from 2^32 to 2^128. A lot of infrastructure and network infrastructure switched immediately freeing up space for in ipv4 for other stuff.
2. We cheated. Routers became small devices to “lie” to the Internet and keep track of which device is making which connection while showing only one address to the web. Internal addresses start with 192.168 or 172.16.0.0-172.31. or 10. This is Network Address translation.
3. We Subnet more closely with CIDR and Variable length subnet masks to save addresses; we use network addresses as assignable in certain environments, Probably other cheating.

We did, sort of. We have way more devices than ipv4 addresses, but a lot of them are using the same address and hiding behind a local network. For most broadband setups, your entire WiFi network is only consuming one public IP and it’s using a whole bunch of local IPs behind your router.

We have. We use tricks to put more than one computer on the same IP address. That’s why you have to set up port forwarding if you want to have a Minecraft server.

If your ISP does IPv6 and doesn’t rip you off, you can have an IPv6 address for every computer.

A technique called NAT helped out with that. It’s basically used everywhere both for business and in homes. Fiber connections aside, it’s also a contributing reason why we call the box at home ‘router’ and not ‘modem’ anymore (even though modem functionality may be built in for cable connections).

NAT works like telephone switchboard. Let’s say you call customer service at a major company, there could be 200 people answering the phone but there’s not 200 numbers listed under ‘Contact us’. There is one number that you call and then it’s split up internally. If they call you back, you typically only see their shared number, the one you called, displayed on your phone, not the individual number for the individual operator. Internally, if they need to call a colleague or manager they can use short numbers (“extensions”) like 0046 that doesn’t work outside their telephone system.

Connected devices work similar in a NAT:ed network. They get unique internal addresses and they can share “real” public IPv4 addresses for external connections. The router keeps track that device ABC asked for http://www.reddit.com, so all cat pictures from that connection should go back to that device. There are three ranges for internal use, with the vast majority of devices for private use is configured to use addresses looking like 192.168.0.x. So it’s likely that a number of people in any Reddit thread may actually have the same private IP address, but everyone in their own closed context “behind” their public address.

There’s a thing called carrier grade NAT (Network Address Translation) that enables ISPs to transparently share single IP addresses across many clients.

It does this by mapping a set of ports for each client to the single IP address (like a switchboard, if you will), and the router (the brains of the network) knows which port belongs to who, and forwards the data on accordingly.

Alternatively, some places may be switching over to full IPV6, therefore freeing up IPv4 address space.

Additionally, the governing body of the Internet address space IANA (Internet Assigned Numbers Authority) is able to shift around the number blocks as needed between countries, including take them off you if you aren’t using them.

So there are two versions – at least two that are most common – of the Internet Protocol: IP version 4 (or IPv4), and IP version 6 (or IPv6).

IPv4 allows for 2^32 of unique addresses, or about 4 Billion-ish. This is the most common form of IP space in use today, and technically we have already run out. We’ve tried to expand the number of useful IPs by using something called NAT – or Network Address Translation. This uses what are call “private IP ranges” which create IP addresses that the internet as a whole can’t use, but people in an organization- like a business or school – can. If you’ve ever logged into your wifi router at home and notice the IP address starts with “10” or “192.168” then these are examples of private IP addresses. What NAT does is change that IP address to something the internet CAN use. For example, at home you might have a tv, laptop, and phone that have a different private IP, but when you browse the internet your ISP “translates” those private IPs into a single public IP. If you go to a website like whatsmyip on different devices, you’ll see the same address come up, and it won’t match the IP on your device. This is how, while we have “run out” of IPs, we can still all connect to the internet.

IPv6 was designed to combat this problem. IPv6 allows for 2^128 unique IPs, which is a number I honestly cannot even fathom. It’s not as common (yet) as IPv4, but I would expect that to change within the next decade. With IPv6, we can give every device – even smart or IoT devices – unique and public IP addresses. There are some security concerns with that, but those are being handled as the IPv6 rollout progresses.

Sorry for the long post…I took “explain like I’m 5” literally lol

TLDR: Workarounds like NAT and smaller IP allocations allowed us to kick the problem down the curb, and now we have IPv6 which has solved the problem for the long term.

We did, but we also didn’t.

IP addresses are allocated to organizations in blocks (think street names) and it’s up to them to decide how to use them. All the blocks have been allocated, but not all the individual IP addresses have been used.

Part of the problem is early over-allocation and greediness. In the early days of the internet IPs were handed out like candy. Companies like Apple, AT&T, and Ford got in early on the allocation and have /8’s permanently assigned to them or 16,777,216 IP addresses each. Which is more than they can ever use, but they refuse to give them up.

The US military alone has 13 /8’s assigned to it or 218,103,808 IPs.

Just because these organizations have tons of IPs doesn’t mean they actually use them.

Also we’ve put in work arounds like NAT. NAT works like an apartment block where you can assign 1 address to the whole building despite the building have 200 apartments in it. This cheat is what allowed the internet to continue to grow in the 00’s and most of the 10’s without slowing down.

We also changed the rules, once we realized we needed way more IPs than originally thought the allocation rules were changed to distribute smaller blocks to organizations so that it would be more efficient.

Lastly we have implemented IPv6 now that has 2^128 possible IPs or 340 trillion. Most home users and businesses still use the traditional IPv4 but the cellphone infrastructure runs mostly on v6.

Think about it like this, imagine your in a house and you call out the name Aaron, despite the fact that there are thousands of Aarons that exists on planet earth, only the Aaron that lives inside the house knows you’re talking to him. It’s a similar concept with IP address. Two devices are allowed to have the same IP address so long as they exist in the same local area network (LAN). And because two devices are allowed to have the same IP address, you are less likely to run out of IP address.

I told a conference meeting that we would run out of IPv4 addresses way back when IPv4 was fairly new and I was called an idiot, stupid and more by the so called experts in their fields.

I sure hope those people thought back to what they said when IPv6 became the new standard and realized that they were the dumb ones who could not see the future.