what is the range of public ip address ipv4?

1.2k views Asked by At

I was looping through all the ips over internet.I am inserting all the ips in my database.

I have looped from 0.0.0.0 to 255.255.255.255 but as much as I know most of the ips are Private.

So I want to know the range of public ip addresses on which websites are currently running.

Let me know if I am thinking something wrong. Thanks.

1

There are 1 answers

2
Angus Comber On

Private IP addresses are:

10.x.x.x

and

172.16.x.x to 172.31.x.x

and

192.168.x.x

Also refer to: https://www.rfc-editor.org/rfc/rfc5735

Everything else can be a public IP address.

basically 2^32 - the ranges above. Quite a lot. But less than 2^128 used by IPv6

There are other IP addresses which cannot be used. They are for broadcasts and multicast and possibly other uses. Also don't forget that not ALL the available public IP addresses may be in use at any moment in time. In the early days of the internet many would not be.