IP Addressing and Subnetting

IP Addressing and Subnetting is among the principal topics in Computer Networking. This article is for anyone who wants to get some idea on the topic. By the end of this article, you will have a brief overview on IP addresses, their two main types and subnetting.

Let’s get started…

Let us first see what these IP addresses are. As you are aware, there are millions of computers and devices connected to the internet all around the world. When we are to send a certain message (called a packet) to a certain computer how do we ensure that our message is delivered to that proper destination? Here is when the IP Addresses come into play.

An IP address is a unique identifier assigned to each device connected to a network. It is just like an address of a house. If we want to send a letter to someone, we send it stating the specific address of the recipient. Then the postman knows to whom it should be delivered. Computers work in this same manner. Every computer connected to a network must have a unique address called an IP address. The destination address should also be included like in the case of letters, when sending data to a computer. Not only that we also need to include the return address.

There are mainly two types of IP Addresses: IPv4 and IPv6.

Let’s begin by looking at IPv4 (IP version 4) addressing as it is the most common in use today. An IP version 4 address is a series of four three-digit numbers separated by periods (dots) (e.g.: 193.148.2.1.). Thereby, an IPv4 address is 32 bits in length. It is divided into four sections which are called ‘Octets’. This each Octet can contain any decimal number between 0 and 255.

Format of an IPv4 address

We know that 1 byte is equal to 8 bits and an 8-bit binary number converted to decimal format will be between 0 and 255. The total of 32 bits means that approximately 4.2 billion possible IP version 4 addresses exist.

All the existing IPv4 addresses are grouped into several classes for ease of use. There we have classes from A to E. The group D and E are not used for computers.

The five Network Classes

There are now more Internet-connected devices in the world than the number of addresses available via IPv4. The new, sixth version called IPv6 introduced due to protocol improvements and this IPv4 address space limitations. The most significant difference between the protocol and background functionality of IPv4 and IPv6 is the address space. It is that IPv6 addresses are in 128 bits.

IPv6 is typically written as eight parts of four hexadecimal digits separated with columns. Hexadecimal numbers represent the numbers 0 to 15 using numbers 0 to 9 and numbers from 10 to 16 represent using A, B, C, D, E and F.

Format of an IPv6 address

Now let’s look at subnetting. Subnetting is nothing but dividing a network into smaller parts. It controls the number of hosts available on a network. This becomes very useful and convenient when dealing with IP addresses as hosts can be divided into several groups. This also minimizes the waste of IP addresses happens when creating a network. For an example think of an instance where we need to create a network having ten computers. Thereby you need to use Class C type IP address. From a C type IP address we can create a network having total 254 computers. When we take 10 out of the 254(254 –10), it creates a waste of 244 IP addresses. That is a considerable amount of waste. With subnetting we can easily minimize these kind of IP address wastage.

A subnet mask is paired with an IP address and is used to identify the network segment and the host segment of a particular address.

Subnet Masks

Okay, now I think you have some basic idea of ​​what we discussed above. Before I end this article I will tell you how to check the IP address of your own PC.

Step 1: On your Windows machine simply open the Command Prompt or the PowerShell window.

Step 2 : Type ‘ipconfig’ to go to your interface settings.

You can now see your IPv4 address, subnet mask and other network related information of your machine as shown in the image below.

I studied several publications to compose this article. If you are interested in knowing more regarding IP Addressing and Subnetting stuff, go check them out. I have put their links below.

Well, this is it for now and hope to see you with another very soon. Until then, stay safe, read more:)

Undergraduate at University of Moratuwa.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store