VPC Flashcards
IP Address Planning
Making sure that most stakeholders’ vpc’s are avoided. This can be done by simply asking and confirming ranges
Recommended VPC CIDR Ranges
10.x.y.z where n>16
ie 10.16.0.0/16
Remember google uses 10.128.0.0
Therefore best range would be from
10.16.0.0-10.127.0.0
i.e, 10.16.0.0/20,
10.16.32.0/20,
10.16.48.0/20,
10.16.64.0/20
VPC services run from within subnets and not from the VPC
True
Recommended CIDR Ranges II
Aim for atleast one reserved subnet for growth. Therefore up to about four Subnets.
VPC = /16
Subnets=AZ
16/4 = 4 per subnets
and then each Subnets, 4 Tiers
i.e 4*4 = 16 ranges = /20
Other CidR considerations
target for 4 Tiers in each AZ
VPC Colors
Blue - Private Subnet
Green - Public Subnet
Inter-subnet communication
Inside a VPC, there’s free communication of subnets by default
Recommended Subnet Model
AZ-a
- App Subnet (10.16.16.0/20)
- Web Subnet (10.16.32.0/20)
- Db Subnet (10.16.48.0/20)
Ipv6 01
AZ-b
- App Subnet (10.16.64.0/20)
- Web Subnet (10.16.80.0/20)
- Db Subnet (10.16.96.0/20)
Ipv6 02
AZ-c
- App Subnet (10.16.112.0/20)
- Web Subnet (10.16.128.0/20)
- Db Subnet (10.16.144.0/20)
Ipv6 03
AZ-d
- App Subnet (10.16.160.0/20)
- Web Subnet (10.16.176.0/20)
- Db Subnet (10.16.192.0/20)
Ipv6 04
- Note that there’s a reserved /20 in every AZ
IP Masquerading vs NAT
NAT: one IP to One Public IP
IP Masquerading: One Public IP address to an entire CIDR Block
NAT Gateway Best practice
Natgateway in every AZ (HA), It’s allowed to have more than one NAT Gateway in an AZ, but be noteful of the charges.
NAT is not required in ipv6, ipv6 can be publicly routable directly through the igw
NAT Instance Advantages
- Port Forwarding
- Can be used as Bastion Host
- NAT Instance is cheaper and better for small workloads.
Gateway Endpoint
Can only be accessed from a Single VPC
Gateway Endpoint deployment
Gateway Endpoint is a regional Non-VLC service service. It is not cross-Regional. And cannot be deployed into AZ or subnet. You just configure(in the Endpoint Policy) the subnets and resources that needs to access it. It is by default HA to all Azs
Gateway Endpoint Prefix List
Gateway endpoints add ‘prefix lists’ to route table, allowing the VPC router to direct traffic flow to the public services via the gateway endpoint.
Private Instance and Gateway Endpoint
Gateway endpoint is best with Private Instances, since public Instances can already access S3 and DynamoDB if configured to