IPv4 address classify
ipv4-address-classify · version 1.0.0 · URLs & IP addresses · free, no key needed
Classify an IPv4 address against the static IANA IPv4 special-purpose address registry.
Use when you need to: ipv4 address classify · is ipv4 private · ipv4 special purpose lookup.
Supported
- ipv4 address classify
- is ipv4 private
- ipv4 special purpose lookup
Not supported
- IPv6
- routing-table-aware or organization-specific reservations
- live registry lookups
Behavior
- address is a canonical dotted-decimal IPv4 address.
- classification is the single most-specific (longest-prefix) matching label from a fixed, embedded table of well-known IANA IPv4 special-purpose ranges; "public" if no entry matches.
- Labels: this_network (0.0.0.0/8), private (RFC 1918), shared_address_space (100.64.0.0/10), loopback (127.0.0.0/8), link_local (169.254.0.0/16), reserved (192.0.0.0/24, 192.88.99.0/24, 240.0.0.0/4), documentation (TEST-NET-1/2/3), benchmarking (198.18.0.0/15), multicast (224.0.0.0/4), broadcast (255.255.255.255/32), public (everything else).
- matched_range is the exact embedded CIDR entry that matched, or null when classification is "public".
Input
address(string, required): max length 15; pattern^(?:0|[1-9][0-9]{0,2})(?:\.(?:0|[1-9][0-9]{0,2})){3}$
Output
classification(one of "this_network", "private", "shared_address_space", "loopback", "link_local", "reserved", "documentation", "benchmarking", "multicast", "broadcast", "public", required)matched_range(string or null, required): max length 18
Limits
- Request body up to 256 KiB
Example
Request input:
{
"address": "192.168.1.1"
}
Response:
{
"result": {
"classification": "private",
"matched_range": "192.168.0.0/16"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv4-address-classify",
"version": "1.0.0",
"input": {
"address": "192.168.1.1"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv4-address-classify/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"address":"192.168.1.1"}'
The machine-readable contract is at /v1/tools/ipv4-address-classify/versions/1.0.0.
CLI
node cli.mjs run ipv4-address-classify 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv6 address classify: Classify an IPv6 address against the static IANA IPv6 special-purpose address registry.
- IPv4 address compare: Compare two canonical IPv4 addresses by their numeric uint32 value.
- IPv4 address distance: Compute the signed integer distance between two IPv4 addresses (address_b minus address_a).
- IPv4 address offset: Add a signed integer offset to an IPv4 address, throwing if the result leaves the IPv4 address space.
- IPv4 in CIDR: Test whether a canonical IPv4 address lies in a CIDR prefix whose host bits are zero.
- IPv4 range to cidrs: Convert an arbitrary IPv4 address range into the minimal list of CIDR blocks that exactly covers it.