Global Anycast IP Addresses¶
Equinix Metal™ Global Anycast IPs are public IPv4 addresses that are pulled from Equinix Metal-owned IP space and that can announced from any or all of Equinix Metal's Metros.
Global Anycast IP addresses can be used:
- by assigning them as an Elastic IP address to a single server in multiple Metros.
- OR by announcing them via Local BGP from multiple servers in multiple Metros.
If a Global Anycast IP address is not routed to or announced from any server in any Metro, the IP address will be unreachable.
Equinix Metal allows you to reserve the following subnet sizes of Global Anycast IP addresses.
Global Anycast Subnet Size | Usable IP Addresses |
---|---|
/32 | 1 IPv4 address |
/31 | 2 IPv4 addresses |
/30 | 4 IPv4 addresses |
Global Anycast IP addresses are billed on a usage basis at a fixed rate per IP per hour. Bandwidth is billed at the standard outbound rate and an inbound rate per GB. Rates are available in the Equinix Metal console.
Requesting Global Anycast IP Addresses¶
In your Project's Networking section, open the IPs page.
Your project's current IP Addresses should be listed. To request Global Anycast IP Addresses, click + Add New.
From the Request IP Addresses slide out, choose Global IPv4 and the Quantity (size) of the reserved subnet. There are also fields for Tags and a Description for your use. The Custom JSON field is for custom data that you want to be included in your server's metadata.
Use the Comments field for contacting support with any information that is relevant to your request. Be aware, if you are planning to request multiple subnets, or multiple large subnets, there are quotas in place at the project-level. Support may reach out with questions about your request.
To request a Global Anycast IP address, use the metal ip request
command and specify the --type
as global_ipv4
.
metal ip request --project-id <project_id> --type global_ipv4 --quantity <int>
To request additional IP addresses in the API, send a POST
request to the /projects/{id}/ips
endpoint.
curl -X POST \
-H 'Content-Type: application/json' \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/ips" \
-d '{
"type": "global_ipv4",
"quantity": 4,
"fail_on_approval_required": "false"
}'
Body Parameters
"type"
(required) - To request a Global Anycast IP address, use"global_ipv4"
."quantity"
(required) - The quantity parameter should be the number of IPs in the subnet. Valid values are1
,2
, and4
for Global Anycast IP addresses."fail_on_approval_required"
(optional) - If you submit a request that exceeds the maximum number of IP addresses available to your project, you can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing thefail_on_approval_required
parameter set totrue
in the request.
A full listing of body parameter fields and options is available in the API reference.
Managing Global Anycast IP Addresses¶
Your Project's IPs page contains a list of all the Management, Reserved, and Global Anycast subnets and IPs.
In the CLI, all the Management, Reserved, and Global Anycast subnets and IP address information for a Project is available from the metal ip get
command.
`metal ip get -p <project-uuid>`
To get a list of the Management, Reserved, and Global Anycast subnets and IPs in your Project, send a GET
request to the /projects/{id}/ips
endpoint.
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/ips"
The response contains a reservation ID in the "id
" field. (The example response is truncated.)
{
"ip_addresses": [
{
"id": "804c4112-c00a-486c-9c54-0918dd1894b2",
"address_family": 4,
"netmask": "255.255.255.254",
"created_at": "2022-09-21T13:14:55Z",
"public": true,
"cidr": 31,
"management": false,
"manageable": true,
"enabled": true,
"global_ip": true,
"assignments": [],
"network": "147....",
"address": "147....",
"gateway": "147....",
"type": "global_ipv4"
....
},
....
]
}
Announcing Your IP Address¶
Once you have been allocated your Global Anycast IPv4 address block, you have two options: to assign your new IP Addresses to a server as Elastic IPs, or by announcing them with BGP.
If you choose to bind Global Anycast IP addresses as an Elastic IP address, you can assign individual addresses to a single server in each Metro. If you attempt to assign the same IP address to more than one server in the same Metro, however, you will get an error.
If you choose to announce your Global Anycast IPs with BGP, you will need to set up and configure Local BGP. You can use BGP to assign your Global Anycast IP address to multiple servers in each Metro, so we recommend using BGP for high-availability applications.
Global Anycast IP Status¶
To see the status of your Global Anycast IP block, navigate to your Project's IPs page and open the Actions menu of the IP reservation you would like to manage. Click Update Block.
A grey circle indicates that an IP in the block is not assigned in the facility or being announced via BGP. A green circle indicates it an IP in the block is assigned or being announced in that facility. If you do not announce or bind a Global Anycast IP in one facility, we will backhaul that traffic to the next closest facility where the IP is assigned or announced. This incurs cost, which is why there is a charge for inbound transfer.
To check available subnets and IP addresses in your Global Anycast IP block, use the metal ip available
command. The --reservation-id
can be obtained from the metal ip get -p <project-uuid>
command.
metal ip available --reservation-id <reservation_UUID> --cidr <size_of_subnet>
You can check the status of subnets and IP addresses in each of your project's Management, Reserved, and Global Anycast subnets by sending a GET
request to the /ips/{id}
endpoint. The reservation UUID of the subnet or IP address goes in the path.
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/ips/{id}"
The response includes the reservation ID of the IP address block in the "assignments"
object. (The example response is truncated.)
{
"ip_addresses": [
{
"id": "804c4112-c00a-486c-9c54-0918dd1894b2",
"address_family": 4,
"netmask": "255.255.255.254",
"global_ip": true,
"assignments": [
{
"href": "/metal/v1/ips/4cc7f67b-522e-4b6c-82a5-3b2505cf326a"
}
],
....
"type": "global_ipv4"
},
....
]
}
Deleting a Global Anycast IP Reservation¶
Deleting a reservation removes the subnet from your project. You will no longer be able to use the IP addresses for your servers.
To delete a reservation, navigate to your Project's IPs page and select the Global Anycast IP block. Click Delete.
To remove a Global Anycast IP reservation, use the metal ip remove
command.
metal ip remove --id <reservation-id>
To delete an IP reservation through the API, send a DELETE
request to the /ips/{id}
endpoint. The id
is the UUID of the reservation.
curl -X DELETE \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/ips/{id}"