Linode Instances

List Networking Information

get
https://api.linode.com/v4/linode/instances/{linodeId}/ips

Returns networking information for a single Linode.

Authorizations

Personal Access Token
OAuth: ( linodes:read_only)

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

Request Samples

curl -H "Content-Type: application/json" \
    https://api.linode.com/v4/linode/instances/123/ips

Response Samples

{
  "ipv4": [
    {
      "public": "",
      "private": "",
      "shared": "",
      "reserved": ""
    }
  ],
  "ipv6": [
    {
      "link_local": "",
      "slaac": "",
      "global": ""
    }
  ]
}

Responses

200: Requested Linode's networking configuration.

ipv4
object

Information about this Linode's IPv4 addresses.

public
array

A list of public IP Address objects belonging to this Linode.

private
array

A list of private IP Address objects belonging to this Linode.

shared
array

A list of shared IP Address objects assigned to this Linode.

reserved
array

A list of reserved IP Address objects belonging to this Linode.

ipv6
object

Information about this Linode's IPv6 addresses.

link_local
object

A link-local IPv6 address that exists in Linode's system,.

address
string

The IPv6 link-local address.

gateway
string

The default gateway for this address.

subnet_mask
string

The subnet mask.

prefix
integer

The network prefix.

type
string

The type of address this is.

public
boolean

Whether this is a public or private IP address.

rdns
string

The reverse DNS assigned to this address.

linode_id
integer

The ID of the Linode this address currently belongs to.

region
Filterable
string

The Region this address resides in.

slaac
object

A SLAAC IPv6 address that exists in Linode's system.

address
string

The address.

gateway
string

The default gateway for this address.

subnet_mask
string

The subnet mask.

prefix
integer

The network prefix.

type
string

The type of address this is.

public
boolean

Whether this is a public or private IP address.

rdns
string

The reverse DNS assigned to this address.

linode_id
integer

The ID of the Linode this address currently belongs to.

region
Filterable
string

The Region this address resides in.

global
object

An object representing an IPv6 pool.

range
string

The IPv6 pool

prefix
integer

The prefix length of the address, denoting which addresses can be assigned from this pool.

region
string

A pool of IPv6 addresses that are routed to all of your Linodes in a single Region. Any Linode you own may bring up any address in this pool at any time, with no external configuration required.

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 IPv4 Address

post
https://api.linode.com/v4/linode/instances/{linodeId}/ips

Allocates a public or private IPv4 address to a Linode. Public IP Addresses, after the one included with each Linode, incur an additional monthly charge. If you need an additional public IP Address you must request one - please open a support ticket. You may not add more than one private IPv4 address to a single Linode.

Authorizations

Personal Access Token
OAuth: ( linodes:read_write)

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

Request Body Schema

public
Required
boolean

Whether to create a public or private IPv4 address.

type
Required
string
Enum: "ipv4"

The type of address you are allocating. 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
    }' \
    https://api.linode.com/v4/linode/instances/123/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 was successfully allocated.

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.