Skip to main content

What is an allowed address pair?

An allowed address pair is a feature that allows you to add an extra IP address to the interface of a Virtual Machine. By default, a Virtual Machine has a MAC-IP binding. It means all the traffic that comes to a given IP address will be sent to the machine that has that particular MAC address. If you want to allow traffic for another IP address, you need to add it to the allowed address pair. As such, your machine will become accessible for both IP addresses. In Gcore, you can add an allowed address pair via an API request.

Assign an allowed address pair

1. Generate an authorization token or use a permanent API token. 2. Make sure you know the project ID, region ID, and port ID. Otherwise, send API requests to get the project ID, region ID, and port ID. 3. Send the following API request: Method: PUT
Endpoint: https://api.gcore.com/cloud/v2/ports/{project_id}/{region_id}/{port_id}/allow_address_pairs
Request body:
{   
  "allowed_address_pairs": [   
    {   
      "ip_address": "192.168.123.20",   
      "mac_address": "00:16:3e:f2:87:16"  
    },   
    {   
      "ip_address": "192.168.0.2/32",   
      "mac_address": "00:16:3e:f2:87:89"  
    }   
  ]   
} 
Enter your custom values instead of the example ones. You can add up to 10 allowed address pairs. For more details, refer to the Gcore API documentation. Now your machine is available through the IP addresses you specified in the request.