total cost for running the gateway=hourly cost for the NAT gateway+cost per GiB of data that is processed by the gateway+hourly cost for the external IP addresses used by the gateway+data transfer costs for any traffic leaving the network
价格示例
下表显示了使用外部 IP 地址为不同数量的虚拟机实例提供服务的单个 NAT 网关的每月估算成本。在这两种场景下,网关在一个结算周期内均运行 720 小时。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],[],[],[],null,["# Pricing\n\nCloud NAT pricing\n=================\n\nCloud NAT pricing is based on the following usage:\n\n- An *hourly price for the NAT gateway* that is based on the number\n of VM instances that are using the gateway. The per-hour rate is capped at\n 32 VM instances. Gateways that are serving instances beyond the maximum\n number are charged at the maximum per-hour rate.\n\n Google Cloud counts VM instances that get a NAT assignment\n as using the gateway. The NAT gateway performs source NAT (SNAT) for data transfer traffic from\n resources that don't have external IP addresses, and destination NAT (DNAT) for ingress packets that\n arrive as responses to outbound packets.\n- A *per-GiB cost for data transfer that is processed by the\n gateway* . The data processing price is the same across all regions.\n [Data transfer costs](/vpc/network-pricing#internet_egress) to send\n traffic from the VM out of the network also apply.\n\n- An *hourly price for each static or ephemeral external IP address* that is used by a NAT gateway.\n\n**\\*\\*** Applicable to only Public NAT\n\n\n| **Note:** To view your current NAT IP address usage, use the [`gcloud compute routers\n| get-nat-ip-info` command](/sdk/gcloud/reference/compute/routers/get-nat-ip-info).\n\n\u003cbr /\u003e\n\nIf you pay in a currency other than USD, the prices listed in your currency on [Cloud Platform SKUs](https://cloud.google.com/skus/) apply.\n\nThe total cost for running a NAT gateway and running traffic through it is as\nfollows: \n\n```\ntotal cost for running the gateway = hourly cost for the NAT gateway\n+ cost per GiB of data that is processed by the gateway\n+ hourly cost for the external IP addresses used by the gateway\n+ data transfer costs for any traffic leaving the network\n```\n\n### Pricing example\n\nThe following table shows the estimated monthly cost for a single NAT gateway that uses external\nIP addresses to serve a different number of VM instances. For both cases, the gateway\nruns for 720 hours in a billing cycle.\n\n### Logging pricing\n\nNAT logging pricing is described in\n[Network Telemetry pricing](/vpc/network-pricing#network-telemetry).\n\nStandard pricing for Cloud Logging, BigQuery, or Pub/Sub apply.\n\nWhat's next\n-----------\n\n- Read the [Cloud NAT documentation](/nat/docs).\n- Try the [Pricing calculator](/products/calculator).\n- Learn about [Cloud NAT solutions and use cases](/architecture?text=Cloud NAT).\n\n#### Request a custom quote\n\nWith Google Cloud's pay-as-you-go pricing, you only pay for the services you use. Connect with our sales team to get a custom quote for your organization.\n[Contact sales](/contact?direct=true)"]]