diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.en-gb.md b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.en-gb.md new file mode 100644 index 00000000000..c9c3ff13733 --- /dev/null +++ b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.en-gb.md @@ -0,0 +1,472 @@ +--- +title: Extending a Private OVHcloud Network Across Public Cloud Regions +excerpt: Learn how to configure a multi-region OVHcloud private network, manage VLANs and IP pools to prevent conflicts, and integrate with other OVHcloud products. +updated: 2025-12-02 +--- + +## Objective + +The objective of this guide is to help OVHcloud users configure and extend a private network across multiple Public Cloud regions, while avoiding IP conflicts and ensuring network stability. It covers best practices for: + +- Assigning separate IP pools per region. +- Managing VLANs across regions or other OVHcloud products. +- Using DHCP as a service for additional infrastructure, such as Bare Metal servers. +- Providing step-by-step instructions using the OVHcloud Control Panel, Horizon, OpenStack CLI, and Terraform. + +**By following this guide, users will be able to deploy a secure and reliable multi-region private network with OVHcloud.** + +## Background and Solution Overview + +### Challenges + +When extending a private network across multiple OVHcloud Public Cloud regions or connecting it to other OVHcloud products through a vRack, a major challenge arises from the way IP addressing is handled. + +Public Cloud instances automatically receive their private IP addresses via OpenStack DHCP or cloud-init, and this mechanism cannot be disabled. At the same time, all private networks using the same VLAN inside a vRack must share a common address space. This means that, without proper planning, the same VLAN can end up assigning overlapping or identical IP addresses across regions or between different OVHcloud services. + +To illustrate this issue, the following diagram shows an example of what must be avoided: + +![problematic image](images/problematic_image.png){.thumbnail} + +In this example, two Public Cloud instances in different regions and one Bare Metal server all share the same VLAN ID and have been assigned the same IP address. + +When multiple machines share the same IP on the same VLAN, the network becomes unstable. Packets cannot reliably determine which machine they should reach. For example, any traffic sent to 10.1.0.2 may land on an unpredictable host, resulting in inconsistent connectivity, routing errors, and service disruption. + +This problem becomes more severe as environments scale across multiple regions or products. Therefore, a structured approach to IP allocation such as dividing the subnet into dedicated per-region pools is essential to maintaining a stable, predictable and conflict-free vRack network. + +### Solution Overview + +To prevent IP conflicts and ensure stable communication across a stretched vRack network, each Public Cloud region must use a dedicated IP pool within the same private subnet. By segmenting the subnet into non-overlapping allocation ranges, OVHcloud ensures that OpenStack DHCP services in different regions never assign duplicate IP addresses—even when all networks share the same VLAN ID. + +The diagram below illustrates the corrected configuration: + +![solution image](images/solution_image.png){.thumbnail} + +Each region uses the same VLAN ID but draws IPs from a distinct allocation pool within the shared subnet, eliminating any risk of overlap. + +With this approach: + +- All regions remain part of the same L2 private network through the vRack. +- DHCP continues to function normally in each region, as OpenStack assigns IPs only from its designated pool. +- Additional OVHcloud products (such as Bare Metal, Dedicated Servers, or Private Cloud) can join the same VLAN without creating address conflicts. +- Multi-region workloads, migrations, and hybrid deployments operate reliably on a unified private network. + +This solution preserves the flexibility of a single stretched VLAN while enforcing predictable, conflict-free IP management. The next section explains how to configure this setup using the OVHcloud Control Panel, Horizon, OpenStack CLI, or Terraform. + +## Use case examples + +Here are some practical scenarios where extending a OVHcloud private network across regions or integrating with other OVHcloud products can solve real-world challenges. + +- **Database on Bare Metal & Application on Public Cloud:** Connect a Bare Metal database server with applications running in Public Cloud regions using the same VLAN without IP conflicts. +- **DHCP as a Service for Bare Metal Servers:** Assign IPs from Public Cloud networks to Bare Metal servers via DHCP for seamless integration. +- **Migration Between Public Cloud Regions:** Move workloads from one region to another while keeping the private network consistent and avoiding IP conflicts. +- **Multi-Region Services:** Run distributed services across multiple Public Cloud regions with a unified private network for secure communication. +- **Integration with Other OVHcloud Products:** Connect Public Cloud instances with Private Cloud, Dedicated Servers, or other OVHcloud services through vRack. + +## Requirements + +- A [Public Cloud project](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) in your OVHcloud account +- Basic networking knowledge +- Access to the [OVHcloud Control Panel](/links/manager) +- Access to the [Horizon interface](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) + +## Instructions + +This section provides step-by-step instructions to configure a private network stretched across multiple OVHcloud Public Cloud regions. You can use the OVHcloud Control Panel & Horizon, OpenStack CLI, or Terraform. + +### Configuration for Public Cloud + +Add the public cloud project to a vRack: + +![Add Public Cloud project to Vrack](images/add_pcp_to_vrack.png){.thumbnail} + +> [!tabs] +> Via the OVHcloud Control Panel and Horizon +>> **1. Create private networks in each region** +>> +>> Create a private network in each desired region using the same VLAN ID. +>> +>> ![Add Public Cloud project to Vrack](images/add_pcp_to_vrack.png){.thumbnail} +>> +>> > [!tabs] +>> > +>> > **Note:** At this stage, using the same VLAN ID across regions without separate IP pools is exactly what must be avoided. +>> > +>> +>> **2. Configure subnets and IP pools** +>> +>> Edit each subnet in Horizon, configure the gateway reserved IP and the IP pool. +>> +>> **- First region:** +>> +>> ![Edit subnet region 1](images/configure_subnet_region1.png){.thumbnail} +>> +>> ![Edit subnet region 1 - 2](images/configure_subnet_region1_2.png){.thumbnail} +>> +>> **- Second region:** +>> +>> ![Edit subnet region 2](images/configure_subnet_region2.png){.thumbnail} +>> +>> ![Edit subnet region 2 - 2](images/configure_subnet_region2_2.png){.thumbnail} +>> +>> **3. Refresh network status** +>> +>> Go back to the OVHcloud Control Panel and refresh the network page. +>> +>> ![Refresh vrack list page](images/refresh_vrack_list_page.png){.thumbnail} +>> +>> You should now see a single VLAN stretched across multiple regions, each with its own IP pool. +>> +> Via the Openstack CLI +>> > [!primary] +>> > +>> > **Required:** OpenStack authentication configured in your environment variables +>> > +>> +>> **1. Load OpenStack credentials:** +>> +>> ```bash +>> source openrc.sh +>> ``` +>> +>> **2. Select the first region** +>> +>> ```bash +>> export OS_REGION_NAME=RBX-A +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.1.2,end=10.1.1.254 --dns-nameserver 213.186.33.99 --gateway 10.1.1.1 stretch-private-subnet +>> ``` +>> +>> **3. Select the second region** +>> +>> ```bash +>> export OS_REGION_NAME=GRA11 +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.2.2,end=10.1.2.254 --dns-nameserver 213.186.33.99 --gateway 10.1.2.1 stretch-private-subnet +>> ``` +>> +> Via Terraform +>> > [!primary] +>> > +>> > **Required:** OVHcloud application key configured in your environment variables +>> > +>> +>> 1. Create a main Terraform configuration file (e.g., `main.tf`) with the following content: +>> +>> ```hcl +>> resource "ovh_cloud_project_network_private" "private-net" { +>> name = "stretch-private-network-vlan-${var.private_network_vlan_id}" +>> vlan_id = var.private_network_vlan_id +>> regions = var.regions +>> } +>> +>> resource "ovh_cloud_project_network_private_subnet_v2" "private-subnet" { +>> count = length(var.regions) +>> name = "stretch-private-subnet-vlan-${var.private_network_vlan_id}" +>> network_id = tolist(ovh_cloud_project_network_private.private-net.regions_attributes[*].openstackid)[count.index] +>> region = element(var.regions, count.index) +>> gateway_ip = "10.${var.private_network_vlan_id}.${count.index + 1}.1" +>> cidr = "10.${var.private_network_vlan_id}.0.0/16" +>> dns_nameservers = ["213.186.33.99"] +>> dhcp = true +>> enable_gateway_ip = true +>> +>> allocation_pools { +>> start = "10.${var.private_network_vlan_id}.${count.index + 1}.2" +>> end = "10.${var.private_network_vlan_id}.${count.index + 1}.254" +>> } +>> } +>> ``` +>> +>> 2. Create a variables file (e.g., `variables.tf`) with the following content: +>> +>> ```hcl +>> variable regions { +>> type = list +>> default = ["RBX-A", "GRA11"] +>> } +>> +>> variable private_network_vlan_id { +>> type = string +>> default = "1" +>> } +>> ``` +>> +>> 3. Apply the configuration +>> +>> ```bash +>> terraform apply +>> ``` +>> +>> Terraform will create the private network, subnets, and IP allocation pools in each region as defined. +>> + +### DHCP for Bare Metal Servers (DHCP as a Service) + +This section explains how to provide Public Cloud DHCP IP addresses to Bare Metal servers by integrating them into a stretched private network. + +The Public Cloud project and Bare Metal server must be added to the same vRack: + +![Add Bare Metal server to Vrack](images/add_baremetal_to_vrack.png){.thumbnail} + +> [!tabs] +> Via the OVHcloud Control Panel and Horizon +>> **1. Create a Public Cloud private network** +>> +>> ![Create Public Cloud private network](images/create_private_network.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > **Note:** Use the same VLAN ID that will be used for the Bare Metal server. +>> > +>> +>> **2. Obtain the MAC address of the Bare Metal server’s private interface.** +>> +>> ![Obtain mac address](images/obtain_mac_address.png){.thumbnail} +>> +>> **3. Create a virtual port on the Public Cloud private network using the MAC address of the Bare Metal server.** +>> +>> ![Create virtual port](images/create_virtual_port.png){.thumbnail} +>> +>> **4. Install an operating system on the Bare Metal server (e.g., Ubuntu 24.04).** +>> +>> ```bash +>> cat <> network: +>> version: 2 +>> ethernets: +>> privint: +>> match: +>> macaddress: "74:56:3c:85:7e:40" +>> dhcp4: false +>> dhcp6: false +>> vlans: +>> vlan1: +>> id: 1 +>> link: privint +>> dhcp4: true +>> EOF +>> +>> sudo chmod 600 /etc/netplan/90-private-interface.yaml +>> sudo netplan apply +>> ``` +>> +>> > [!warning] +>> > +>> > **Note:** Post-installation scripts may need to be updated with the correct MAC address and VLAN ID. +>> > +>> +> Via the Opentsack CLI +>> > [!primary] +>> > +>> > **Required:** OpenStack atuthentication configured in your environment variables +>> > +>> +>> **1. Load OpenStack credentials.** +>> +>> ```bash +>> source openrc.sh +>> ``` +>> +>> **2. Select the region:** +>> +>> ```bash +>> export OS_REGION_NAME=RBX-A +>> ``` +>> +>> 3. Create the private network and subnet: +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.0.2,end=10.1.254.254 --dns-nameserver 213.186.33.99 --gateway 10.1.0.1 stretch-private-subnet +>> ``` +>> +>> **4. Create a virtual port for the Bare Metal server.** +>> +>> ```bash +>> openstack port create --network stretch-private-network-vlan-1 bare_metal_port +>> ``` +>> +>> 5. Install the OS on the Bare Metal server (Ubuntu 24.04 used in this example). +>> +>> ```bash +>> cat <> network: +>> version: 2 +>> ethernets: +>> privint: +>> match: +>> macaddress: "74:56:3c:85:7e:40" +>> dhcp4: false +>> dhcp6: false +>> vlans: +>> vlan1: +>> id: 1 +>> link: privint +>> dhcp4: true +>> EOF +>> +>> sudo chmod 600 /etc/netplan/90-private-interface.yaml +>> sudo netplan apply +>> ``` +>> +>> > [!warning] +>> > +>> > **Note:** Post-installation scripts may need to be updated with the correct MAC address and VLAN ID. +>> > +>> +> Via Terraform +>> > [!primary] +>> > +>> > **Required:** OVHcloud application key configured in your environment variables +>> > +>> +>> **1. Create Terraform variable file `variables.tf`** +>> +>> Define all variables needed for the deployment: +>> +>> ```hcl +>> variable "region" { +>> type = string +>> default = "RBX-A" +>> } +>> +>> variable "private_network_vlan_id" { +>> type = string +>> default = "1" +>> } +>> +>> variable "bare_metal_server_name" { +>> type = string +>> default = "ns3044214.ip-162-19-106.eu" +>> } +>> +>> variable "ssh_public_key" { +>> type = string +>> } +>> ``` +>> +>> **2. Create the private network file `private-network.tf`** +>> +>> ```hcl +>> resource "ovh_cloud_project_network_private" "private-net" { +>> name = "stretch-private-network-vlan-${var.private_network_vlan_id}" +>> vlan_id = var.private_network_vlan_id +>> regions = [var.region] +>> } +>> +>> resource "ovh_cloud_project_network_private_subnet_v2" "private-subnet" { +>> name = "stretch-private-subnet-vlan-${var.private_network_vlan_id}" +>> network_id = tolist(ovh_cloud_project_network_private.private-net.regions_attributes[*].openstackid)[0] +>> region = var.region +>> gateway_ip = "10.${var.private_network_vlan_id}.0.1" +>> cidr = "10.${var.private_network_vlan_id}.0.0/16" +>> dns_nameservers = ["213.186.33.99"] +>> dhcp = true +>> enable_gateway_ip = true +>> +>> allocation_pools { +>> start = "10.${var.private_network_vlan_id}.0.2" +>> end = "10.${var.private_network_vlan_id}.254.254" +>> } +>> } +>> ``` +>> +>> > [!primary] +>> > +>> > This file ensures a private network and subnet are created in the specified region, with DHCP enabled and a dedicated allocation pool. +>> > +>> +>> 3. **Create the Bare Metal file `bare-metal.tf`** +>> +>> ```hcl +>> data "ovh_dedicated_server" "server" { +>> service_name = var.bare_metal_server_name +>> } +>> +>> resource "openstack_networking_port_v2" "bare_metal_port" { +>> name = "bare-metal-${var.bare_metal_server_name}-port" +>> region = var.region +>> network_id = tolist(ovh_cloud_project_network_private.private-net.regions_attributes[*].openstackid)[0] +>> mac_address = data.ovh_dedicated_server.server.vnis[index(data.ovh_dedicated_server.server.vnis.*.mode, "vrack")].name +>> admin_state_up = "true" +>> +>> depends_on = [ovh_cloud_project_network_private_subnet_v2.private-subnet] +>> } +>> +>> data "ovh_dedicated_installation_template" "template" { +>> template_name = "ubuntu2404-server_64" +>> } +>> +>> resource "ovh_dedicated_server_reinstall_task" "server_reinstall" { +>> service_name = data.ovh_dedicated_server.server.service_name +>> os = data.ovh_dedicated_installation_template.template.template_name +>> +>> customizations { +>> hostname = data.ovh_dedicated_server.server.name +>> post_installation_script = base64encode(templatefile("templates/custom-bare-metal.tftpl", { +>> mac_address = data.ovh_dedicated_server.server.vnis[index(data.ovh_dedicated_server.server.vnis.*.mode, "vrack")].name +>> vlan_id = var.private_network_vlan_id +>> })) +>> ssh_key = var.ssh_public_key +>> } +>> } +>> ``` +>> +>> > [!primary] +>> > +>> > This configuration attaches the Bare Metal server to the private network via a virtual port and executes a post-installation script to configure networking. +>> > +>> +>> 4. **Create the post-installation template `templates/custom-bare-metal.tftpl`** +>> +>> ```bash +>> cat <> network: +>> version: 2 +>> ethernets: +>> privint: +>> match: +>> macaddress: "${mac_address}" +>> dhcp4: false +>> dhcp6: false +>> vlans: +>> vlan${vlan_id}: +>> id: ${vlan_id} +>> link: privint +>> dhcp4: true +>> EOF +>> +>> sudo chmod 600 /etc/netplan/90-private-interface.yaml +>> sudo netplan apply +>> ``` +>> +>> > [!primary] +>> > +>> > This script creates a netplan configuration for the private VLAN interface, enabling DHCP to assign an IP from the Public Cloud network. +>> > +>> +>> **5. Apply the configuration** +>> +>> ```bash +>> terraform apply +>> ``` +>> +>> > [!warning] +>> > +>> > Running the Terraform script may reinstall your Bare Metal server, so ensure you have backups or are prepared for a reinstall. +>> > +>> + +## Notes / Best Practices + +- Verify the VLAN ID matches between the Public Cloud network and Bare Metal server. +- Confirm the Bare Metal server receives an IP from the Public Cloud DHCP service after installation. +- Each server should use a dedicated IP allocation pool to avoid conflicts. + +## Go further + +Join our [community of users](/links/community). \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.fr-fr.md b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.fr-fr.md new file mode 100644 index 00000000000..076a0b248f4 --- /dev/null +++ b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/guide.fr-fr.md @@ -0,0 +1,344 @@ +--- +title: Extension d'un réseau privé OVHcloud à travers les régions Public Cloud +excerpt: Découvrez comment configurer un réseau privé multi-régions OVHcloud, gérer les VLAN et les pools d'IP pour éviter les conflits, et l'intégrer avec d'autres produits OVHcloud. +updated: 2025-12-02 +--- + +## Objectif + +L'objectif de ce guide est d'aider les utilisateurs OVHcloud à configurer et à étendre un réseau privé à travers plusieurs régions Public Cloud, tout en évitant les conflits d'IP et en assurant la stabilité du réseau. Il couvre les bonnes pratiques pour : + +- Attribuer des pools d'IP distincts par région. +- Gérer les VLAN à travers les régions ou d'autres produits OVHcloud. +- Utiliser le DHCP en tant que service pour d'autres infrastructures, comme les serveurs Bare Metal. +- Fournir des instructions détaillées en utilisant l'espace client OVHcloud, Horizon, l'OpenStack CLI et Terraform. + +**En suivant ce guide, les utilisateurs seront capables de déployer un réseau privé multi-régions sécurisé et fiable avec OVHcloud.** + +## Contexte et aperçu de la solution + +### Défis + +Lorsqu'un réseau privé est étendu à travers plusieurs régions Public Cloud OVHcloud ou connecté à d'autres produits OVHcloud via un vRack, un défi majeur surgit en raison de la manière dont l'adressage IP est géré. + +Les instances Public Cloud reçoivent automatiquement leurs adresses IP privées via le DHCP OpenStack ou cloud-init, et ce mécanisme ne peut pas être désactivé. En même temps, tous les réseaux privés utilisant le même VLAN à l'intérieur d'un vRack doivent partager un espace d'adressage commun. Cela signifie qu'en l'absence d'une planification appropriée, le même VLAN peut finir par attribuer des adresses IP chevauchantes ou identiques à travers les régions ou entre différents services OVHcloud. + +Pour illustrer ce problème, le diagramme suivant montre un exemple de ce qu'il faut éviter : + +![image problématique](images/problematic_image.png){.thumbnail} + +Dans cet exemple, deux instances Public Cloud situées dans des régions différentes et un serveur Bare Metal partagent le même ID VLAN et ont été attribués la même adresse IP. + +Lorsque plusieurs machines partagent la même IP sur le même VLAN, le réseau devient instable. Les paquets ne peuvent pas déterminer de manière fiable vers quelle machine ils devraient aller. Par exemple, tout trafic envoyé à 10.1.0.2 peut atterrir sur un hôte imprévisible, entraînant une connectivité irrégulière, des erreurs de routage et une interruption de service. + +Ce problème devient plus grave lorsque les environnements s'étendent à travers plusieurs régions ou produits. Par conséquent, une approche structurée de l'allocation d'IP, telle que la division du sous-réseau en pools dédiés par région, est essentielle pour maintenir un réseau vRack stable, prévisible et sans conflit. + +### Aperçu de la solution + +Pour éviter les conflits d'IP et assurer une communication stable à travers un réseau vRack étiré, chaque région Public Cloud doit utiliser un pool d'IP dédié au sein du même sous-réseau privé. En segmentant le sous-réseau en plages d'allocation non chevauchantes, OVHcloud garantit que les services DHCP OpenStack dans différentes régions n'attribuent jamais des adresses IP en double, même lorsque tous les réseaux partagent le même ID VLAN. + +Le diagramme ci-dessous illustre la configuration corrigée : + +![image solution](images/solution_image.png){.thumbnail} + +Chaque région utilise le même ID VLAN mais tire les IPs d'une plage d'allocation distincte au sein du sous-réseau partagé, éliminant ainsi tout risque de chevauchement. + +Avec cette approche : + +- Toutes les régions restent parties intégrantes du même réseau privé L2 via le vRack. +- Le DHCP continue à fonctionner normalement dans chaque région, car OpenStack attribue des IPs uniquement depuis sa plage désignée. +- D'autres produits OVHcloud (tels que Bare Metal, Serveurs dédiés ou Private Cloud) peuvent rejoindre le même VLAN sans créer de conflits d'adresses. +- Les charges de travail multi-régions, les migrations et les déploiements hybrides fonctionnent de manière fiable sur un réseau privé unifié. + +Cette solution préserve la flexibilité d'un seul VLAN étiré tout en imposant une gestion d'IP prévisible et sans conflit. La section suivante explique comment configurer ce déploiement en utilisant l'espace client OVHcloud, Horizon, l'OpenStack CLI ou Terraform. + +## Exemples d'utilisation + +Voici quelques scénarios pratiques où l'étendre un réseau privé OVHcloud à travers des régions ou l'intégrer à d'autres produits OVHcloud peut résoudre des défis réels. + +- **Base de données sur Bare Metal & Application sur Public Cloud :** Connecter un serveur de base de données Bare Metal avec des applications exécutées dans des régions Public Cloud en utilisant le même VLAN sans conflits d'IP. +- **DHCP en tant que service pour les serveurs Bare Metal :** Attribuer des IPs depuis les réseaux Public Cloud aux serveurs Bare Metal via le DHCP pour une intégration transparente. +- **Migration entre les régions Public Cloud :** Déplacer des charges de travail d'une région à une autre tout en maintenant le réseau privé cohérent et en évitant les conflits d'IP. +- **Services multi-régions :** Exécuter des services distribués à travers plusieurs régions Public Cloud avec un réseau privé unifié pour une communication sécurisée. +- **Intégration avec d'autres produits OVHcloud :** Connecter des instances Public Cloud avec Private Cloud, Serveurs dédiés ou d'autres services OVHcloud via vRack. + +## Prérequis + +- Un [projet Public Cloud](/pages/public_cloud/public_cloud_cross_functional/create_a_public_cloud_project) dans votre compte OVHcloud +- Connaissances de base en réseau +- Accès à l'[espace client OVHcloud](/links/manager) +- Accès à l'[interface Horizon](/pages/public_cloud/public_cloud_cross_functional/introducing_horizon) + +## Instructions + +Cette section fournit des instructions pas à pas pour configurer un réseau privé étiré à travers plusieurs régions Public Cloud OVHcloud. Vous pouvez utiliser l'espace client OVHcloud & Horizon, l'OpenStack CLI ou Terraform. + +### Configuration pour Public Cloud + +Ajouter le projet Public Cloud à un vRack : + +![Ajouter un projet Public Cloud à Vrack](images/add_pcp_to_vrack.png){.thumbnail} + +> [!tabs] +> Via l'espace client OVHcloud et Horizon +>> **1. Créer des réseaux privés dans chaque région** +>> +>> Créer un réseau privé dans chaque région souhaitée en utilisant le même ID VLAN. +>> +>> ![Ajouter un projet Public Cloud à Vrack](images/add_pcp_to_vrack.png){.thumbnail} +>> +>> > [!tabs] +>> > +>> > **Note :** À ce stade, l'utilisation du même ID VLAN à travers les régions sans pools d'IP distincts est exactement ce qu'il faut éviter. +>> > +>> +>> **2. Configurer les sous-réseaux et les pools d'IP** +>> +>> Modifier chaque sous-réseau dans Horizon, configurer l'IP de passerelle réservée et le pool d'IP. +>> +>> **- Première région :** +>> +>> ![Modifier le sous-réseau région 1](images/configure_subnet_region1.png){.thumbnail} +>> +>> ![Modifier le sous-réseau région 1 - 2](images/configure_subnet_region1_2.png){.thumbnail} +>> +>> **- Deuxième région :** +>> +>> ![Modifier le sous-réseau région 2](images/configure_subnet_region2.png){.thumbnail} +>> +>> ![Modifier le sous-réseau région 2 - 2](images/configure_subnet_region2_2.png){.thumbnail} +>> +>> **3. Actualiser l'état du réseau** +>> +>> Retourner à l'espace client OVHcloud et actualiser la page du réseau. +>> +>> ![Actualiser la page de liste du vrack](images/refresh_vrack_list_page.png){.thumbnail} +>> +>> Vous devriez maintenant voir un seul VLAN étiré à travers plusieurs régions, chacune avec son propre pool d'IP. +>> +> Via l'Openstack CLI +>> > [!primary] +>> > +>> > **Requis :** Authentification OpenStack configurée dans les variables d'environnement +>> > +>> +>> **1. Charger les informations d'identification OpenStack :** +>> +>> ```bash +>> source openrc.sh +>> ``` +>> +>> **2. Sélectionner la première région** +>> +>> ```bash +>> export OS_REGION_NAME=RBX-A +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.1.2,end=10.1.1.254 --dns-nameserver 213.186.33.99 --gateway 10.1.1.1 stretch-private-subnet +>> ``` +>> +>> **3. Sélectionner la deuxième région** +>> +>> ```bash +>> export OS_REGION_NAME=GRA11 +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.2.2,end=10.1.2.254 --dns-nameserver 213.186.33.99 --gateway 10.1.2.1 stretch-private-subnet +>> ``` +>> +> Via Terraform +>> > [!primary] +>> > +>> > **Requis :** Clé d'application OVHcloud configurée dans les variables d'environnement +>> > +>> +>> 1. Créer un fichier de configuration principal Terraform (par exemple, `main.tf`) avec le contenu suivant : +>> +>> ```hcl +>> resource "ovh_cloud_project_network_private" "private-net" { +>> name = "stretch-private-network-vlan-${var.private_network_vlan_id}" +>> vlan_id = var.private_network_vlan_id +>> regions = var.regions +>> } +>> +>> resource "ovh_cloud_project_network_private_subnet_v2" "private-subnet" { +>> count = length(var.regions) +>> name = "stretch-private-subnet-vlan-${var.private_network_vlan_id}" +>> network_id = tolist(ovh_cloud_project_network_private.private-net.regions_attributes[*].openstackid)[count.index] +>> region = element(var.regions, count.index) +>> gateway_ip = "10.${var.private_network_vlan_id}.${count.index + 1}.1" +>> cidr = "10.${var.private_network_vlan_id}.0.0/16" +>> dns_nameservers = ["213.186.33.99"] +>> dhcp = true +>> enable_gateway_ip = true +>> +>> allocation_pools { +>> start = "10.${var.private_network_vlan_id}.${count.index + 1}.2" +>> end = "10.${var.private_network_vlan_id}.${count.index + 1}.254" +>> } +>> } +>> ``` +>> +>> 2. Créer un fichier de variables (par exemple, `variables.tf`) avec le contenu suivant : +>> +>> ```hcl +>> variable regions { +>> type = list +>> default = ["RBX-A", "GRA11"] +>> } +>> +>> variable private_network_vlan_id { +>> type = string +>> default = "1" +>> } +>> ``` +>> +>> 3. Appliquer la configuration +>> +>> ```bash +>> terraform apply +>> ``` +>> +>> Terraform créera le réseau privé, les sous-réseaux et les pools d'IP d'allocation dans chaque région comme défini. +>> + +### DHCP pour les serveurs Bare Metal (DHCP en tant que service) + +Cette section explique comment fournir des adresses IP DHCP Public Cloud aux serveurs Bare Metal en les intégrant à un réseau privé étiré. + +Le projet Public Cloud et le serveur Bare Metal doivent être ajoutés au même vRack : + +![Ajouter un serveur Bare Metal à Vrack](images/add_baremetal_to_vrack.png){.thumbnail} + +> [!tabs] +> Via l'espace client OVHcloud et Horizon +>> **1. Créer un réseau privé Public Cloud** +>> +>> ![Créer un réseau privé Public Cloud](images/create_private_network.png){.thumbnail} +>> +>> > [!primary] +>> > +>> > **Note :** Utiliser le même ID VLAN qui sera utilisé pour le serveur Bare Metal. +>> > +>> +>> **2. Obtenir l'adresse MAC de l'interface privée du serveur Bare Metal.** +>> +>> ![Obtenir l'adresse MAC](images/obtain_mac_address.png){.thumbnail} +>> +>> **3. Créer un port virtuel sur le réseau privé Public Cloud en utilisant l'adresse MAC du serveur Bare Metal.** +>> +>> ![Créer un port virtuel](images/create_virtual_port.png){.thumbnail} +>> +>> **4. Installer un système d'exploitation sur le serveur Bare Metal (par exemple, Ubuntu 24.04).** +>> +>> ```bash +>> cat <> network: +>> version: 2 +>> ethernets: +>> privint: +>> match: +>> macaddress: "74:56:3c:85:7e:40" +>> dhcp4: false +>> dhcp6: false +>> vlans: +>> vlan1: +>> id: 1 +>> link: privint +>> dhcp4: true +>> EOF +>> +>> sudo chmod 600 /etc/netplan/90-private-interface.yaml +>> sudo netplan apply +>> ``` +>> +>> > [!warning] +>> > +>> > **Note :** Les scripts post-installation peuvent avoir besoin d'être mis à jour avec l'adresse MAC correcte et l'ID VLAN. +>> > +>> +> Via l'Opentsack CLI +>> > [!primary] +>> > +>> > **Requis :** Authentification OpenStack configurée dans les variables d'environnement +>> > +>> +>> **1. Charger les informations d'identification OpenStack.** +>> +>> ```bash +>> source openrc.sh +>> ``` +>> +>> **2. Sélectionner la région :** +>> +>> ```bash +>> export OS_REGION_NAME=RBX-A +>> ``` +>> +>> 3. Créer le réseau privé et le sous-réseau : +>> +>> ```bash +>> openstack network create --provider-network-type vrack --provider-segment 1 stretch-private-network-vlan-1 +>> +>> openstack subnet create --network stretch-private-network-vlan-1 --subnet-range 10.1.0.0/16 --dhcp \ +>> --allocation-pool start=10.1.0.2,end=10.1.254.254 --dns-nameserver 213.186.33.99 --gateway 10.1.0.1 stretch-private-subnet +>> ``` +>> +>> **4. Créer un port virtuel pour le serveur Bare Metal.** +>> +>> ```bash +>> openstack port create --network stretch-private-network-vlan-1 bare_metal_port +>> ``` +>> +>> 5. Installer le système d'exploitation sur le serveur Bare Metal (Ubuntu 24.04 utilisé dans cet exemple). +>> +>> ```bash +>> cat <> network: +>> version: 2 +>> ethernets: +>> privint: +>> match: +>> macaddress: "74:56:3c:85:7e:40" +>> dhcp4: false +>> dhcp6: false +>> vlans: +>> vlan1: +>> id: 1 +>> link: privint +>> dhcp4: true +>> EOF +>> +>> sudo chmod 600 /etc/netplan/90-private-interface.yaml +>> sudo netplan apply +>> ``` +>> +>> > [!warning] +>> > +>> > **Note :** Les scripts post-installation peuvent avoir besoin d'être mis à jour avec l'adresse MAC correcte et l'ID VLAN. +>> > +>> +> Via Terraform +>> > [!primary] +>> > +>> > **Requis :** Clé d'application OVHcloud configurée dans les variables d'environnement +>> > +>> +>> **1. Créer le fichier de variables Terraform `variables.tf`** +>> +>> Définir toutes les variables nécessaires pour le déploiement : +>> +>> ```hcl +>> variable "region" { +>> type = string +>> default = "RBX-A" +>> } +>> +>> variable "private_network_vlan_id" { +>> type = string +>> default = "1" +>> } +>> +>> variable "bare_metal_server_name" { +>> type = string +>> default = " \ No newline at end of file diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_baremetal_to_vrack.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_baremetal_to_vrack.png new file mode 100644 index 00000000000..04a2050f205 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_baremetal_to_vrack.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_pcp_to_vrack.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_pcp_to_vrack.png new file mode 100644 index 00000000000..04ac19b8702 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/add_pcp_to_vrack.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1.png new file mode 100644 index 00000000000..d4afac853f5 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1_2.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1_2.png new file mode 100644 index 00000000000..f7452cfcb3e Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region1_2.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2.png new file mode 100644 index 00000000000..f0fcfedba2b Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2_2.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2_2.png new file mode 100644 index 00000000000..83ac8ce1386 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/configure_subnet_region2_2.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_private_network.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_private_network.png new file mode 100644 index 00000000000..d34c1422b25 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_private_network.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_virtual_port.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_virtual_port.png new file mode 100644 index 00000000000..7015dcc9524 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/create_virtual_port.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/obtain_mac_address.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/obtain_mac_address.png new file mode 100644 index 00000000000..cddfe66bd94 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/obtain_mac_address.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/problematic_image.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/problematic_image.png new file mode 100644 index 00000000000..d2e564e8bf5 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/problematic_image.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/refresh_vrack_list_page.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/refresh_vrack_list_page.png new file mode 100644 index 00000000000..246b27cae36 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/refresh_vrack_list_page.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/solution_image.png b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/solution_image.png new file mode 100644 index 00000000000..ef9cc3a97f3 Binary files /dev/null and b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/images/solution_image.png differ diff --git a/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/meta.yaml b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/meta.yaml new file mode 100644 index 00000000000..2c1da3d3eb7 --- /dev/null +++ b/pages/public_cloud/public_cloud_network_services/extend_private_network_accross_regions/meta.yaml @@ -0,0 +1,2 @@ +id: b05d91f0-f17a-4191-a965-4f74226f6d15 +full_slug: public-cloud-network-extend-private-network-multi-region \ No newline at end of file