Score:1

GCP - why cloud NAT needs cloud router?

ng flag
mon

Why GCP Cloud NAT needs BGP/Cloud Router?

enter image description here

Cloud Router documentation

Cloud Router enables you to dynamically exchange routes between your Virtual Private Cloud (VPC) and on-premises networks by using Border Gateway Protocol (BGP)

Cloud NAT overview

You configure a NAT gateway on a Cloud Router, which provides the control plane for NAT, holding configuration parameters that you specify.

Each Cloud NAT gateway is associated with a single VPC network, region, and Cloud Router.

In my understanding, NAT maps between private address/port to public ip/port, and forward the mapped packet to the Internet Gateway (to get out to the Internet). Where and why does BGP (Cloud Router) come into play in this picture?

Michael Hampton avatar
cz flag
Because NAT is something that a router does, not just on GCP, but everywhere.
mon avatar
ng flag
mon
@MichaelHampton, thanks for the comment but I am not sure. I believe BGP is to exchange information among AS. Why an internal NAT in a VPC needs the BGP routing information to just forward masqueraded packets to IGW via NAT from VM instances in the VPC? In a home computer Linux, we can setup NAT but I believe we do not have to look after BGP. In another word, without BGP, NAT cannot function?
Michael Hampton avatar
cz flag
NAT and BGP have nothing to do with each other.
mon avatar
ng flag
mon
@MichaelHampton, ... then why GCP Cloud NAT needs GCP Cloud Router which offers BGP?
Score:0
cn flag

There is a structural difference between typical NAT and Google Cloud NAT. Typical NATs use NAT proxy instances between cloud instances and their destination, but in Google Cloud NAT, there’s no proxy, rather, it uses software defined networking where a unique set of NAT IPs and port-ranges are assigned to each of the internal instances. Cloud Router is used as the abstraction to which the NAT configuration is attached. Note that it does not require BGP configuration when being used to support Cloud NAT. Also, Cloud NAT does not use ASN information. Cloud NAT gateways can be connected to Cloud Routers that have any ASN or that have no ASN at all.
Check here for more information.

Score:0
pk flag

Cloud NAT uses Cloud Router only to group NAT configuration information (control plane). Cloud NAT does not direct a Cloud Router to use BGP or to add routes. NAT traffic does not pass through a Cloud Router (data plane).

https://cloud.google.com/nat/docs/set-up-network-address-translation

Score:0
in flag

It is because Cloud Router provides the control plane for NAT and holds the configuration parameters that you specify.

It is clearly mentioned here.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.