This API allows you to programmatically interact with the IPv6 subnetting and conversion tools.
http://tools.forwardingplane.net/api/
Generate or count subnets from a given IPv6 prefix.
Query Parameters:prefix
— IPv6 CIDR (e.g. 3ffe::/32
)new_prefix
— New prefix length (e.g. 40
)limit
— (optional) Limit the number of subnets returnedcount_only
— (optional) Set to true
to return only the countGET /api/subnets?prefix=3ffe::/32&new_prefix=40&limit=5
Response:
{ "count": 256, "subnets": [ "3ffe::/40", "3ffe:0:100::/40", "3ffe:0:200::/40", ... ] }
Convert between IPv4 and synthesized IPv6 (RFC 6052).
Query Parameters:ip
— IPv4 or synthesized IPv6 addressprefix
— (optional) IPv6 prefix for IPv4 to IPv6 conversion (default: 64:ff9b::
)GET /api/convert?ip=192.0.2.33&prefix=64:ff9b::
Response:
{ "result": "64:ff9b::c000:221" }
Decode a MAC address from an SLAAC IPv6 address (EUI-64 format).
Query Parameters:ipv6
— SLAAC IPv6 address (e.g. 2001:db8::0200:ff:fe00:1234
)GET /api/decode?ipv6=2001:db8::0200:ff:fe00:1234
Response:
{ "mac": "00:00:00:00:12:34" }
Convert a link-local IPv6 address to a MAC address, or a MAC address to a link-local address.
Query Parameters:value
— Either a MAC address (e.g. 00:1a:2b:3c:4d:5e
) or a link-local IPv6 address (e.g. fe80::1a2b:3cff:fe4d:5e6f
)GET /api/linklocal?value=00:1a:2b:3c:4d:5e
Example (IPv6 → MAC):
GET /api/linklocal?value=fe80::1a2b:3cff:fe4d:5e6f
Response:
{ "result": "00:1a:2b:3c:4d:5e" }
[::1]
or adapt the server to use localhost
limit
parameter to avoid long responses