Network Interfaces

Generated on 18 Mar 2026

Droplets use public and private network interfaces to connect to the internet and other DigitalOcean resources. Each interface contains various properties, including the Droplet's IP address, gateway IP, and netmask.

Base URL http://169.254.169.254

GET Get Network Interface Index

/metadata/v1/interfaces

An index of all network interfaces by type, e.g. "public" and "private".

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces"

Responses

200

The available interfaces as plain text.

public/
private/

GET Get Public Interface Index

/metadata/v1/interfaces/public

An enumerated index of all public network interfaces that are of the specified interface type.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public"

Responses

200

An enumerated list of public interfaces as plain text.

0/

GET Get Public Interface Attributes Index

/metadata/v1/interfaces/public/0

An index of the attributes of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0"

Responses

200

An index of the Droplet's public interfaces as a plain-text list.

mac
type
ipv4/
ipv6/

GET Get IPv4 Anchor Attributes Index

/metadata/v1/interfaces/public/0/anchor_ipv4

An index of the specified "Anchor" network interface's IPv4 attributes. Note: An "Anchor" interface is an implementation detail of DigitalOcean Reserved IPs.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4"

Responses

200

Success

address
netmask
gateway

GET Get Anchor IPv4 Address

/metadata/v1/interfaces/public/0/anchor_ipv4/address

The IPv4 address of the specified "Anchor" network interface. Note: An "Anchor" interface is an implementation detail of DigitalOcean Reserved IPs.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address"

Responses

200

Success

10.17.0.160

GET Get Anchor IPv4 Netmask

/metadata/v1/interfaces/public/0/anchor_ipv4/netmask

The netmask of the specified "Anchor" network interface. Note: An "Anchor" interface is an implementation detail of DigitalOcean Reserved IPs.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/netmask"

Responses

200

Success

255.255.0.0

GET Get Public Interface's IPv4 Attributes

/metadata/v1/interfaces/public/0/ipv4

An index of the specified network interface's IPv4 attributes.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4"

Responses

200

The index of available IPv4 attributes as a plain-text list.

address
netmask
gateway

GET Get Public Interface IPv4 Address

/metadata/v1/interfaces/public/0/ipv4/address

The IPv4 address of the specified network interface, as plain text.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address"

Responses

200

Success

104.131.20.105

GET Get Public Interface Gateway Address

/metadata/v1/interfaces/public/0/ipv4/gateway

The gateway of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/gateway"

Responses

200

Success

104.131.0.1

GET Get Public Interface IPv4 Netmask

/metadata/v1/interfaces/public/0/ipv4/netmask

The netmask of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/netmask"

Responses

200

Success

255.255.192.0

GET Get IPv6 Network Interfaces Index

/metadata/v1/interfaces/public/0/ipv6

An index of the specified network interface's IPv6 attributes.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6"

Responses

200

Success

address
cidr
gateway

GET Get Public Interface IPv6 Address

/metadata/v1/interfaces/public/0/ipv6/address

The IPv6 address of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address"

Responses

200

Success

2604:A880:0800:0010:0000:0000:017D:2001

GET Get Public Interface's IPv6 CIDR

/metadata/v1/interfaces/public/0/ipv6/cidr

The IPv6 CIDR of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/cidr"

Responses

200

Success

64

GET Get Public Interface's IPv6 Gateway Address

/metadata/v1/interfaces/public/0/ipv6/gateway

The IPv6 gateway address of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/gateway"

Responses

200

Success

2604:A880:0800:0010:0000:0000:0000:0001

GET Get Public Interface's MAC Address

/metadata/v1/interfaces/public/0/mac

The MAC address of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/mac"

Responses

200

The Droplet's MAC address as plain text.

04:01:2a:0f:2a:03

GET Get Network Interface's Type

/metadata/v1/interfaces/public/0/type

The type of the specified network interface.

curl -X GET \
  "http://169.254.169.254/metadata/v1/interfaces/public/0/type"

Responses

200

The network interface type as plain text.

public

We can't find any results for your search.

Try using different keywords or simplifying your search terms.