Networking

Linodes Assign IPv4s

post
https://api.linode.com/v4/networking/ipv4/assign

This command is equivalent to IP Addresses Assign (POST /networking/ips/assign).

Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPs to your Linodes.

The following restrictions apply:

  • All Linodes involved must have at least one public IPv4 address after assignment.
  • Linodes may have no more than one assigned private IPv4 address.
  • Linodes may have no more than one assigned IPv6 range.

Open a Support Ticket to request additional IPv4 addresses or IPv6 ranges beyond standard account limits.

Note: Removing an IP address that has been set as a Managed Linode's ssh.ip causes the Managed Linode's SSH access settings to reset to their default values. To view and configure Managed Linode SSH settings, use the following commands:

Request Body Schema

assignments
Required
array

The list of assignments to make. You must have read_write access to all IPs being assigned and all Linodes being assigned to in order for the assignments to succeed.

region
Required
string

The ID of the Region in which these assignments are to take place. All IPs and Linodes must exist in this Region.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "region": "us-east",
      "assignments": [
        {
          "address": "192.0.2.1",
          "linode_id": 123
        },
        {
          "address": "2001:db8:3c4d:15::/64",
          "linode_id": 234
        }
      ]
    }' \
    https://api.linode.com/v4/networking/ipv4/assign

Response Samples

{}

Responses

200: All assignments completed successfully.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.