Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

63 VMs per IP address

I am reaching out wrt the following codelab on Private Service Connect

https://codelabs.developers.google.com/cloudnet-psc-ilb#3

Can you help me understand what the following means:

> The Private Service Connect subnet must contain at least one IP address for every 63 consumer VMs so that each consumer VM is allocated 1,024 source tuples for network address translation.

My queries are as follows:

- How did we get these numbers - 63 and 1024.

- Why do we need 1024 source tuples for NAT

- What do we mean by source tuples here

Solved Solved
1 2 356
1 ACCEPTED SOLUTION

Hi @mountaincode2,

Welcome to Google Cloud Community!

Based on this documentations "Port Reservation", this is the sample calculation:

"⌊(1 NAT IP addresses) × (64,512 ports per address) / (4,096 ports per VM)⌋ = 15 VMs"

Here is the exact equation of getting 63 VMs:

"1 (NAT IP addresses) x (64,512 ports per address)  / (1024 ports per VM)⌋ = 63 VMs"

Also, NAT uses a combination of the source IP address and port, called a source tuple, to uniquely identify each incoming connection. This allows NAT to differentiate between connections to different VMs, even though they all share the same public IP address. It reserves 1,024 unique combinations of source IP and port for each VM, allowing for 1,024 simultaneous connections to each destination. See Ports and connections.

 

Hope this helps.

View solution in original post

2 REPLIES 2

Hi @mountaincode2,

Welcome to Google Cloud Community!

Based on this documentations "Port Reservation", this is the sample calculation:

"⌊(1 NAT IP addresses) × (64,512 ports per address) / (4,096 ports per VM)⌋ = 15 VMs"

Here is the exact equation of getting 63 VMs:

"1 (NAT IP addresses) x (64,512 ports per address)  / (1024 ports per VM)⌋ = 63 VMs"

Also, NAT uses a combination of the source IP address and port, called a source tuple, to uniquely identify each incoming connection. This allows NAT to differentiate between connections to different VMs, even though they all share the same public IP address. It reserves 1,024 unique combinations of source IP and port for each VM, allowing for 1,024 simultaneous connections to each destination. See Ports and connections.

 

Hope this helps.

Thank you!