Access assignable

When the user asks how many usable hosts are in a CIDR block, what the assignable IP range is for a subnet, or needs subnet mask, wildcard mask, or broadcast address — use NetworkCalc's IPv4 subnet calculator. No auth required.

access-assignable · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/access-assignable. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/access-assignable/SKILL.md.

When to use this skill

When the user asks how many usable hosts are in a CIDR block, what the assignable IP range is for a subnet, or needs subnet mask, wildcard mask, network address, or broadcast address for an IPv4 network — reach for NetworkCalc's /ip/{subnet} endpoint. One unauthenticated GET per question. For DNS lookups or SSL certificate inspection on the same API, use a different skill — this one is purely about IPv4 subnet math.

Your best first call

curl "https://networkcalc.com/api/ip/10.0.0.0/28"

No auth. No key. Replace 10.0.0.0/28 with any IPv4 CIDR the user asks about. The response is a single JSON object under address containing every subnet field an agent needs:

The endpoint accepts comma-separated CIDR blocks like /ip/10.0.0.0/28,172.16.0.0/24 to compare subnets in one call. The meta.next_address field provides a ready-made API URL for walking the next host in sequence.

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can calculate IPv4 subnet details — assignable host counts, broadcast and network addresses, subnet and wildcard masks — from any CIDR block via NetworkCalc, no auth required.

APIs this skill uses

NetworkCalc API · primary · verified

Free public API for networking calculations including subnet calculations, DNS lookups, WHOIS queries, certificate inspection, encoding/decoding, and number base conversion.

Generated from

NetworkCalc API tutorial Getting Started with NetworkCalc API

SKILL.md source (frontmatter + body)
---
name: access-assignable
description: When the user asks how many usable hosts are in a CIDR block, what the assignable IP range is for a subnet, or needs subnet mask, wildcard mask, or broadcast address — use NetworkCalc's IPv4 subnet calculator. No auth required.
---

## When to use this skill

When the user asks how many usable hosts are in a CIDR block, what the assignable IP range is for a subnet, or needs subnet mask, wildcard mask, network address, or broadcast address for an IPv4 network — reach for NetworkCalc's `/ip/{subnet}` endpoint. One unauthenticated GET per question. For DNS lookups or SSL certificate inspection on the same API, use a different skill — this one is purely about IPv4 subnet math.

## Your best first call

```bash
curl "https://networkcalc.com/api/ip/10.0.0.0/28"
```

No auth. No key. Replace `10.0.0.0/28` with any IPv4 CIDR the user asks about. The response is a single JSON object under `address` containing every subnet field an agent needs:

- `assignable_hosts` — count of usable hosts (total addresses minus 2 for network and broadcast). A /28 yields 14, not 16.
- `first_assignable_host`, `last_assignable_host` — the usable IP range boundaries
- `network_address` — the subnet's first address (reserved, not assignable)
- `broadcast_address` — the subnet's last address (reserved, not assignable)
- `subnet_mask` — dotted-decimal mask (e.g. `255.255.255.240` for a /28)
- `wildcard_mask` — inverse of the subnet mask, useful for ACLs
- `cidr_notation` — the input CIDR echoed back
- `subnet_bits` — prefix length as an integer

The endpoint accepts comma-separated CIDR blocks like `/ip/10.0.0.0/28,172.16.0.0/24` to compare subnets in one call. The `meta.next_address` field provides a ready-made API URL for walking the next host in sequence.

## Fallbacks (when the best call isn't enough)

- **Need to walk hosts sequentially** → The `meta.next_address` field in the response is a complete API URL for the next host. Use it to iterate without computing the next IP yourself.
- **Need DNS or SSL data for the same host** → NetworkCalc provides `/dns/lookup/{hostname}` and `/security/certificate/{hostname}`, but those are separate capabilities, not subnet calculations.

## Pitfalls

- Omitting the CIDR prefix (e.g. `/ip/192.168.1.0` without `/24`) returns a /32 single-host result — almost never what the user intended. Always include the prefix length.
- `/31` and `/32` subnets yield `assignable_hosts: 0` per RFC 3021, which is correct for point-to-point links but surprises users who expect at least one usable address.
- `assignable_hosts` already subtracts the network and broadcast addresses. A /24 gives 254, not 256. Do not subtract 2 yourself — you will be off by two.

## One-line summary for the user

I can calculate IPv4 subnet details — assignable host counts, broadcast and network addresses, subnet and wildcard masks — from any CIDR block via NetworkCalc, no auth required.

« Back to all skills