Okay, so the next step is
to add subnets into our VPC.
So we're going to create two subnets.
One will be a public subnet,
and one will be a private subnet.
Now this is going to be within the one availability zone,
and we'll see what makes a subnet public
or a subnet private.
So let's have a look just first at what subnets are.
So a subnet is going to be, again,
a sub-range of IPv4 addresses within your VPC.
And it turns out that's in this range,
AWS will reserved the five IP addresses in it.
So, the first four IP addresses and the last one is reserved
in each subnet.
These IP addresses are not available for use,
and they cannot be assigned as an IP to an EC2 instance.
So for example,
if you have a CIDR block 10.0.0.0/24,
then you're going to have a few reserved IP addresses.
Such as, well, the first one,
which is network address,
the second one,
so .1, which is reserved AWS for the VPC router,
the .2, which is reserved by AWS for mapping
to Amazon provided DNS,
and this is very important,
.3, which is not used yet,
but is reserved for future use.
And we have .255, which is a network broadcast address.
But because AWS does not support broadcast in a VPC,
this address is reserved and cannot be used, okay?
So as an Exam Tip,
if you need 29 IG IP addresses in a sub-net
for EC2 instances,
then you can not choose a subnet of /27
because this is 32 IP addresses, right, in this /27.
But if you remove the five that are reserved IP addresses,
you're going to get 27 addresses,
which are less than the number 29 that we need.
So we need to choose a subnet size of /26
because this gives us 64 IP addresses in that subnet.
And then if you remove the five reserved IP addresses
with sub-59 IP addresses,
which is greater than the 29 we needed, okay?
So, I will see you in the next lecture
to create our first subnets.