validate_network
Check IP addresses and subnets before using them as a router gateway or network route; report mask, network, broadcast, usable range, host count, and overlaps.
Instructions
Check IP addresses / subnets the user provided BEFORE using them, and explain
the result to the user. Accepts '/prefix' or dotted masks:
'192.168.20.1/24', '192.168.20.1 255.255.255.0', '192.168.20.1/255.255.255.0'.
Several values can be separated by commas.
purpose='interface': an address for the router itself (gateway, tunnel IP).
purpose='network' : a subnet or route (LAN range, WireGuard allowed-address).
If name is a connected router session, also checks overlap with its subnets.
Reports mask in both formats, network, broadcast, usable range and host count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| value | Yes | ||
| purpose | No | interface |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |