by iJohnDoe · 6y ago · 0 comments
IPv4 scarcity only hits in certain segments. It doesn’t hit the major players.
The real problem is the hoarding by the major players. AWS will most likely never use that many IP addresses. I know that sounds like a stretch based on what we’re led to believe about running out of IPv4 addresses. I don’t know their IPv4 utilization, so it’s a guess. My guess is based on how we deploy internet facing services these days. It’s less dependent on needing lots of public IPs.
Can you expand on this a bit? I'm not a networking guru but it's my understanding that an IP address is an IP address, how could it be used more or less efficient?
A /24 has:
- .0 - network address - can't be used
- .255 - broadcast
On top of that you generally need at least 1 more IP address that is the gateway for that network.
- .1 - Usually
If you have a network with fail-over gateways generally you need to assign them individual IP's, so you end up with:
- .1 - floating IP
- .2 - router 1
- .3 - router 2
If you end up subnetting down into small subnets to give customers only let's say 16 IP's, (so a /28 (32 bits - 4 bits)) customers can only use 13 of those addresses (network/broadcast/gateway are already taken).
This gets worse as you go smaller, because each time you subnet you end up losing more IP's to the network/broadcast/gateway.
The rest of the network doesn't care what they look like at certain scopes. Those devices just know to route it to the next hop, and when that next-hop is your box with a bunch of interfaces/aliases/whatever configured, it'll just handle it.
Try it, you'll like it.
(Edit: IPv4 here, hence /32. No such foolery needed with v6.)
Since this is about AWS... they don't do that. They will assign a random IP out of their available public IP for every resource that needs an IP. For many of these you can allocate an IP and move it around if you want (that's why they call it 'Elastic IPs').
Unless you have special needs (and actually own the IP ranges) your VPCs will all be in a private IP range. You can even have multiple VPCs with the same range with zero issues (unless you want to peer them).
Each network needs at least one gateway inside that network to reach the rest of the world, so that IP address is lost. Conventionally you also lose the lowest and highest IP address in a block to the network number and broadcast address (you can free those up, but it might confuse devices or admins)
So for every split or subdivision you make, you lose at least 3 addresses.
Conventionally you also split a network at a specific bit boundary (CIDR) so each network has 2^n IP addresses in it. If you went for n=4, you have 16 addresses and already lost 3 to the above factors, so now you have 13 addresses left.
If you happened to have 14 machines attached to that network, you need a network with 2^5 = 32 IP addresses, and you've got 15 unused IP addresses with no way to give them back to a higher level.
All quite similar to why a phone area code may not be able to make use of all phone numbers inside that area, but have no way real practical way to give them to other networks.
Pretty sure that we’ll never see routing tables with 4 billion entries. So it has to end somewhere.
Why would any significant fraction of these servers require public IPs? And services for that matter.
I wouldn't be surprised if most of them are in private VPCs with only very few endpoints exposed.
If you are referring specifically to AWS, having servers in public subnets is actually an anti-pattern. You may want to do so with bastion hosts and a handful of more specialized services. For everything else, put them behind a load balancer. A single NLB will take one IP per availability zone and will be able to service hundreds of servers, if not more.
Then you have things like Cloudfront and the like.
Not many IPs are needed, overall, compared to the number of actual servers.
My ISP only gives CGNAT or is happy to rent IPv4 for a premium, one address at a time. Keeping IPv6 out helps the IPv4 margins and staves off competition.
Are you sure about that? A comment here said that they had 1.4 million servers in 2014, and AWS at the time was probably 1/50th of what it is now. On top of that, I think they have some IoT offerings, and who knows what they're going to offer in the future? They're basically building an internet-sized platform to run half the internet on top of it.