Course: IP Version 4 Addressing And Subnetting Deep Dive (Part 5)
Hello and welcome, I am currently working on a video course 'addressing' IP version 4, and I've decided to post my slides and scripts here on STEEM as I go along. I appreciate any feedback or suggestions, or if you are new to the world of computer networking, I hope you enjoy them!
Here is part 5 of a multi-part series. How many parts will there be? I have no idea because I am posting them as I go along.
If you missed any sections, click one of the links below for your favorite front end:
Every allocated network has a two addresses that are not useable by the network administrator. These are the network address, and the broadcast address. The network address is always the first IP address within the block. This address is used to refer to the network itself. Then we have the broadcast address, which is always the last address in the block. It is used to refer to all hosts within the network. Applications can send broadcast traffic to this address and reach all hosts on the network.
In our example we have a /24 or Class C private block of 192.168.42.0. The first address, the .0 is the network address, and the last address, the .255 is the broadcast. The leaves .1 to .254 as useable addresses.
Now that we understand the addressing limitations within a single network block, we can move on to subnetting.
Let’s say we are allocated a full Class C network address, also referred to as a /24 in CIDR notation. That /24 has 24 bits in the subnet mask and network portion of the address, and 8 bits in the host portion. Using subnetting, we can subdivide this network into two or more smaller blocks called subnets. We do this by adding bits to the subnet mask to create a subnet address. This borrows bits from the original host address, and dedicates them to subnetting. This lowers the number of available host address while creating subnetworks.
The most common scenario in modern day networks is to receive a /24 or smaller and to then be required to subnet that down into appropriately sized chunks. For that reason we will use the /24 as a reference point to start. A /24 is a full Class C network address that contains 256 host addresses, Subtracting for the network and broadcast address, this creates 254 useable addresses. The /24 has a normal classful subnet mask. As we add a bit to the network address, you can see that the number of hosts is cut in half and another network and broadcast address are subtracted from the available hosts on that subnetwork. We will see this phenomena from a mathematical perspective a bit later.
Continuing on down the line, we subtract a bit and the available hosts is reduced in half again and again until we get past the /30 range. /31 address is unique application of subnetting, as there are no network or broadcast addresses. The /32 address is considered a host address, or host route, because it represents just a single IP address. We will discuss the application of both of these address types later on.
As promised, let’s take a look at the equation for finding the number of available hosts on a subnet.
It is simply 2 to the power of n minus 2, where:
- 2 represents the possible binary numbers of one and zero
- n represents number of host bits or 32 minus the number of bits in the subnet mask
- -2 represents the subtraction of the network and broadcast addresses
Let’s take a look of some examples in the next slide
Here are some examples of calculating the useable hosts on a subnet. These are not exhaustive of the examples we covered so far, but it should be enough to see the pattern of what is going on when you manipulate the subnet mask. See if you can plug in the /26 and /28 on your own.
Thanks for viewing. In the next part, I will quickly go over each subnet length in more detail, so you can further solidify the pattern in your head.