1 minute read

snetc is a native command-line subnet calculator. It is aimed at the practical work around CIDR blocks: inspecting a subnet, splitting it, aggregating adjacent routes, finding free space, planning VLSM allocations, checking overlaps, doing longest-prefix-match lookups, classifying RFC ranges, and converting address ranges into minimal CIDRs.

It is the kind of tool that is easy to underestimate until you are editing firewall rules, Terraform variables, Kubernetes network ranges, or routing tables and need a precise answer quickly.

For a quick subnet inspection:

snetc 192.168.0.0/22

To aggregate adjacent networks:

snetc aggregate 10.0.0.0/24 10.0.1.0/24

To plan allocations by host count:

snetc plan 10.0.0.0/24 50 25 10

The command set is intentionally direct. contains answers membership questions, free shows unallocated space under a parent CIDR, overlaps catches conflicting ranges, lpm picks the best matching route, and classify labels addresses against well-known RFC ranges.

That makes snetc useful with agents because network math is an area where confident-looking guesses are expensive. An agent can ask the CLI for exact CIDR operations, parse JSON output when needed, and then edit config files with computed evidence instead of hand-derived ranges. It also gives review agents a simple check for whether proposed network changes overlap, waste space, or collapse cleanly.

Updated: