API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
Edge Cloud
Edge Cloud
OverviewBillingTerraform
API
Chosen image
Home/Edge Cloud/Networking/IP address/Allowed address pair

Configure an allowed address pair

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, Virtual Machine ID, Virtual Machine port ID, network ID, and MAC address. Otherwise, send API requests to get the project ID, region ID, Virtual Machine ID, port ID, network ID, and then find your MAC address from the command line.

3. Send the following API request:

Method: PUT
Endpoint: https://api.gcore.com/cloud/v1/ports/{**project_id}**/**{region_id}**/**{port_id}**/allow_address_pairs:
Request body:

{    "port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097",    "instance_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",    "network_id": "351b0dd7-ca09-431c-be53-935db3785067",    "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 highlighted ones. For more details, refer to the Gcore API documentation.

Now your machine is available through the IP addresses you specified in the request.

Was this article helpful?

Not a Gcore user yet?

Discover our offerings, including virtual instances starting from 3.7 euro/mo, bare metal servers, AI Infrastructure, load balancers, Managed Kubernetes, Function as a Service, and Centralized Logging solutions.

Go to the product page
// // Initialize a variable to undefined initially. // var growthBook = undefined; // (function() { // try { // var script = document.createElement('script'); // script.src = "https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js"; // script.setAttribute("data-api-host", "https://cdn.growthbook.io"); // script.setAttribute("data-client-key", "sdk-truekA5wvhMYaqsu"); // document.head.appendChild(script); // script.onload = function() { // console.log("GrowthBook script loaded successfully."); // growthBook = window.GrowthBook; // Assuming GrowthBook attaches itself to window // }; // script.onerror = function() { // console.error("Failed to load the GrowthBook script."); // growthBook = undefined; // Explicitly set to undefined on error // }; // } catch (error) { // console.error("An error occurred while setting up the GrowthBook script:", error); // growthBook = undefined; // } // })(); // // Optional: Push to dataLayer if needed // window.dataLayer = window.dataLayer || []; // window.dataLayer.push({ // 'event': 'scriptLoadStatus', // 'growthBookStatus': growthBook ? "Loaded" : "Failed" // });