The exact API subnet.abadawod.dev's own frontend uses. No API key required — see the rate limit note below.
| name | type | description | |
|---|---|---|---|
| ip | string | required | IPv4 address, e.g. 192.168.1.10 |
| cidr | integer | required | Prefix length, 0–32 |
$ curl "https://subnet.abadawod.dev/api/subnet?ip=192.168.1.10&cidr=24"
{
"ip": "192.168.1.10",
"cidr_notation": "192.168.1.0/24",
"subnet_mask": "255.255.255.0",
"wildcard_mask": "0.0.0.255",
"network_address": "192.168.1.0",
"broadcast_address": "192.168.1.255",
"first_host": "192.168.1.1",
"last_host": "192.168.1.254",
"total_addresses": 256,
"usable_hosts": 254,
"ip_class": "C",
"address_type": "Private",
"note": null
}
| name | type | description | |
|---|---|---|---|
| base | string | required | Base network in CIDR form, e.g. 10.0.0.0/24 |
| hosts | string | required | Comma-separated host counts, e.g. 50,20,2 |
$ curl "https://subnet.abadawod.dev/api/vlsm?base=10.0.0.0/24&hosts=50,20,2"
{
"base_network": "10.0.0.0/24",
"subnets": [
{ "hosts_requested": 50, "cidr": 26, "network": "10.0.0.0/26", "usable_hosts": 62, ... },
{ "hosts_requested": 20, "cidr": 27, "network": "10.0.0.64/27", "usable_hosts": 30, ... },
{ "hosts_requested": 2, "cidr": 30, "network": "10.0.0.96/30", "usable_hosts": 2, ... }
],
"addresses_used": 100,
"addresses_available": 256,
"addresses_remaining": 156
}
| name | type | description | |
|---|---|---|---|
| ip, cidr | string, int | required | The subnet this device config is for |
| device | string | required | cisco_router · cisco_switch · fortigate |
| interface | string | optional | Interface name, e.g. GigabitEthernet0/1 |
| description | string | optional | Used for the ACL name, DHCP pool name, VLAN name, etc. |
| include | string | optional | Comma list. Router: acl,dhcp,ospf,nat,route,ssh,ntp,syslog,hsrp,aaa. Switch: trunk,port_security,dhcp_snooping,ntp,syslog,aaa. FortiGate: dhcp,route,security,ha,ntp,syslog |
| acl_type | string | optional | cisco_router only — standard (source only) or extended (source+destination, default) |
| vlan | int | optional | cisco_switch only — VLAN ID (default 10) |
| stp_mode | string | optional | cisco_switch only — rapid-pvst (default) · pvst · mst |
| ntp_server, syslog_server, aaa_server | string | optional | Target servers for the ntp/syslog/aaa include options — falls back to a placeholder if omitted |
| hsrp_group, hsrp_priority | int | optional | cisco_router only — HSRP group number (default 1) and priority (default 110) |
| hostname, wan_interface, route_next_hop, ssh_username, ssh_domain, trunk_interface | string | optional | Fine-tune specific sections — see source for defaults |
$ curl "https://subnet.abadawod.dev/api/config_gen?ip=10.0.0.0&cidr=26&device=cisco_router&description=Sales-LAN&include=acl,dhcp,ntp,syslog&acl_type=extended&syslog_server=192.168.1.5"
{ "device": "cisco_router", "network": "10.0.0.0/26", "config": "! ── Identity ──\nhostname R1\n..." }
{
"base": "10.0.0.0/16",
"sites": [
{ "name": "Riyadh HQ", "departments": [
{ "name": "Sales", "hosts": 50 },
{ "name": "IT", "hosts": 20 }
]}
]
}
$ curl -X POST https://subnet.abadawod.dev/api/enterprise \
-H "Content-Type: application/json" \
-d '{"base":"10.0.0.0/16","sites":[{"name":"HQ","departments":[{"name":"Sales","hosts":50}]}]}'
{
"base_network": "10.0.0.0/16",
"sites": [ { "name": "HQ", "network": "10.0.0.0/26", "departments": [ {...} ] } ],
"addresses_used": 64, "addresses_available": 65536, "addresses_remaining": 65472
}
{
"wan_base": "203.0.113.0/28",
"link_size": 30,
"topology": "hub_spoke",
"sites": ["Riyadh HQ", "Jeddah Branch"],
"hub": "Riyadh HQ"
}
// topology: hub_spoke | point_to_point | mesh_full | mesh_partial
// "hub" required for hub_spoke; "links": [["A","B"], ...] required for point_to_point / mesh_partial
{
"wan_base": "203.0.113.0/28", "topology": "hub_spoke", "link_size": 30,
"links": [ { "site_a": "Riyadh HQ", "site_b": "Jeddah Branch", "network": "203.0.113.0/30", "ip_a": "203.0.113.1", "ip_b": "203.0.113.2", "broadcast": "203.0.113.3" } ],
"addresses_used": 4, "addresses_available": 16, "addresses_remaining": 12
}
| name | type | description | |
|---|---|---|---|
| device | string | required | cisco_router · fortigate |
| local_ip, remote_ip | string | required | Tunnel endpoint addresses (from a topology link) |
| local_network, remote_network | string | required | The two LAN blocks in CIDR form, e.g. 10.0.0.0/25 |
| local_name, remote_name | string | optional | Site names, used to build the ACL/tunnel identifier |
$ curl "https://subnet.abadawod.dev/api/vpn_gen?device=cisco_router&local_ip=203.0.113.1&remote_ip=203.0.113.2&local_network=10.0.0.0/25&remote_network=10.0.1.0/25"
{ "networks": ["10.0.0.0/26", "10.0.1.0/26", "10.0.2.0/26", "10.0.3.0/26"] }
{
"input_networks": ["10.0.0.0/26","10.0.1.0/26","10.0.2.0/26","10.0.3.0/26"],
"summary_route": "10.0.0.0/24", "summary_mask": "255.255.255.0",
"covers_addresses": 256, "input_addresses": 256, "extra_addresses_covered": 0,
"note": "This summary covers exactly your input networks with no extra address space."
}
{ "networks": ["10.0.0.0/24", "10.0.0.128/25", "10.0.2.0/25"] }
{
"networks_checked": ["10.0.0.0/24","10.0.0.128/25","10.0.2.0/25"],
"conflicts": [ { "a": "10.0.0.0/24", "b": "10.0.0.128/25" } ],
"duplicates": [],
"gaps": [ { "start": "10.0.1.0", "end": "10.0.1.255", "size": 256 } ],
"clean": false, "total_networks": 3
}
| name | type | description | |
|---|---|---|---|
| ip, cidr | string, int | required | The subnet to calculate (max /28) |
| provider | string | required | aws · azure · gcp |
$ curl "https://subnet.abadawod.dev/api/cloud_subnet?ip=10.0.0.0&cidr=24&provider=aws"
{
"provider": "aws", "cidr_notation": "10.0.0.0/24",
"first_usable_host": "10.0.0.4", "last_usable_host": "10.0.0.254",
"total_addresses": 256, "reserved_count": 5, "usable_hosts": 251,
"reserved_addresses": { "10.0.0.0": "Network address", "10.0.0.1": "Reserved by AWS for the VPC router", ... }
}
{ "enterprise": { ...result from /enterprise }, "topology": { ...result from /topology, optional } }
{ "short_code": "x7k2p9" }
| name | type | description | |
|---|---|---|---|
| code | string | required | The short code returned by save_design |
$ curl "https://subnet.abadawod.dev/api/load_design?code=x7k2p9"