Routing a Subnet to an IP
For use cases requiring large amounts of usable IPs, entire subnets can be routed to another IP. When this is done, all IPs in the routed subnet become available for use because a gateway is no longer required on the switch.
Static Routing a Subnet to an IP
Before you can route a subnet to another IP address, you must ensure that all assignments of that subnet - to bonds, ports or VLANs - are removed. You cannot route a subnet to an IP in its own subnet. The routed subnet and the target IP must be in the same facility.
Via the API
To route a subnet to another IP, send a PUT
request to /ip/IP_ID , where the IP_ID
belongs to the subnet you wish to route, with the target IP as the nextHopIP
in the request body.
curl --request PUT \
--url https://core.hivelocity.net/api/v2/ip/{ipAssignmentId} \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-API-KEY: $API_KEY" \
--data '
{
"nextHopIp": "8.8.8.8"
}
Remove a Subnet's Static Route to an IP
Via the API
To remove a route from a subnet to another IP, send a PUT
request to the same /ip/IP_ID with a null
value for the nextHopIp
field in the request body.
curl --request PUT \
--url https://core.hivelocity.net/api/v2/ip/{ipAssignmentId} \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-API-KEY: $API_KEY" \
--data '
{
"nextHopIp": null
}
Updated almost 2 years ago