Math Question: number of possible IP addresses

Posted on 2007-11-26
Last Modified: 2010-05-18
Somebody told me that the world would soon run out of IP addresses.  But I think there must be a humongous number of available IP addresses out there...

Just exactly how many potential numbers are there?

I think it must be 255 factorial to the fourth power but I could be wrong.... I always sucked at math.

Question by:hankknight
LVL 45

Assisted Solution

Kdo earned 50 total points
Comment Utility
Hi hankknight,

roughly 2^32, but there are a significant number of quasi-reserved addresses, like anything that ends in 0.

An IP-4 address is 4 8-bit bytes.  So the address range would be all numbers that can be respresented in 32 bits.

Good Luck,
LVL 53

Accepted Solution

Infinity08 earned 100 total points
Comment Utility
LVL 12

Assisted Solution

by:Sinoj Sebastian
Sinoj Sebastian earned 100 total points
Comment Utility
look at the table

A Class     126 X 16,777,214   =  2,113,928,964
B Class    16,384 X 65,534      =  1,073,709,056
C Class    2,097,151 X 254      = 532,676,354
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

LVL 44

Assisted Solution

Darr247 earned 100 total points
Comment Utility
But that's more than what's really ''avaialble.''

-  16,581,375 IPs from class A private addresses
-   1,040,400 IPs from class B private addresses
-      65,025 IPs from class C private addresses
3,702,627,574 or just 1 IP for every 1.78 persons on earth.

I'm not sure if the 65,025 from the range also reserved by IANA should be included or not.

Some companies are rather wasteful with their IPv4 addresses... using public ranges they've acquired to address devices that will never communicate outside their LAN. But IPv6 should make owning a range of IPs cheaper than buying a router.  Then we can all assign IPs wastefully. ;)
LVL 24

Assisted Solution

SunBow earned 100 total points
Comment Utility
IMO you go for the wrong answer ("I think it must be") (like " all numbers that can be respresented in 32 bits.") when answer is more of: "2^32, but there are a significant number of quasi-reserved addresses, like anything that ends in 0." I'll initially ditto Kdo, but here is the simpler (rough) answer, the 32 bits are made more convenient to humans (supposedly) by the use of 'octets' (three digit code, but decimal not octal). in dotted notation each up to 256 (0-255) but you cannot count either the zero or the 255 or a handful of others for the purpose of the question (running out of numbers to call home). 256 decimal is 100 hexidecimal, if you permit zero then that is 00-FF in hex notation. Largest number would then be FF.FF.FF.FF or FFFFFFFF or (plus one) a total space of 100000000 (eight zeroes) in hexadecimal. With Windows so predominant, take its 'calc' program, enter 100000000 hex then press decimal and result is 4294967296, adding commas 4,294,967,296 or roughly four billion, similar enough to the results of sinoj and Darr247 in my opinion. Businesses hog a lot of addresses, so the space for real humans is much less.

The rules do not permit either all zeroes or all ones, one for network the other for broadcast. so instead of up to 256 per octet you get trimmed right off to only 254, even before the overheads of the networking equipment such as routers, or for subnetting (further breakdown of any of the 256's) not to mention multicasting and numerous reservations. You cannot do a 10.x.x.x (military) for example, but many will.

255 factorial to the fourth power but I could be wrong

try just erasing the 'factorial' term and you got it, the set of numbers is 256 to the fourth power, and eliminating the all zero or all one condition by octet gives range of 254, or FD.FD.FD.FD (hex).

256 is 2 ^ 8 or 2 ** 8 (two to the eighth power)

FDFDFDFD hex is a decimal 4261281277 in calc, 4,261,281,277 with the commas. Take the initial 4294967296 and subtract 4261281277 and see that 33,686,019 addresses are unavailable before even introducing the other issues for subnetting and networking and special reservation. While that can be like losing a country from the internet, when considering the range available as in the billions, the running out of addresses is not so bad yet. A problem can come when some company reserves addresses in big blocks (major example of class A address you'll not be getting for yourself) and not even bothering to use half of them, and by such a disabling of over half of addresses  available to regular people is much more dramatic impact than the broadcasting omissions.

Any mis-typos are my own and not the fault of MicrSoft's calculator

> Somebody told me that the world would soon run out of IP addresses
> Just exactly how many potential numbers are there?

The numbers are there, not every human needs a personal one, and given the nature of not all of us using it at the same time, DHCP, ability to share addresses, the numbers are there, what is needed is the management of the addresses to reduce, if not eliminate all the waste.

Assisted Solution

Talmash earned 50 total points
Comment Utility
the world is upgrading to IPv6 standard:
2^128 = 2^(8*16) = (2^8)^16 = ((256)^4)^4 = (256^4)^4

the OLD 2^32 standard, will be used only in some LANs (local nets)

although there are again "available" intervals (subnets, illegal addresses etc..) but this is going to be sufficient for a long time.

few years ago, one of the TCP-IP consortium announced that "with the IPv6, we can give IP address to every particle in the universe.."

LVL 10

Expert Comment

Comment Utility
Yep, with IPv6 there are plenty of addresses.
The concern you've read about deals with the current standard.

Actually, the result is nowhere close to 255 factorial.

An IP address is formatted ( where a xxx generally ranges from 0 to 255. Ignoring loop-backs, broadcasts, and any subneting. The limitation is 2^32.

I'm not sure IPv6 could assign an IP to each particle in the universe, but its definitely enough for our planet, and any future colonization we may endeavor into the foreseeable future.  

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! How to Know You are Making a Difference at EE In August, 2013, one …
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now