Networking interview question · Most asked

What makes a subnet public or private in AWS?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

Its route table: a public subnet's default route (0.0.0.0/0) points to an internet gateway, a private subnet's to a NAT gateway or nowhere. Resources in a public subnet also need a public IP to be reachable from the internet.

Longer Answer

Both use private address ranges; there's no 'public CIDR'. Azure has no public subnet concept: inbound comes via public load balancers or public IPs on resources, outbound via NAT gateway or default outbound access (being retired). In Google Cloud, VMs without external IPs use Cloud NAT.

Key Points

  • The default route decides.
  • Public IPs needed for inbound.
  • Same private ranges for both.
  • Azure/GCP model it differently.

Deep dive: Networking Tutorial: Public and Private Subnets

Explanation

What interviewers look for

Precision about route tables rather than vague answers.

More most-asked Networking questions

← All Networking questions

Was this page helpful?