您必須指派 CIDR 範圍:無類別跨網域路由 (CIDR) 範圍可讓您代表 IP 位址及其對應的網路,供服務使用。這項服務會使用指派的 CIDR 範圍中的 IP 位址,將磁碟區指派給正確的通訊協定類型 (網路檔案系統 (NFS) 或伺服器訊息區塊 (SMB))。
您必須先設定私有服務存取對等互連,才能建立第一個儲存集區:如果尚未設定對等互連,Google Cloud 控制台中的儲存集區建立程序會偵測到這點,並提示您使用Google Cloud 控制台式工作流程設定對等互連。如果與指定虛擬私有雲的對等互連連線已存在, Google Cloud 主控台工作流程會使用該連線。無論是手動或透過主控台建立對等互連,您都可以選擇手動指定 CIDR,或讓 Google 網路自動選取。 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-10 (世界標準時間)。"],[],[],null,["# Configure networking\n\nThis page describes how to configure networking for Google Cloud NetApp Volumes.\nNetApp Volumes uses [private services access](/vpc/docs/private-services-access)\nto create a high throughput and low-latency data path private connection.\n\nConsiderations\n--------------\n\nConsider the following before you begin to configure networking:\n\n- **You can't share volumes between Virtual Private Cloud (VPC) instances**:\n to share volumes, you need to share a Shared VPC from a host project\n with multiple service projects. Storage pools created on the Shared VPC\n from the service project are accessible to all service projects.\n\n- **VPC private connections only need to be set up once**: the\n private connection must be set up once per VPC. You don't need\n to repeat private connection setup for multiple service projects or regions.\n\n- **You must assign a CIDR range**: Classless Inter-Domain Routing (CIDR)\n ranges let you represent IP addresses and their corresponding networks for the\n service to use. The service uses IP addresses from the assigned CIDR range to\n assign volumes to the correct protocol type\n (Network File System (NFS) or Server Message Block (SMB)).\n\n- **You must set up the private service access peering before creating your first storage pool**:\n if peering isn't already configured, the storage pool creation process in the\n Google Cloud console detects this and prompts you to set up peering using a\n Google Cloud console based workflow. If a peering connection to the specified\n VPC already exists, the Google Cloud console workflow uses it. For\n both manaul and Google Cloud console based peering, you have the option to either\n manually specify a CIDR or have Google networking pick one for you\n automatically.\n\n- **Choose a CIDR range that doesn't collide with on-premise network CIDR ranges**:\n if you plan to use NetApp Volumes from on-premises networks\n through a VPN or Cloud Interconnect, we strongly recommend that you choose a\n CIDR range that doesn't collide with the CIDR ranges used in your on-premise\n network. If you fail to do so, it can cause IP collisions and routing issues.\n\nConfigure private services access\n---------------------------------\n\nYou can choose to set up private service access later using the UI during\n[storage pool creation](/netapp/volumes/docs/get-started/quickstarts/create-storage-pool)\nor do it manually as described in the following instructions. To learn more\nabout private service access, see [configure private services access](/vpc/docs/configure-private-services-access).\n\n1. **Choose a CIDR range** : NetApp Volumes uses\n [RFC 1918](https://www.rfc-editor.org/rfc/rfc1918)\n or privately used public IP (PUPI) address ranges, with the exception of\n `6.0.0.0/8` and `7.0.0.0/8`. PUPI supports NFS or SMB volumes and NFS or\n SMB clients accessing the volumes. When you use PUPI addresses, use the Google Cloud CLI\n commands instead of the Google Cloud console to set up networking.\n\n You can choose to have private services access automatically select an unused\n CIDR range or specify it manually. Manual selection lets you choose a\n specific address range.\n\n Pick a CIDR range that is large enough to accommodate your volumes and pools.\n The minimum CIDR range you can use is `/24`. NetApp Volumes\n consumes subranges out of the assigned CIDR according to the following rule\n set:\n - Storage pools require a minimum of `/28` subrange.\n\n - Standard, Premium, and Extreme service level volumes are able to share a\n single IP address, even if they are in different storage pools. Therefore,\n a large number of volumes and pools can share a single `/28` subrange.\n Depending on the storage pool parameters like CMEK, LDAP, Active Directory\n policy, and more, volumes will consume more IPs.\n\n - Every Flex service level storage pool requires its own IP address\n with all of its volumes using that same IP address. Therefore, you can\n have 12 storage pools in a `/28` subrange since every subnet has four\n [unusable IP addresses](/vpc/docs/subnets#unusable-ip-addresses-in-every-subnet).\n\n - Large capacity volumes (in Preview) in Extreme service level require a\n `/27` subrange to support multiple storage endpoints.\n\n - Volumes in different regions in the same project require additional `/28`\n or `/27` ranges depending on the kind of volumes you deploy.\n\n - Volumes in different service projects in the same Shared VPC\n require individual `/28` or `/27` ranges. Therefore, the minimum\n sized CIDR range of `/24` can accommodate a maximum of 16 region-service\n project combinations.\n\n - If an existing subrange runs out of IPs, additional subranges can be\n consumed, even for identical project, VPC, or region\n combinations.\n\n2. **Enable the Service Networking API** : make sure that you enable the\n `servicenetworking.googleapis.com` API.\n\n [Enable the API](https://console.cloud.google.com/apis/library/servicenetworking.googleapis.com)\n3. **Set up private services access** : use the following instructions to set up\n private services access using [Google Cloud CLI](/sdk/gcloud):\n\n 1. Reserve a static internal IP address range for your CIDR:\n\n ```bash\n gcloud compute addresses create netapp-addresses-production-vpc1 \\\n --project=PROJECT_ID \\\n --global \\\n --purpose=VPC_PEERING \\\n --prefix-length=24 \\\n --network=VPC \\\n --no-user-output-enabled\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the name of the project\n you intend to set up private services access in.\n\n This command chooses the base address for the CIDR automatically. If you\n want to specify a specific base address, include the following line: \n\n ```bash\n --addresses=192.168.0.0 \\\n ```\n\n Replace \u003cvar translate=\"no\"\u003e192.168.0.0\u003c/var\u003e with the base address you\n intend to set up private services access for.\n 2. Run the following command to peer the networks:\n\n ```bash\n gcloud services vpc-peerings connect \\\n --project=PROJECT_ID \\\n --service=netapp.servicenetworking.goog \\\n --ranges=netapp-addresses-production-vpc1,ADDITIONAL_IP_RANGES \\\n --network=VPC\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the name of the project\n you intend to set up private services access in.\n\n You can specify multiple compute address ranges as a comma-separated\n list for the **--ranges** flag. NetApp Volumes use `/28`\n or `/27` subranges from the compute address ranges in an undefined order.\n\n Replace \u003cvar translate=\"no\"\u003eADDITIONAL_IP_RANGES\u003c/var\u003e\n with a comma-separated list of additional address ranges to peer, or\n leave it empty to peer the networks only with the address range created\n in the previous step.\n | **Important:** If peering fails and you receive a `Constraint constraints/compute.restrictVpcPeering violated for project` error, it means your Google Cloud organization policies restrict peering. To resolve this, work with your organization administrator to get an exception.\n 3. Enable custom route propagation. Note that NetApp Volumes\n creates a `sn-netapp-prod` peering when the private connection is set up.\n\n ```bash\n gcloud compute networks peerings update sn-netapp-prod \\\n --project=PROJECT_ID \\\n --network=VPC \\\n --import-custom-routes \\\n --export-custom-routes\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the name of the project\n you intend to set up private services access in.\n\nWhat's next\n-----------\n\nSet up [IAM permissions](/netapp/volumes/docs/get-started/configure-access/iam)."]]