IT and security stuff

IPv4 addressing basics

IP stands for Internet Protocol. We can compare this as a phone number or a home address. It is numeric and serves as an identifier for a device or a network. Every device on a network has it’s own IP address. There are two parts in a IP address : the network address and the host address.

An IP consists of 4 numbers separated by periods which represents 4 octets of 8 bits. The range of a number is 0-255 which allows 4,294,967,296 possible unique IP.

It’s important to know that computers and networks don’t read the IP addresses like we do. They will only read numbers in binary format. Binary numbers only use 0’s and 1’s.

So how do we get from 11000000.10101000.00001100.00011100 to 192.168.12.28?

IPv4 is made of 4 octets of 8 binary bits. The bits in each octet is represented by a number.

Each bit in an octet is either a 1 or a 0. If the number is a 1 then the number it represents counts. If the number is 0 then the number it represents does not count. So using the octet chart we can obtain a number between a range of 0 to 255.

In the previous IP example, the first octet is 192. How do we get from 192 to a binary number? First, we would look at the chart and put a 1 under the numbers that would add up to a total of 192. In this case 128 + 64 = 192. We can now put 0’s to every other bits.

In this case, 11000000 represents 192.

Let’s do the same for the next octet which is 128.

128 on it’s own equals 128 which in binary is 10000000

Going forward with 12.

8 + 4 = 12 which is 00001100

And finally,

16 + 8 + 4 = 28 which gives 00011100

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.