In this article, I will go over what IP addresses are, types of addresses, class-full vs class-less addresses, classes of networks, subnets and CIDR (Classless Inter-Domain Routing) notation.
In the most simplest terms, an IP (Internet Protocol) Address is a unique local address used to locate a computer/device via a network.
There are two types of IP Addresses:
1) IPV4 (32 bit)
2) IPV6 (128 bit)
In this article, we will focus on IPV4 addresses as they are the ones most commonly used.
Let's take a look at an example of an IPV4 address
Each number is called an
octet because it is an 8 bit value.
8 bits means these number can range from 0-255.
This means an IP address starts at
0.0.0.0 and ends at
This range of IP addresses is called the
IP Addresses are actually comprised of 2 addresses in one.
- Network Address
- Host Address
Let's take a look at an example:
172.16: Network Address
0.1: Host Address
Is it always the first two as the network address and last two as the host address?
No. It is dependent on the class of address. We will take a look at them in the following section.
There are a total of 5 classes: A, B, C, D, E
For this article, I will only go over classes A, B, and C because they pertain to devices and are the ones most commonly used.
Class A: Large Networks
Range: 188.8.131.52 - 184.108.40.206
- The first number (octet) is for the network and the remaining three are for hosts.
Class B: Medium Networks
Range: 220.127.116.11 - 18.104.22.168
- The first two numbers (octets) are for the network and the last two are for hosts.
Class C: Small Networks:
Range: 192.0.0.1 - 22.214.171.124
- The first three numbers (octets) are for the network and the last number is for the hosts.
Note: You may notice that 127 is not included in these ranges. The reason is because that is a special one reserved for localhost.
This was called "class-full networking". This was the architecture used from 1981 until 1993. In 1993, CIDR(Class-less Inter-Domain Routing) was invented and we switched over.
Well, let's take a closer look at an IP Address.
This allows for 65,000 hosts per network. If we have a bunch of small offices, we don't need to reserve 65,000 hosts per office. That is over-kill. Thus, we switched over to class-less networking.
Class-less networking relies on sub-netting and sub-net masks instead of classes now. We abandoned class-full networking and use class-less networking instead.
What is sub-netting?
- Sub-netting is breaking up a large network into smaller ones.
What is a sub-net mask?
- A sub-net mask tells us which part of the IP Address is for the network and host.
The 0's are reserved for hosts and the 255 (1) is reserved for the network.
With sub-netting, let's take a look at a previous IP Address used:
126.96.36.199 would be
This would allow for about 65,000 hosts in our network as mentioned previously.
We can break our network class into something smaller using our subnet mask.
So, instead of
255.255.0.0, it could be
This would now only allocate 256 hosts per network. That is a lot better, and more manageable than 65,000.
CIDR Notation is a way for us to include the IP Address and the subnet mask.
/24 is the same as
This just means the first 24 bits of the subnet mask are turned on.
24 / 8 = 3 (first three octets of IP Address).