Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page décrit les spécifications auxquelles une session VPN BGP (Border Gateway Protocol) doit se conformer et explique comment créer une session VPN BGP.
Le VPN Google Distributed Cloud (GDC) air-gapped est compatible avec le routage dynamique à l'aide d'une session BGP IPv4 pour chaque tunnel VPN. La session BGP permet aux pairs BGP du réseau distant et de l'organisation GDC d'annoncer des routes les uns aux autres.
Avant de commencer
Pour créer une session BGP VPN, vous devez disposer des rôles Identity and Access Management nécessaires :
Administrateur VPN : dispose d'autorisations de lecture et d'écriture sur toutes les ressources liées au VPN. Demandez à votre administrateur IAM de l'organisation de vous attribuer le rôle Administrateur VPN (vpn-admin).
Lecteur VPN : dispose d'autorisations de lecture sur toutes les ressources liées au VPN. Demandez à votre administrateur IAM de l'organisation de vous attribuer le rôle Lecteur VPN (vpn-viewer).
Le pair BGP de l'organisation accepte un intervalle keepalive BGP de 30 secondes, avec un délai de maintien de 90 secondes.Pour chaque session BGP, les adresses IPv4 doivent répondre aux exigences suivantes :
Chaque adresse IPv4 BGP doit appartenir au même sous-réseau /30 compris dans la plage 169.254.0.0/16.
Chaque adresse IPv4 BGP est le premier ou le deuxième hôte du sous-réseau /30. Les première et dernière adresses IP du sous-réseau sont réservées aux adresses réseau et de diffusion.
Chaque plage d'adresses BGP pour chaque session BGP doit être unique parmi toutes les sessions BGP VPN de l'organisation.
L'authentification MD5 n'est pas compatible. Il s'agit d'une méthode permettant de vérifier l'intégrité et l'authenticité des données à l'aide de l'algorithme de hachage MD5.
Créer une session BGP VPN
Pour créer une session BGP pour le tunnel VPN, procédez comme suit :
Créez un objet VPNBGPPeer dans le cluster d'administrateur de l'organisation, dans l'espace de noms de la plate-forme :
MANAGEMENT_API_SERVER : chemin d'accès au fichier kubeconfig du serveur d'API zonal. Si vous n'avez pas encore généré de fichier kubeconfig pour le serveur d'API dans la zone cible, consultez Se connecter pour en savoir plus.
VPN_BGP_PEER_NAME : nom du pair BGP VPN.
REMOTE_PEER_NAME : nom du pair BGP dans le réseau distant.
REMOTE_PEER_IP : adresse IPv4 BGP du sous-réseau /30 du pair BGP dans le réseau distant.
REMOTE_PEER_ASN : numéro ASN (Autonomous System Number) configuré pour le réseau distant.
LOCAL_PEER_NAME : nom du pair BGP dans l'organisation GDC.
LOCAL_PEER_IP : adresse IPv4 BGP du sous-réseau /30 du pair BGP dans l'organisation GDC.
LOCAL_PEER_ASN : numéro ASN configuré pour l'organisation GDC.
Vérifiez que l'objet VPN_BGP_PEER_NAME a été correctement rapproché en examinant le champ Status. Obtenez les détails de l'objet VPNBGPPeer :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis document outlines the requirements and procedures for establishing a VPN Border Gateway Protocol (BGP) session within Google Distributed Cloud (GDC) air-gapped environments.\u003c/p\u003e\n"],["\u003cp\u003eCreating a VPN BGP session requires either the VPN Admin or VPN Viewer role, which can be granted by the Organization IAM Admin.\u003c/p\u003e\n"],["\u003cp\u003eEach VPN BGP session must use unique IPv4 addresses from a \u003ccode\u003e/30\u003c/code\u003e subnet within the \u003ccode\u003e169.254.0.0/16\u003c/code\u003e range, and addresses must be the first or second host in the subnet, with a keepalive interval of 30 seconds and a hold timer of 90 seconds.\u003c/p\u003e\n"],["\u003cp\u003eThe process of creating a BGP session for a VPN tunnel involves creating a \u003ccode\u003eVPNBGPPeer\u003c/code\u003e object with specific remote and local parameters, then verifying its status.\u003c/p\u003e\n"],["\u003cp\u003eMD5 authentication is not supported.\u003c/p\u003e\n"]]],[],null,["# Create a VPN BGP session\n\nThis page describes the specifications a VPN Border Gateway\nProtocol (BGP) session must adhere to and how to create a VPN BGP session.\n\nGoogle Distributed Cloud (GDC) air-gapped VPN supports dynamic routing using an IPv4 BGP session for each VPN tunnel. The BGP session lets the BGP peers\nin the remote network and in the GDC organization advertise routes to each\nother.\n\nBefore you begin\n----------------\n\nTo create a VPN BGP session, you must have the necessary identity and access roles:\n\n- VPN Admin: has read and write permissions on all VPN-related resources. Ask your Organization IAM Admin to grant you the VPN Admin (`vpn-admin`) role.\n- VPN Viewer: has read permissions on all VPN-related resources. Ask your Organization IAM Admin to grant you the VPN Viewer (`vpn-viewer`) role.\n- For more information, see [Role definitions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/role-definitions).\n\nVPN BGP session specifications\n------------------------------\n\nThe BGP peer in the organization supports a BGP keepalive interval of 30 seconds, with a hold timer of 90 seconds.For each BGP session, the IPv4 addresses must meet the following requirements:\n\n- Each BGP IPv4 address must belong to the same `/30` subnet that fits within the `169.254.0.0/16` range.\n- Each BGP IPv4 address is the first or second host of the `/30` subnet. The first and the last IP addresses of the subnet are reserved for network and broadcast addresses.\n- Each BGP address range for each BGP session must be unique among all VPN BGP sessions for the organization.\n\nMD5 authentication is not supported. This is a method of verifying the integrity and authenticity of data using the MD5 hashing algorithm.\n\nCreate a VPN BGP session\n------------------------\n\nTo create a BGP session for the VPN tunnel, follow these steps:\n\n1. Create a `VPNBGPPeer` object in the\n org admin cluster in the platform namespace:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e create -n platform -f - \u003c\u003cEOF\n apiVersion: networking.gdc.goog/v1\n kind: VPNBGPPeer\n metadata:\n name: \u003cvar translate=\"no\"\u003eVPN_BGP_PEER_NAME\u003c/var\u003e\n spec:\n remote:\n name: \u003cvar translate=\"no\"\u003eREMOTE_PEER_NAME\u003c/var\u003e\n ip: \u003cvar translate=\"no\"\u003eREMOTE_PEER_IP\u003c/var\u003e\n asn: \u003cvar translate=\"no\"\u003eREMOTE_PEER_ASN\u003c/var\u003e\n local:\n name: \u003cvar translate=\"no\"\u003eLOCAL_PEER_NAME\u003c/var\u003e\n ip: \u003cvar translate=\"no\"\u003eLOCAL_PEER_IP\u003c/var\u003e\n asn: \u003cvar translate=\"no\"\u003eLOCAL_PEER_ASN\u003c/var\u003e\n EOF\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e: the zonal API server's kubeconfig path. If you have not yet generated a kubeconfig file for the API server in your targeted zone, see [Sign in](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in#cli) for details.\n - \u003cvar translate=\"no\"\u003eVPN_BGP_PEER_NAME\u003c/var\u003e: the name of the VPN BGP peer.\n - \u003cvar translate=\"no\"\u003eREMOTE_PEER_NAME\u003c/var\u003e: the name for the BGP peer in the remote network.\n - \u003cvar translate=\"no\"\u003eREMOTE_PEER_IP\u003c/var\u003e: the BGP IPv4 address from the `/30` subnet of the BGP peer in the remote network.\n - \u003cvar translate=\"no\"\u003eREMOTE_PEER_ASN\u003c/var\u003e: the Autonomous System Number (ASN) configured for the remote network.\n - \u003cvar translate=\"no\"\u003eLOCAL_PEER_NAME\u003c/var\u003e: a name for the BGP peer in the GDC organization.\n - \u003cvar translate=\"no\"\u003eLOCAL_PEER_IP\u003c/var\u003e: the BGP IPv4 address from the `/30` subnet of the BGP peer in the GDC organization.\n - \u003cvar translate=\"no\"\u003eLOCAL_PEER_ASN\u003c/var\u003e: the ASN configured for the GDC organization.\n2. Verify that the \u003cvar translate=\"no\"\u003eVPN_BGP_PEER_NAME\u003c/var\u003e object was correctly reconciled by examining the `Status` field. Get the details of the `VPNBGPPeer` object:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e describe -n platform vpnbgppeer \u003cvar translate=\"no\"\u003eVPN_BGP_PEER_NAME\u003c/var\u003e\n\n Examine the output, it must look similar to the following example: \n\n Status:\n Conditions:\n Last Transition Time: 2024-05-10T00:26:13Z\n Message: Ready\n Observed Generation: 1\n Reason: Ready\n Status: True\n Type: ValidIPs\n Last Transition Time: 2024-05-10T00:26:00Z\n Message: Used by 0 VPNTunnels, must be used by a single VPNTunnel\n Observed Generation: 1\n Reason: GetResourceFailed\n Status: False\n Type: TunnelsAttached\n Last Transition Time: 2024-05-10T00:26:00Z\n Message: TunnelsAttached or ValidIPs Condition not Ready.\n Observed Generation: 1\n Reason: Unknown\n Status: False\n Type: Reconciled\n Last Transition Time: 2024-05-10T00:26:01Z\n Message: ValidIPs or Reconciled Condition not Ready.\n Observed Generation: 1\n Reason: Unknown\n Status: False\n Type: AdvertisedRoutesReady\n Last Transition Time: 2024-05-10T00:26:13Z\n Message: Ready\n Observed Generation: 1\n Reason: Ready\n Status: True\n Type: ReceivedRoutesValid\n Last Transition Time: 2024-05-10T00:26:01Z\n Message: TunnelsAttached Condition not Ready.\n Observed Generation: 1\n Reason: Unknown\n Status: False\n Type: ReceivedRoutesReady\n Last Transition Time: 2024-05-10T00:26:01Z\n Message: Condition \"TunnelsAttached\" is not ready.\n Observed Generation: 1\n Reason: NotReady\n Status: False\n Type: Ready\n ```\n\nThe `VPNBGPPeer` must be attached to a `VPNTunnel`. We handle this step in [Create a VPN Tunnel](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/vpn/configure-the-tunnel#create-a-vpn-tunnel).\n\nWhat's next\n-----------\n\n- [Create the secret with a PSK](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/vpn/create-secret)"]]