Configure Static Route
Adds a new static route to the HCX Manager appliance. Static routes allow you to define custom network paths for specific destination networks.
Validations:
- static_network: Must be a valid IPv4 address (e.g., 192.168.0.0)
- static_prefix: Integer between 0 and 32 (CIDR prefix length)
- static_gateway_ip: Must be a valid IPv4 address and should be reachable
Important Notes:
- Duplicate routes (same network/prefix) may override existing routes
- Gateway must be reachable from HCX Manager's network
- Invalid gateway can cause connectivity issues
- Routes are applied to the primary network interface
{
"static_network": "string",
"static_prefix": "string",
"static_gateway_ip": "string"
}
static_network
static_prefix
static_gateway_ip
Static route configured successfully
{
"static_network": "string",
"static_prefix": "string",
"static_gateway_ip": "string"
}
static_network
static_prefix
static_gateway_ip
Bad request - invalid route parameters
{
"isSuccess": false,
"message": "Request schema validation failed",
"httpStatusCode": 400
}
Indicates if the operation was successful
Human-readable error message
HTTP status code
Internal server error while configuring route
{
"isSuccess": false,
"message": "Request schema validation failed",
"httpStatusCode": 400
}
Indicates if the operation was successful
Human-readable error message
HTTP status code
curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"static_gateway_ip":"string","static_network":"string","static_prefix":"string"}' https://{api_host}/system/network/staticroutes