01-10-2025

Announcement:

Hey there, sorry for the lack of posts I've recently had a ton of exams all happen at once. I hope to continue updating this site with more things I've learned throughout my classes.

The S-word

The S-word scares young College students, but fear not Classful Sub-networking, or subnetting for short, is not that hard. For years I was confused on how exactly one subnets, what is a subnet, are there spiders involved, and what is the point? I hope to answer most of these throughout this article, but I may continue on additional articles, if I do I'll likely add the #subnetting tag to make them easier to find using the search bar.

So, before we get started on how one subnets, you need to understand the what and why. Subnetting is the action of creating smaller (sub)networks to better secure a network. These subnets allow you to isolate networks from each other. For example you have 3 departments Finances, Sales, and HR you dont want the network traffic from Finances to be seen from Sales and HR so you give each port on the router their own subnets with a 255.255.255.0 (/24 in CIDR notation) like so:

flowchart LR

A[WAN] -->|Public IP| C(Router)

C -->|E1: 192.168.1.1| D[Finance]

C -->|E2: 192.168.2.1| E[HR]

C -->|E3: 192.168.3.1| F[Sales]

Whats happening here is each ethernet port on the router is assigned the first usable address for each subnet. This informs the hosts on the network what network they are a part of. The Network ID is always the literal first address in the subnet and the broadcast address is always the literal last address. When making subnets we should keep this in mind as they are requirements Now you might be asking how do I determine what start and end of a subnet is? Well, you can determine this with some math!

To start out you need to understand how networks determine addresses. They use 4 bytes in total for the standard IPv4 address eg. 192.168.1.0. Each octect, or subsection, in the IP can go up to a maximum of 255 with a total of 256 possible numbers. Meaning they can range from 0-255. We know this because the each octet is made up of 8 bits and the max number 8 bits can be is 255. Furthermore, this number is not arbitrary and relies on the base 2 system meaning that the number of bits determines what the max number is like so 2^b where b is the number of bits. To find out the maximum number of address possible in the IPv4 configuration you find 2^32 which is ~4.3 Billion. I do not know if you're aware but there are far more than 4.3 billion devices connected to the internet so, we've had to both make a new standard to allow more addresses with IPv6 and had to workaround this by giving consumers only 1 IP address. I'll touch more on IPv6 at a later date.

What does, Classful Subnetting mean? Classful subnetting refers to using an old system that relies on using IP classing to determine the number of network+host bits and in tandem the number of hosts each class can distribute. This is also known as the mask, which tells the computer what octets can and cannot be changed. Each class is as follows:

Class First Octet IP range Net.Host bits Mask
A 1-127 n.h.h.h 255.0.0.0
B 128-191 n.n.h.h 255.255.0.0
C 192-223 n.n.n.h 255.255.255.0
D 224-239 *[1]
E 240-255 *[2]
Note

For ease of understanding I'm going to be using Class C addresses for my examples to simplify the math involved.

This will conclude today's article, tomorrow I'll go over the answers to this problem:

We have touched on subnet masking so now the fun begins. Say for example each of our subnets needs to hold 20 hosts and allow for 20% growth how would we determine what the mask is, how many subnets can we support, what is the range of each subnet, and what are the network ID and broadcast IP?

<< Previous | Next >>`


  1. These are special IP's reserved for multicast addresses and do not have a defined mask ↩︎

  2. These are reserved for experimental/research purposes and do not have a defined mask ↩︎