Understanding IP Addressing – Part 1
Share by
IP addressing is an essential part of computer networking, in fact it is the heart of network communication. Yet many people new to the world of Networking find it difficult to understand the IP addressing concept.
Here is a first of series of post that would be posted to help anyone interested to understand the concept of IPv4 addressing and how it applies to computer networking;
Understanding IP Addressing – Part 1
The whole idea of IP addressing is to uniquely identify a device on a network. Every device on
the network should have a unique IP address.
IP version 4 addresses are made up of 32 binary bits which are divided to 4 four portions. Each
portion consist of 8 binary bits which is also known as and octet (8 bits = 1 Octet).
IP addresses are usually expressed in dotted decimal, with each octet representing a decimal
value between 0 – 255. If expressed in binary a 0 value would be 00000000 and 255 value
would be 11111111.
The math behind the binary to decimal conversion is as follow;
1. The right most bit, also called the least significant bit (LSB) always have a value of 20
2. The left most bits, also known as the most significant bit (MSB) always have a value of 27
3. All other bits between the LSB and MSB would increase by 1 from 0 – 7.
Here is a breakdown of the values of the 8 bits each octet of an IP address;
Binary |
1 |
1 | 1 | 1 | 1 | 1 |
1 |
1 |
Conversion |
27 |
26 | 25 | 24 | 23 | 22 |
21 |
20 |
Decimal Value |
128 |
64 | 32 | 16 | 8 | 4 | 2 |
1 |
The decimal value of the of each octet is derived by adding all the decimal value of all the 1’s in
the octet and ignoring the 0’s. Here are some examples;
192. would be equal to =
Binary |
1 |
1 | 0 | 0 | 0 | 0 |
0 |
0 |
Conversion |
128 |
64 | 0 | 0 | 0 | 0 | 0 |
0 |
128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192
Now let’s look at what the conversion of a proper IP address would look like;
192. 168. 10. 1 = 192.168.10.1 (Decimal)
11000000 . 10101000 . 00001010 . 00000001 = 11000000.10101000.00001010.00000001 (Binary)
Every IP address consist of a Network element and a Host element and this is identified by a
Subnet Mask, also known as Network Mask.
IP addresses comes in different classes with each class assigned a default subnet mask. The
different IP address classes are as follow along with their default subnet mask assignment;
• Class A = Consist of IP address range (1.0.0.0 – 127.255.255.255) and a default mask of 255.0.0.0
• Class B = Consist of IP address range (128.0.0.0 – 191.255.255.255) and a default mask of 255.255.0.0
• Class C = Consist of IP address range (192.0.0.0 – 223.255.255.255) and a default mask of 255.255.255.0
• Class D = Consist of IP address range (224.0.0.0 – 239.255.255.255) This is reserved for Multicast Addresses
• Class E = Consist of IP address range (240.0.0.0 – 255.255.255.255) This is reserved for Experimental
Class D and Class E are reserved, and you should focus on them for now as it is beyond the
scope of this writing.
An example of a class A IP address would look like this along with its subnet mask;
10.0.0.1 255.0.0.0 this can also be represented as 10.0.0.1/8 this is because the first 8 bit in the subnet
mask is 1 and everything else is 0
When you convert the IP address and subnet mask to binary it is become easier to identify the
network element and host element of the IP address;
10.0.0.1 = 00001010 .00000000.00000000.00000001
255.0.0.0 = 11111111 .00000000.00000000.00000000
<Net element | <Host element>
10 = Network element, this is also called the network id or subnet.
0.0.1 = Host element, this also called the host id
As you can see in the above example the network element is identified by the IP address bits
that have a corresponding mask bit set to 1 and the host element is identified by the IP address
bits that have a corresponding mask bit set to 0.
When assigning IP addresses, the network element remains constant and does not change,
however the host element is where the unique IP addresses are assigned to host or devices. For
example if you have an IP address of 192.168.10.0 with a subnet mask of 255.255.255.0 the IP
addressing of hosts would be as follow;
First assignable IP address within the subnet would be 192.168.10.1
• Second address would be 192.168.10.2 and so on, until you get to .255 which is the
highest value for any octet as stated earlier
• Due to the fact that the first 3 octet of the subnet mask being 1’s (255.255.255), the
network element of the IP address would be (192.168.10)
• You can see that the network element of the address did not change (192.168.10)
throughout the address assigning process and only the host element changes for each IP
address assigned.
Leave a comment
Browse by Category
Popular Blogs
-
23 Feb 2020
VxLAN BGP EVPN: TECHNOLOGY BUILDING BLOCKS Feb 2020
Here is another brilliant presentation by our senior consultant at the recently concluded APRICOT...
-
18 Jun 2019
VxLAN BGP EVPN: TECHNOLOGY BUILDING BLOCKS.
One of our senior consultant had a brilliant presentation today on the subject of...
-
18 Jun 2019
Understanding IP Addressing – Part 1
IP addressing is an essential part of computer networking, in fact it is the...