Tom Kroll

Learning about programming, reverse engineering, binary exploitation, and everything else I can about cybersecurity


IPv4 Subnetting

30 Apr 2025

When I was first learning about networking, it was difficult for me to wrap my head around the concept of subnetting. When I'm having a tough time understanding a difficult subject like this, I make it a point to study it hard enough to understand every little aspect (maybe this is the reason for my binary exploitation obsession). Most of the material I found did not explain subnetting well and made the associated calculations much harder than they needed to be (this is a recurring theme with many topics and is the reason for my write-up on printf exploits). Here I'll try to simplify what I've learned and add an extra trick I learned along the way. I'll assume certain requisite knowledge such as how basic IP addressing works and hope that this sparks of a love of binary for you just like it did for me.

Sections:

  1. What Is Subnetting?
  2. Contruction of a Subnet
  3. Calculations
  4. Cheat Sheet



I hope this helps! Happy networking!


Feedback is welcome and encouraged! Please leave a comment below: