Google Cloud 會將舊版網路轉換為自訂模式 VPC 網路,並在 VM 執行個體所在的區域中建立單一子網路。虛擬私有雲網路和子網路的名稱都與原始舊版網路相同。
子網路
Google Cloud 會在轉換期間建立子網路及其子網路路徑。子網路會在 VM 執行個體所在的區域中建立。 Google Cloud 會自動將 VM 執行個體、區域轉送規則和執行個體群組管理員等資源轉換為子網路。子網路的名稱與原始舊版網路相同。
如果舊版網路不含任何資源, Google Cloud 就不會建立子網路。
VM 執行個體
轉換後網路中具有網路介面的所有執行個體,都會參照新建立的子網路。
轉送規則
虛擬私有雲網路中的所有內部轉送規則都會參照新建立的子網路。
路徑
網路轉換為 VPC 網路時,所有自訂靜態路徑都會維持不變。如果 Google Cloud 建立新的子網路,系統會新增一個名為「子網路路徑」的路徑。詳情請參閱路徑類型。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-03 (世界標準時間)。"],[],[],null,["# Legacy networks\n===============\n\nLegacy networks are not recommended and can no longer be created. Many newer\nGoogle Cloud features are not supported in legacy networks. Instead, use\nVirtual Private Cloud (VPC) networks. For more information, see\n[VPC networks](/vpc/docs/vpc). For more information about\nreplacing legacy networks, see [Replace legacy networks](#replacing-legacy).\n| **Note:** The [IPv4Range](/compute/docs/reference/rest/v1/networks) field for creating legacy networks is deprecated and is no longer available for any Google Cloud project. You cannot create new legacy networks. However, existing legacy networks are not affected and continue to operate normally.\n\nAbout legacy networks\n---------------------\n\nLegacy networks have a single\n[RFC 1918](https://tools.ietf.org/html/rfc1918)\nrange, which you specify when you create the network.\nThe network is global in scope and spans all cloud regions.\n\nIn a legacy network, instance IP addresses are not grouped by region or zone.\nOne IP address can appear in one region, and the following IP address can be in\na different region. Any given range of IPs can be spread across all regions, and\nthe IP addresses of instances created within a region are not necessarily\ncontiguous.\n\nThe following figure shows a legacy (non-VPC) network. Traffic\nfrom the internet passes through a global switching function in the network\n(shown in the diagram as a virtual switch), then down to individual instances.\n\nInstances in a region can have IP addresses that are not grouped in any way.\nAs shown in the example, instances from 10.240.0.0/16 are spread unpredictably\nacross regions 1 and 2. For example, `10.240.1.4` is in region 2, `10.240.1.5`\nis in region 1, and `10.240.1.6` is in region 2.\n[](/static/vpc/images/no_subnetworks_1.svg) A legacy network (click to enlarge).\n\nDifferences between legacy and VPC networks\n-------------------------------------------\n\n- Legacy networks can no longer be created.\n\n- Legacy networks have a single global IP address range that cannot be divided\n into subnets. VPC networks are divided into subnets.\n\n- With VPC networks, each Google Cloud region can have zero\n or more subnets. It is not possible to create regional subnets with a legacy\n network.\n\n- Some Google Cloud networking features are [not\n available](/vpc/docs/using-legacy#restrictions) in legacy networks.\n\n| **Note:** You can convert a legacy network to a VPC network. For more information, see [Single-region conversion\n| tool](/vpc/docs/legacy#single-region-conversion).\n\nRoutes\n------\n\nLegacy networks start with only two routes, the default route to outside the\nnetwork and the route to the overall legacy network IP range. See\n[Using Routes](/vpc/docs/using-routes) for instructions on creating\nroutes.\n\nFirewall rules\n--------------\n\nUser-created networks have a default Allow-all firewall rule for outbound\ntraffic and a default Deny-all firewall rule for inbound traffic. See\n[Use VPC firewall rules](/vpc/docs/using-firewalls) for instructions on\ncreating firewall rules.\n\nReplace legacy networks\n-----------------------\n\nIf you want to move individual VM instances out of your legacy\nnetwork, see [Migrating a VM between\nnetworks](/compute/docs/instances/migrating-interfaces-between-networks).\n\nIf you have an existing legacy network, you can replace it with a\nVPC network in one of two ways:\n\n- **Single-region conversion tool:** Use the `gcloud` or API single-region\n conversion tool. This tool converts a legacy network to a custom mode\n VPC network. Before starting the conversion, all\n Google Cloud resources in the legacy network must be in a *single region* .\n If the legacy network contains resources in multiple regions, including stopped\n VMs, the conversion fails. After the conversion, the subnet in the new network\n has the same internal IP address range as the entire legacy network. After the\n conversion is complete, you can use all features that VPC\n networks offer, such as creating regional subnets. For more information about\n the conversion, see [Converting a single-region legacy network to a\n VPC network](/vpc/docs/using-legacy#convert).\n\n- **Manual migration** : Recreate resources in your legacy network in a\n VPC network. For more information, see [Manually migrating to a\n VPC network](/vpc/docs/using-legacy#manual-migration).\n\n### Single-region conversion tool\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can convert a legacy network to a custom mode VPC network\nby using the [single-region conversion tool](/vpc/docs/using-legacy#convert).\nDuring the conversion, the legacy network's IP address range is used to\nconfigure a subnet in the converted VPC network. Because a given\nsubnet can be associated with only one region, the conversion tool works only if\nall resources in the legacy network are in a single region.\n\nUsing the tool to convert from a legacy network to a VPC network\ndoes not disrupt network traffic; your resources continue to operate normally.\nThe conversion is one way, so you cannot revert to a legacy network after\nconverting to a VPC network.\n\nIf your legacy network contains Google Kubernetes Engine clusters, your GKE\nclusters must be upgraded *after* the conversion to ensure that components\noperate correctly. For more information, see [Converting a legacy network that\ncontains GKE\nclusters](/vpc/docs/using-legacy#convert-network-gke).\n\nAfter the conversion is complete, the new VPC network operates as\nany other VPC network. You can [add new\nsubnets](/vpc/docs/create-modify-vpc-networks#add-subnets) and use other VPC-related\nfeatures. However, the converted subnet has the same internal IP address range\nas the entire legacy network, so new subnets must be created from [other valid\nranges](/vpc/docs/subnets#manually_created_subnet_ip_ranges).\n\nThe following descriptions detail what happens to resources during the\nconversion. Most resources remain unchanged and refer to the\nVPC subnet instead of the legacy network.\n\nLegacy network\n: The legacy network isn't deleted; it's converted to a VPC\n network. The legacy network's IPv4 range is converted to the primary range of a\n single subnet in a VPC network.\n\nVPC network\n: Google Cloud converts the legacy network to a [custom mode\n VPC network](/vpc/docs/vpc#subnet-ranges) with a single subnet in\n the region where your VM instances are located. The VPC network\n and subnet both have the same name as the original legacy network.\n\nSubnet\n: Google Cloud creates a subnet and its subnet route during the\n conversion. The subnet is created in the region where your VM instances are\n located. Google Cloud automatically converts resources such as VM\n instances, regional forwarding rules, and instance group managers to the subnet.\n The subnet has the same name as the original legacy network.\n If the legacy network didn't contain any resources, Google Cloud doesn't\n create a subnet.\n\nVM instances\n: All instances with a network interface in the converted network will reference\n the newly created subnet.\n\nForwarding rules\n: All internal forwarding rules in the VPC network will reference\n the newly created subnet.\n\nRoutes\n: All custom static routes stay the same when the network is converted to a\n VPC network. If Google Cloud creates a new subnet, it does\n add one system-generated route called a *subnet route* . For more information,\n see [Route types](/vpc/docs/routes#types_of_routes).\n\nFirewall rules\n: All existing firewall rules stay the same when the network is converted to a\n VPC network. All VPC networks also have two\n implied firewall rules that cannot be removed. For more information, see\n [Implied rules](/vpc/docs/firewalls#default_firewall_rules).\n\nInstance group managers and instance templates\n: All instance templates that have a primary network interface (nic0)\n referencing the legacy network will reference the newly created subnet.\n\nVPN tunnels and gateways\n: VPN tunnels and gateways stay the same and continue to function when the\n network is converted to a VPC network.\n\nCloud Router\n: Cloud Routers stay the same and continue to function when the\n network is converted to a VPC network.\n\nLoad balancers\n: Existing load balancers stay the same and continue to function when the\n network is converted to a VPC network.\n\nWhat's next\n-----------\n\n- To migrate, convert, or delete a legacy network, see [Manage legacy networks](/vpc/docs/using-legacy).\n\n- To learn more about Google Cloud VPC networks, see the\n [Virtual Private Cloud (VPC) overview](/vpc/docs/overview).\n\n- To learn how to create and modify VPC networks, see\n [Create and manage VPC networks](/vpc/docs/create-modify-vpc-networks)."]]