Subnet
Subnets
are tied to specificAZ
- Multiple
Subnets
can be provisioned in oneAZ
- One
Subnet
can not be provisioned inmulti-AZ
- Two types of
Subnets
Public Subnet
use to putLoad balancer
Private Subnet
use to putApplications
andDB Servers
- Every time create a
Subnet
, loose 5IP
address. - First 4 and the last one
- First one for
Network Address
- Second one for
VPC Router
, reserved by AWS - Third one for
AWS Provided DNS
, reserved by AWS - Fourth one for future use, reserved by AWS
- Last one for
Broadcast Address
, although AWS does not supportBroadcast
- Exercise
- Can
/27
handle 29IP Address
?- It has
2^(32-27)
= 32IP Address
- Since 5 IP address is not usable, we can use
32-5
= 27IP Address
- So
/27
can not handle more than 27IP Address
- To handle 29
IP Address
we might need at least/26
i.e.2^(32-26)
= 64IP Address
- In this case we can use
64-5
= 59IP Address
, that matches the requirements
- It has
- We can enable
Auto Assign Public IPv4 Address
features, so any instance being created within the subnet, will have a public IP. - In
Custom VPC
, the featureAuto Assign Public IPv4 Address
isdisabled
by default, whereas inDefault VPC
it isenabled
by default. - To ensure the
Public Subnet
can access thePrivate Subnet
, need to ensure, theSG
have the required rules defined to allow traffic - Since
internet
andintranet
is corresponding to separate AZ, need separate AZ for them