Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Externe IPv4-Adresse in ein anderes Projekt verschieben
Statische externe IPv4-Adressen sind einem Google Cloud-Projekt zugeordnet und können nur innerhalb dieses Projekts verwendet werden. Sie können jedoch eine statische externe IPv4-Adresse von einem Projekt in ein anderes verschieben.
IAM-Rollen und -Berechtigungen
Zum Verschieben einer regionalen IP-Adresse benötigen Sie die folgenden Berechtigungen:
compute.addresses.delete im Quellprojekt
compute.addresses.create im Zielprojekt
Zum Verschieben einer globalen IP-Adresse benötigen Sie die folgenden Berechtigungen:
Die IP-Adresse wurde vom Cloud-Support nicht als Teil eines zusammenhängenden IP-Adressbereichs reserviert. Weitere Informationen finden Sie unter Externe IPv4-Adresse verschieben schlägt fehl.
Beschränkungen
Wenn Sie die Zuweisung einer IP-Adresse aufheben, müssen Sie einige Zeit warten, bevor Sie sie verschieben:
Warten Sie bei globalen IP-Adressen 10 Minuten.
Warten Sie bei regionalen IP-Adressen 20 Minuten.
Sie können die Region einer regionalen IP-Adresse nicht ändern.
Globale IP-Adressen können nicht in regionale oder regionale IP-Adressen in globale umgewandelt werden.
Kontingente
Die Anzahl der Adressen, die Sie pro Minute verschieben können, ist begrenzt. Weitere Informationen erhalten Sie im Abschnitt zu projektbasierten Kontingenten in der VPC-Dokumentation.
Externe IPv4-Adresse in ein anderes Projekt verschieben
Sie können eine regionale oder globale externe IPv4-Adresse von einem Projekt in ein anderes verschieben. Wenn Sie die IP-Adresse verschieben, wird der IP-Adressressource standardmäßig derselbe Name und dieselbe Beschreibung zugewiesen. Sie können jedoch einen neuen Namen oder eine neue Beschreibung zuweisen. Nachdem die externe IPv4-Adresse in ein neues Projekt verschoben wurde, können Sie sie zulässigen Ressourcen in diesem Projekt zuweisen.
Console
Rufen Sie in der Google Cloud Console IP-Adressen auf.
Wählen Sie im Menü Weitere Aktionen (more_vert) der IP-Adresse, die Sie verschieben möchten, die Option In ein anderes Projekt verschieben aus.
Klicken Sie auf Projekt auswählen und wählen Sie das Projekt aus, in das Sie die IP-Adresse verschieben möchten.
Optional: Geben Sie für die IP-Adresse einen neuen Namen ein.
Optional: Geben Sie eine neue Beschreibung für die IP-Adresse ein.
Klicken Sie auf Verschieben.
gcloud
Die Befehlsoptionen hängen davon ab, ob Sie eine regionale oder globale IP-Adresse verschieben und ob Sie den Adressnamen und die Beschreibung beibehalten oder ersetzen. In den folgenden Beispielen werden einige dieser Kombinationen beschrieben.
Regionale externe IPv4-Adresse in ein anderes Projekt verschieben:
ADDRESS_NAME: der Name der IP-Adressressource, die Sie verschieben möchten.
TARGET_PROJECT: der Name oder die ID des Projekts, in das Sie die IP-Adresse verschieben möchten.
REGION: die Region der IP-Adresse.
NEW_NAME: ein neuer Name für die IP-Adressressource im neuen Projekt.
NEW_DESCRIPTION: ein neuer Name für die IP-Adressressource im neuen Projekt. Wenn nichts angegeben ist, wird die vorhandene Beschreibung, falls vorhanden, für die Ressource verwendet.
Die Details der Anfrage hängen davon ab, ob Sie eine regionale oder globale IP-Adresse verschieben und ob Sie den Adressnamen und die Beschreibung beibehalten oder ersetzen. In den folgenden Beispielen werden einige dieser Kombinationen beschrieben.
Regionale externe IPv4-Adresse in ein anderes Projekt verschieben:
POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/regions/REGION/addresses/ADDRESS_NAME/move
{
"destination_address": "projects/TARGET_PROJECT/global/addresses/ADDRESS_NAME",
}
Regionale externe IPv4-Adresse in ein anderes Projekt verschieben und ihr einen neuen Namen und eine neue Beschreibung im neuen Projekt zuweisen:
POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/regions/REGION/addresses/ADDRESS_NAME/move
{
"destination_address": "projects/TARGET_PROJECT/global/addresses/NEW_NAME",
"description": "NEW_DESCRIPTION",
}
Globale externe IPv4-Adresse in ein anderes Projekt verschieben:
POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/global/addresses/ADDRESS_NAME/move
{
"destination_address": "projects/TARGET_PROJECT/global/addresses/ADDRESS_NAME",
}
Dabei gilt:
ADDRESS_NAME: der Name der IP-Adressressource, die Sie verschieben möchten.
SOURCE_PROJECT: der Name oder die ID des Projekts, in das Sie die IP-Adresse verschieben möchten.
TARGET_PROJECT: der Name oder die ID des Projekts, in das Sie die IP-Adresse verschieben möchten.
REGION: die Region der IP-Adresse.
NEW_NAME: ein neuer Name für die IP-Adressressource im neuen Projekt.
NEW_DESCRIPTION: ein neuer Name für die IP-Adressressource im neuen Projekt. Wenn nichts angegeben ist, wird die vorhandene Beschreibung, falls vorhanden, für die Ressource verwendet.
Fehlerbehebung
Verschieben einer externen IPv4-Adresse schlägt fehl
Wenn Sie versuchen, eine externe IPv4-Adresse zu verschieben, wird möglicherweise die folgende Fehlermeldung angezeigt:
Invalid resource usage: 'Cannot move address that belongs to a reserved address
range. Address range must be disassembled first.'
Wenn diese Meldung angezeigt wird, wurde die IP-Adresse vom Cloud-Support als Teil eines zusammenhängenden IP-Adressbereichs reserviert. Wenn Sie eine IP-Adresse dieses Typs verschieben möchten, wenden Sie sich an den Cloud-Support.
Der Cloud-Support kann den gesamten IP-Adressbereich in ein anderes Projekt verschieben. Das Verschieben nur eines Teils des Bereichs wird nicht unterstützt.
So prüfen Sie, ob eine IP-Adresse Teil eines Bereichs ist, der vom Cloud-Support reserviert wurde:
Prüfen Sie den Name der IP-Adresse. Wenn die IP-Adresse vom Cloud-Support reserviert wurde, besteht ihr Name aus einem String, gefolgt von den vier Byte der IP-Adresse, getrennt durch Bindestriche. Wenn eine IP-Adresse beispielsweise 198.51.100.2 lautet und vom Cloud-Support reserviert wurde, hat der Name das folgende Format: STRING-198-51-100-2. Andere IP-Adressen, die als Teil desselben Bereichs reserviert wurden, haben denselben String, gefolgt von ihren IP-Adressen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-12-06 (UTC)."],[],[],null,["# Move an external IPv4 address to a different project\n====================================================\n\nStatic external IPv4 addresses are associated with a Google Cloud project and\ncan be used only within that project. However, you can move a static external\nIPv4 address from one project to another.\n\nIAM roles and permissions\n-------------------------\n\nTo move a regional IP address, you must have the following permissions:\n\n- `compute.addresses.delete` in the source project\n- `compute.addresses.create` in the destination project\n\nTo move a global IP address, you must have the following permissions:\n\n- `compute.globalAddresses.delete` in the source project\n- `compute.globalAddresses.create` in the destination project\n\nExample roles that include these permissions:\n\n- [Compute Admin](/compute/docs/access/iam#compute.admin) (`roles/compute.admin`)\n- [Compute Network Admin](/compute/docs/access/iam#compute.networkAdmin) (`roles/compute.networkAdmin`)\n- [Compute Public IP Admin](/compute/docs/access/iam#compute.publicIpAdmin) (`roles/compute.publicIpAdmin`)\n\nBefore you begin\n----------------\n\n- Verify that the system limits for your project let you move IP addresses. See the following per-project system limits:\n - [Address move requests per minute](/vpc/docs/quota#global-address-move-quota)\n - [Address move requests per minute per region](/vpc/docs/quota#per-region-address-move-quota)\n\n If the system limit values are `0`, you can't move IP addresses. If you need to move IP addresses, contact your Google Cloud sales team.\n- Verify that the project that you want to move the IP address to exists. If not, [create a project](/resource-manager/docs/creating-managing-projects).\n- [Enable](https://console.cloud.google.com/apis/library/compute.googleapis.com) the [Compute Engine API](/compute/docs/reference/rest/v1) in the target project.\n- Verify that the target project has enough available capacity in the appropriate quotas for the IP addresses that you're moving:\n - For regional external IP addresses, check the [static IP addresses quota](/vpc/docs/quota#static-ip-addresses-quota).\n - For global external IP addresses, check the [static IP addresses global quota](/vpc/docs/quota#static-ip-addresses-global-quota).\n- Verify that the IP address that you want to move has the following attributes:\n - The access type is external.\n - The IP version is IPv4.\n - The IP address is reserved (static), not ephemeral. To reserve an IP address, see [Reserve a new static external IP address](/vpc/docs/reserve-static-external-ip-address#reserve_new_static).\n - The IP address is not in use by any resource, for example, a VM instance or a forwarding rule. To unassign an IP address, see [Unassign a static external IP address](/compute/docs/ip-addresses/configure-static-external-ip-address#unassign_ip).\n - The IP address was not reserved by Cloud Support as part of a contiguous IP address range. For more information, see [Moving an external IPv4 address fails](#reserved-range).\n\nLimitations\n-----------\n\n- If you unassign an IP address, you must wait some time before you move it:\n\n - For global IP addresses, wait 10 minutes.\n - For regional IP addresses, wait 20 minutes.\n- You can't change the region of a regional IP address.\n\n- You can't convert a global IP address to regional or a regional IP address to\n global.\n\n- You can't move [BYOIP addresses](/vpc/docs/bring-your-own-ip) between\n projects.\n\nMove an external IPv4 address to a different project\n----------------------------------------------------\n\nYou can move a regional or global external IPv4 address from one project to\nanother. When you move the IP address, by default the IP address resource is\nassigned the same name and description. However, you can choose to assign a new\nname or description. After the external IPv4 address is moved to a new project,\nyou can assign it to [eligible resources](/vpc/docs/ip-addresses#external) in\nthat project. \n\n### Console\n\n1. In the Google Cloud console, go to **IP addresses**.\n\n [Go to IP addresses](https://console.cloud.google.com/networking/addresses/list)\n\n \u003cbr /\u003e\n\n2. In the **More actions** menu (more_vert) of the IP address\n that you want to move, select **Move to another project**.\n\n3. Click **Select project**, and then select the project that you want to\n move the IP address to.\n\n4. Optional: Enter a new **Name** for the IP address.\n\n5. Optional: Enter a new **Description** for the IP address.\n\n6. Click **Move**.\n\n### gcloud\n\nThe command options vary depending on whether you're moving a\nregional or global IP address, and whether you're keeping or replacing\nthe address name or description. The following examples describe some\nof these combinations.\n\n- Move a regional external IPv4 address to a different project:\n\n ```\n gcloud compute addresses move ADDRESS_NAME \\\n --target-project=TARGET_PROJECT \\\n --region=REGION\n ```\n- Move a regional external IPv4 address to a different project and assign\n it a new name and description in the new project:\n\n ```\n gcloud compute addresses move ADDRESS_NAME \\\n --target-project=TARGET_PROJECT \\\n --new-name=NEW_NAME \\\n --description=NEW_DESCRIPTION \\\n --region=REGION\n ```\n- Move a global external IPv4 address to a different project:\n\n ```\n gcloud compute addresses move ADDRESS_NAME \\\n --target-project=TARGET_PROJECT \\\n --global\n ```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eADDRESS_NAME\u003c/var\u003e: the name of the IP address resource that you want to move.\n- \u003cvar translate=\"no\"\u003eTARGET_PROJECT\u003c/var\u003e: the name or ID of the project that you want to move the IP address to.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the IP address.\n- \u003cvar translate=\"no\"\u003eNEW_NAME\u003c/var\u003e: a new name for the IP address resource in the new project.\n- \u003cvar translate=\"no\"\u003eNEW_DESCRIPTION\u003c/var\u003e: a new name for the IP address resource in the new project. If omitted, the existing description, if any, is used for the resource.\n\nFor more information, see the [`gcloud compute addresses\nmove`](/sdk/gcloud/reference/v1/compute/addresses/move) reference\ndocumentation.\n\n### API\n\nThe request details vary depending on whether you're moving a\nregional or global IP address, and whether you're keeping or replacing\nthe address name or description. The following examples describe some\nof these combinations.\n\n- Move a regional external IPv4 address to a different project:\n\n ```\n POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/regions/REGION/addresses/ADDRESS_NAME/move\n {\n \"destination_address\": \"projects/TARGET_PROJECT/global/addresses/ADDRESS_NAME\",\n }\n ```\n- Move a regional external IPv4 address to a different project and assign\n it a new name and description in the new project:\n\n ```\n POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/regions/REGION/addresses/ADDRESS_NAME/move\n {\n \"destination_address\": \"projects/TARGET_PROJECT/global/addresses/NEW_NAME\",\n \"description\": \"NEW_DESCRIPTION\",\n }\n ```\n- Move a global external IPv4 address to a different project:\n\n ```\n POST https://www.googleapis.com/compute/v1/projects/SOURCE_PROJECT/global/addresses/ADDRESS_NAME/move\n {\n \"destination_address\": \"projects/TARGET_PROJECT/global/addresses/ADDRESS_NAME\",\n }\n ```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eADDRESS_NAME\u003c/var\u003e: the name of the IP address resource that you want to move.\n- \u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e: the name or ID of the project that you want to move the IP address to.\n- \u003cvar translate=\"no\"\u003eTARGET_PROJECT\u003c/var\u003e: the name or ID of the project that you want to move the IP address to.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of the IP address.\n- \u003cvar translate=\"no\"\u003eNEW_NAME\u003c/var\u003e: a new name for the IP address resource in the new project.\n- \u003cvar translate=\"no\"\u003eNEW_DESCRIPTION\u003c/var\u003e: a new name for the IP address resource in the new project. If omitted, the existing description, if any, is used for the resource.\n\nTroubleshooting\n---------------\n\n### Moving an external IPv4 address fails\n\nYou might see the following error message when you try to move an external\nIPv4 address:\n\n`Invalid resource usage: 'Cannot move address that belongs to a reserved address\nrange. Address range must be disassembled first.'`\n\nIf you see this message, it means that the IP address was reserved by Cloud\nSupport as part of a contiguous IP address range. To move an IP address of this\ntype, contact [Cloud Support](https://console.cloud.google.com/support?referrer=PlatformBarHelp).\nCloud Support can move the entire IP address range to another project. Moving\nonly part of the range is not supported.\n\nTo check if an IP address is part of a range that was reserved by Cloud Support,\ndo the following:\n\n1. [List static external IP addresses](/vpc/docs/reserve-static-external-ip-address#list_ip), and then find the IP address that you want to check.\n2. Check the name of the IP address. If the IP address was reserved by Cloud Support, its name is made up of a string followed by the four bytes of the IP address, separated by hyphens. For example, if an IP address is `198.51.100.2`, and it was reserved by Cloud Support, the name has the following form: \u003cvar translate=\"no\"\u003eSTRING\u003c/var\u003e`-198-51-100-2`. Other IP addresses that were reserved as part of the same range share the same string, followed by their IP addresses."]]