Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Math Question: number of possible IP addresses

Posted on 2007-11-26
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 46

Assisted Solution

by:Kent Olsen
Kent Olsen earned 200 total points
ID: 20350151
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 400 total points
ID: 20350232
LVL 12

Assisted Solution

by:Sinoj Sebastian
Sinoj Sebastian earned 400 total points
ID: 20350240
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 44

Assisted Solution

Darr247 earned 400 total points
ID: 20352596
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 169.254.xxx.xxx 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 400 total points
ID: 20361253
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 200 total points
ID: 20365024
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

ID: 20365868
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 (xxx.xxx.xxx.xxx) 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
This article provides a brief introduction to tissue engineering, the process by which organs can be grown artificially. It covers the problems with organ transplants, the tissue engineering process, and the current successes and problems of the tec…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

636 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