Allocate an IP address

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.

📘

You can run this operation for Linodes with legacy configuration interfaces. You can't use it for Linodes with Linode interfaces. To allocate an IP for a Linode with Linode interfaces, use the Add a Linode interface operation and set the public IPv4 address to auto.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: ips:read_write

CLI

linode-cli networking ip-add \ --type ipv4 \ --public true \ --linode_id 123

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
Body Params

Information about the address you are creating.

integer
required

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

boolean
required

Whether to create a public or private IPv4 address.

string
enum
required

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

Allowed:
Responses

Response body
object

An IP address that exists in Linode's system, either IPv4 or IPv6.

string

Read-only The IP address.

string | null

Read-only The default gateway for this address.

integer | null

Read-only The Linode interface ID that this IP address is assigned to. This value is null if a Linode interface is not assigned, or if the IP is assigned to a legacy configuration profile interface.

integer

Read-only 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 may be moved using the Assign IPv4s to Linodes operation. For SLAAC and link-local addresses, this value can't be changed.

integer

Read-only The number of bits set in the subnet mask.

boolean

Read-only Whether this is a public or private IP address.

string | null

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.

string

Read-only The Region this IP address resides in.

string

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

string
enum

Read-only The type of address this is.

ipv4 ipv6 ipv6/pool ipv6/range

vpc_nat_1_1
object

IPv4 address configured as a 1:1 NAT for this Interface. If no address is configured as a 1:1 NAT, null is returned.

📘

Only allowed for vpc type interfaces.

string

The IPv4 address that is configured as a 1:1 NAT for this VPC interface.

integer

The id of the VPC Subnet for this interface.

integer

Read-only The id of the VPC configured for this interface.

Language
Credentials