{"uid":"cap_8mGM8j0PrFLF9NFV3XbiO","slug":"ip-subnet-calculator-cidr-block-details-88d06c4f","name":"IP Subnet Calculator (CIDR Block Details)","description":"Compute network details of a CIDR block — network & broadcast address, usable host range, total and usable address counts. Works for IPv4 and IPv6 (counts returned as strings for large IPv6 blocks). Honours RFC 3021 for /31.","url":"https://ip.openverbs.com/v1/subnet","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["cidr"],"properties":{"cidr":{"type":"string","maxLength":64,"minLength":3,"description":"CIDR block, e.g. \"192.168.1.0/24\" or \"2001:db8::/48\"."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DeqDXtjIuWLlAzxeW_aul","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes full subnet details for a given CIDR block: network address, broadcast address, usable host range, total address count, and usable host count — for both IPv4 and IPv6.","exampleAgentPrompt":"What are the network address, broadcast address, usable host range, and total host count for the subnet 192.168.1.0/24?","exampleUseCases":[{"title":"Plan IP allocation for a new VLAN","prompt":"I'm setting up a new VLAN with subnet 10.20.30.0/27 — can you tell me the network and broadcast address, the usable host range, and how many devices I can put on it?"},{"title":"Validate IPv6 subnet capacity","prompt":"We're allocating an IPv6 block at 2001:db8:cafe::/48 for a data center — how many total addresses does that give us, and what's the usable range?"},{"title":"Audit firewall rule CIDR coverage","prompt":"I have a firewall rule covering 172.16.4.0/22 — what's the exact range of IPs that covers, including the first and last usable host addresses?"}],"resultDescription":"Returns a JSON object containing: network address, broadcast address, first usable host IP, last usable host IP, total address count, and usable host count for the given CIDR. For large IPv6 blocks, address counts are returned as strings to avoid integer overflow.","failureModes":["Malformed CIDR string (missing prefix length, invalid IP octets) returns a 4xx error","IPv4 and IPv6 address family mismatch in input","Prefix length out of valid range (e.g. /33 for IPv4) returns validation error","Empty or missing cidr field returns a 400 bad request"],"whenToPreferThis":"Use this endpoint when you need precise, RFC-compliant subnet arithmetic for either IPv4 or IPv6 CIDR blocks — especially when you need all key subnet attributes (network address, broadcast, host range, counts) in a single call. It correctly handles edge cases like /31 point-to-point links (RFC 3021) and returns large IPv6 counts as strings to preserve precision. Prefer it over manual calculation or general-purpose IP libraries when working in an agent pipeline that needs structured, reliable subnet data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:41:22.455Z","isFirstParty":false}