The Bare Metal Cloud (BMC) API validates network settings to prevent IP conflicts and unstable setups. The force query parameter bypasses selected validation checks, so you can build advanced setups such as servers without IPs, servers with shared IPs, and assigning reserved IP addresses. Use it only when the default validation blocks your specific setup.
All API requests in this guide are relative to:
https://api.phoenixnap.comCode language: HTTP (http)
Warning
Use the force parameter with caution. It controls advanced features and can lead to nonfunctional setups. The default value is false.
Where force Applies
The following table lists where the force query parameter applies and what it allows:
| Context | Allows |
|---|---|
| Create server, add server to a network, or update server network | Empty IP lists, IPs already in use, gateway addresses that points to no resource, and reserved IP addresses marked as assignable with force. |
| Create private network | A private network without a CIDR. |
| Remove an IP block from a public network | Removal even when a resource uses the block. |
Servers
The following table lists the situations where force changes the result during server creation, when adding a server to a network, or when updating a server's network:
| Situation | Error | With force=true |
|---|---|---|
Empty ips list and dhcp is false. | No IP addresses to set up is only supported in case of DHCP enabled or when the force flag is set. | The system skips the field validation. The server is created in the network without IP addresses. |
| An IP is already in use by another resource in the network. | Error on field 'privateIpAddresses': private IP 10.0.0.20 is already in use. | The system ignores the error and assigns the same IP. |
| The gateway address does not point to a resource. | The provided gateway address 10.0.0.1 did not match an owned resource's Private IP. | The system skips gateway validation and completes the request. |
Omitting the ips field is not supported in any case. A public network without IPs is only possible when you don't define a gateway IP.
Note
After you deprovision a server, background processes take time to free its IP. This can take up to 20 minutes, even though the system doesn't show the IP as occupied. To reuse the IP immediately, set force=true.
Assigning Reserved IP Addresses
Private and public networks can have reserved IP addresses that are unavailable for regular assignment. Some reserved addresses can still be assigned to a server by using force=true.
To check which reserved IP addresses support forced assignment, retrieve the network configuration and check the reservedIps property. Each entry has:
ips. Contains reserved IP addresses or inclusive IP ranges.assignableWithForce. Indicates whether a reserved IP address can be assigned when usingforce=truein a request.
For example, a network can have the following IP configuration:
| Reserved IPs | assignableWithForce |
|---|---|
| 10.0.0.1 - 10.0.0.9 | true |
| 10.0.0.0, 10.0.0.255 | false |
The addresses in the first range can be assigned with force=true, even though they are considered reserved. The network and broadcast addresses in the second entry remain unavailable.
Servers Without IPs
How you create a server without IPs depends on the IP version:
- IPv4 public or private networks. Set
force=trueand send an emptyipslist. Configure the server manually after. - IPv6 public networks. Set
computeSlaacIp=trueto generate an IPv6 address automatically. Theipslist can be empty. The address appears in the response and it is based on the primary MAC address of the server. No additional configuration is required.
Note
The computeSlaacIp parameter is controlled by the raEnabled parameter of the public network. BMC sets raEnabled=true when you create a network with an IPv6 block or add an IPv6 block to one. To change it, see: PATCH /public-networks/[PUBLIC_NETWORK_ID].
Find out more
BMC API - POST /servers
BMC API - POST /servers/[SERVER_ID]/network-configuration/private-network-configuration/private-networks
BMC API - POST /servers/[SERVER_ID]/network-configuration/public-network-configuration/public-networks
BMC API - PATCH /servers/[SERVER_ID]/network-configuration/private-network-configuration/private-networks/[PRIVATE_NETWORK_ID]
BMC API - PATCH /servers/[SERVER_ID]/network-configuration/public-network-configuration/public-networks/[PUBLIC_NETWORK_ID]
Networks
A private network requires a CIDR by default. To create one without it, send a request to:
POST /networks/v1/private-networks?force=trueCode language: HTTP (http)
Provide the request body without the cidr field:
{
"name": "[NETWORK_NAME]",
"location": "[LOCATION]",
"locationDefault": false
}Code language: JSON / JSON with Comments (json)
Replace [NETWORK_NAME] and [LOCATION] with actual values.
Warning
A network without a CIDR is an expert feature. The network cannot automatically determine IP addresses for connected servers. Use it with caution.
When you connect a server to a network without a CIDR, the following applies:
- Empty IP list. Define the
ipsfield as an empty list. Without a CIDR, any IP you provide is outside the subnet and the request fails. - No null IPs. If an IP address in the server network is
null, the request fails because the system can't compute the next IP. - Default network. If you don't define a custom network, the system uses the default network. If the default network has no CIDR, the request fails.
Public networks don't use force at creation. For public networks with an IPv6 block, see the raEnabled note in the previous section.
Find out more
IP Blocks
To remove an IP block even when a resource is using it, append the query parameter to the URL:
DELETE /networks/v1/public-networks/[PUBLIC_NETWORK_ID]/ip-blocks/[IP_BLOCK_ID]?force=trueCode language: HTTP (http)
The action can interrupt network connectivity. The network switches are reconfigured immediately after the request, and communication with affected servers stops shortly afterward.
Note
Reassigning the same public IP block to a server does not reset the IP configuration in the BMC database. The server may regain connectivity, but BMC might not recognize the IP addresses configured on the server.