Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stop Guessing Subnet Sizes: A Practical Mental Model for IPv4 Subnetting

Most people learn subnetting as a pile of formulas: count the bits, subtract two, memorize the table. That works for exams, but it falls apart the moment you are standing in front of a real network with an IP like 10.0.5.130/27 and someone asks "what network is this on?" This article is the version I wish someone had given me: a single mental model that turns every subnetting question into…

Most people learn subnetting through formulas and memorization, but this approach breaks down in real-world scenarios. A mental model can simplify the process, allowing you to perform subnetting calculations mentally. An IPv4 address consists of 32 bits, with a prefix like /26 indicating that the first 26 bits represent the network, and the remaining 6 bits signify the host.

From this, you can determine that there are 64 total addresses and 62 usable hosts per subnet, as the first address is the network ID and the last one is the broadcast.

A shortcut to simplify subnetting is the block size, calculated as 256 minus the last non-255 octet of the mask. For instance, a /26 mask ending in .192 translates to a block size of 64. This block size helps identify subnet boundaries, which must be multiples of the block size. Using the example of 10.0.5.130/27, you can determine that the network address is 10.0.5.128/27, with a usable range from .129 to .158 and a broadcast address at .159.

When allocating subnets, it's crucial to size for future growth, typically adding 30-50% headroom to the current need. With 28 devices, for example, a /27 prefix is insufficient, while a /26 prefix offers 62 usable hosts, which is adequate. However, remember that wasted space is cheap, while renumbering a live network is not.

Common mistakes leading to network outages include misaligned boundaries, mask mismatches after migration, and overlooking reserved addresses (0 and 255). To avoid these issues, ensure every network address is a multiple of the block size, change masks during maintenance windows, and allocate all addresses properly. To verify subnet designs, check for alignment, no overlaps, and sufficient capacity.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Measuring How Cost Scales by Counting Instead of Timing

Code: Megapixel99/countfn Every empirical complexity tool I could find on either registry measures elapsed time. PyPI's big-O estimates the class from execution time, and npm's big-o-calculator times…

  • Countfn tool counts operations (reads, writes, calls) instead of measuring time
  • Provides consistent complexity results across hardware/software environments
  • Demonstrates quadratic time complexity for insertion sort across Python and JavaScript

Make vs Zapier for Freelancers in 2026 — How I Decide (and Why Most “Best Tool” Lists Fail)

Freelancers do not need an automation empire. They need a few reliable pipelines: lead → CRM, form → proposal draft, invoice → reminder, call transcript → Notion. Zapier and Make both do that job.

  • Freelancers need simple automation pipelines: lead to CRM, form to proposal, invoice to reminder
  • Zapier excels in speed of setup, vast app directory, seamless functionality
  • Make offers visual complexity, lower costs at high volume, granular control

Five Cron Fields, One Trap: The Scheduling Bug Nobody Expects

Every backend eventually grows a cron job. Backups at 2 AM, digests at 8 AM, health checks every five minutes. And every team eventually hits the same wall: the schedule that fires at a time nobody…

  • Cron jobs automate tasks like backups and health checks in backend systems.
  • Mixing day-of-month and day-of-week fields in cron schedules leads to unexpected frequent runs.
  • Using UTC and explicit timezone settings can prevent common cron scheduling mistakes.

More from Sunday 27 September →