Table of contents
This piece takes you on a Journey to the World of IPs - 4 billion of them.
Enjoy!๐
IP
An IP (Internet Protocol) Address serves as a unique ID of a computer on the Internet. IPs allow devices on a network to locate and communicate with each other. Generally, IPs are assigned dynamically by the ISP (Internet Service Provider) every time a device connects to the Internet.
IP Addresses come in two flavors: IPv4 and IPv6.
v4
An IPv4 address is a set of 32 bits, divided into 4 octets (8-bit groups) separated by dots - not points! Each octet is equivalent to an unsigned number between 0 to 255.
- v4 IPs start from
0.0.0.0
and end at255.255.255.255
How many IPv4 addresses are available?
Basically, we have four 1-byte "boxes," each of which can be filled with 256 (counting from 0) "items."
Hence, the number of possible IPv4 addresses is: 256^4 = 4,294,967,296
** I hope you get the title now ๐
The Series
Beginning at 0.0.0.0
, IPs grow from right to left as illustrated below:
0.0.0.0
0.0.0.1
...
0.0.0.255
0.0.1.0
0.0.1.1
...
0.0.1.255
0.0.2.0
...
The growth is similar to that of an analog odometer in a bike or a car:
Given an IP say, 2.3.82.23
Then from the above image, it's pretty clear that the next IP in the series would be 2.3.82.24
whereas the one before it would be 2.3.82.22
A few Examples:
10.254.255.255 (Before)
* 10.255.0.0
10.255.0.1 (After)
--------------------------
10.20.2.255 (Before)
* 10.20.3.0
10.20.3.1 (After)
--------------------------
254.255.255.255 (Before)
* 255.0.0.0
255.0.0.1 (After)
Good ole 0's and 1's
~4.29 billion IPs are divided into five classes. The structure of each class is as follows:
Class A :
00000000.00000000.00000000.00000000
to01111111.11111111.11111111.11111111
Class B : It begins with the IP just after class A, and ends at an address whose leading bits are 10 and rest are 1's.
Class C : It ends at an IP with the leading bits 110.
Class D : It ends at an IP with the leading bits 1110.
Class E : It ends at an IP with the leading bits 1111.
Therefore,
Class | Range |
A | 0.0.0.0 to 127.255.255.255 |
B | 128.0.0.0 to 191.255.255.255 |
C | 192.0.0.0 to 223.255.255.255 |
D | 224.0.0.0 to 239.255.255.255 |
E | 240.0.0.0 to 255.255.255.255 |
Find your IP address, and use the above table to figure out your "class."
Class E addresses are not available for public use!
v6
An IPv6 address is a set of 128 bits, divided into eight 16-bit parts. Each part is a hexadecimal number.
Thank You!
See ya soonโบ