Networking

List IP Addresses

get
https://api.linode.com/v4/networking/ips

Returns a paginated list of IP Addresses on your Account, excluding private addresses.

Authorizations

Personal Access Token
OAuth: ( ips:read_only)

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/networking/ips

Response Samples

{
  "data": [
    {
      "type": "ipv4",
      "public": true,
      "region": "us-east",
      "linode_id": 123,
      "address": "97.107.143.141",
      "gateway": "97.107.143.1",
      "subnet_mask": "255.255.255.0",
      "prefix": 24,
      "rdns": "test.example.org"
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of IP Addresses.

data
array of objects
type
string
Enum: "ipv4""ipv6""ipv6/pool""ipv6/range"

The type of address this is.

public
boolean

Whether this is a public or private IP address.

region
Filterable
string

The Region this IP address resides in.

linode_id
integer

The ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed.

address
string

The IP address.

gateway
Nullable
string

The default gateway for this address.

subnet_mask
string

The mask that separates host bits from network bits for this address.

prefix
integer

The number of bits set in the subnet mask.

rdns
string

The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.

page
integer
pages
integer
results
integer

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.

Allocate IP Address

post
https://api.linode.com/v4/networking/ips

Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please open a support ticket requesting additional addresses before attempting allocation.

Authorizations

Personal Access Token
OAuth: ( ips:read_writelinodes:read_write)

Request Body Schema

linode_id
Required
integer

The ID of a Linode you you have access to that this address will be allocated to.

public
Required
boolean

Whether to create a public or private IPv4 address.

type
Required
string
Enum: "ipv4"

The type of address you are requesting. Only IPv4 addresses may be allocated through this endpoint.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "type": "ipv4",
      "public": true,
      "linode_id": 123
    }' \
    https://api.linode.com/v4/networking/ips

Response Samples

{
  "public": true,
  "type": "ipv4",
  "region": "us-east",
  "address": "97.107.143.141",
  "gateway": "97.107.143.1",
  "subnet_mask": "255.255.255.0",
  "prefix": 24,
  "rdns": "test.example.org",
  "linode_id": 123
}

Responses

200: IP Address allocated successfully.

public
boolean

Whether this is a public or private IP address.

type
string
Enum: "ipv4""ipv6""ipv6/pool""ipv6/range"

The type of address this is.

region
Filterable
string

The Region this IP address resides in.

address
string <ip>

The IP address.

gateway
Nullable
string <ip>

The default gateway for this address.

subnet_mask
string <ip>

The mask that separates host bits from network bits for this address.

prefix
integer

The number of bits set in the subnet mask.

rdns
string

The reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set.

linode_id
integer

The ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed.

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.