![Pearson VUE Vouchers Exam for AWS Pearson VUE Vouchers Exam for AWS](https://certifsit.com/wp-content/uploads/2024/03/Capture-decran-2024-03-14-a-22.56.27.png)
Lab9a : Create a subnet
Use the following procedure to create subnets for your virtual private cloud (VPC). Depending on the connectivity that you need, you might also need to add gateways and route tables.
Considerations
- You must specify an IPv4 CIDR block for the subnet from the range of your VPC. You can optionally specify an IPv6 CIDR block for a subnet if there is an IPv6 CIDR block associated with the VPC. For more information, see IP addressing for your VPCs and subnets.
- If you create an IPv6-only subnet, be aware of the following. An EC2 instance launched in an IPv6-only subnet receives an IPv6 address but not an IPv4 address. Any instances that you launch into an IPv6-only subnet must be instances built on the Nitro System.
- To create the subnet in a Local Zone or a Wavelength Zone, you must enable the Zone. For more information, see Regions and Zones in the Amazon EC2 User Guide for Linux Instances.
To add a subnet to your VPC
- Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
- In the navigation pane, choose Subnets.
- Choose Create subnet.
- Under VPC ID, choose the VPC for the subnet.
- (Optional) For Subnet name, enter a name for your subnet. Doing so creates a tag with a key of
Name
and the value that you specify. - For Availability Zone, you can choose a Zone for your subnet, or leave the default No Preference to let AWS choose one for you.
- For IPv4 CIDR block, select Manual input to enter an IPv4 CIDR block for your subnet (for example,
10.0.1.0/24
) or select No IPv4 CIDR. If you are using Amazon VPC IP Address Manager (IPAM) to plan, track, and monitor IP addresses for your AWS workloads, when you create a subnet you have the option to allocate a CIDR block from IPAM (IPAM-allocated). For more information on planning VPC IP address space for subnet IP allocations, see Tutorial: Plan VPC IP address space for subnet IP allocations in the Amazon VPC IPAM User Guide. - For IPv6 CIDR block, select Manual input to choose the VPC’s IPv6 CIDR that you want to create a subnet in. This option is available only if the VPC has an associated IPv6 CIDR block. If you are using Amazon VPC IP Address Manager (IPAM) to plan, track, and monitor IP addresses for your AWS workloads, when you create a subnet you have the option to allocate a CIDR block from IPAM (IPAM-allocated). For more information on planning VPC IP address space for subnet IP allocations, see Tutorial: Plan VPC IP address space for subnet IP allocations in the Amazon VPC IPAM User Guide.
- Choose an IPv6 VPC CIDR block.
- For IPv6 subnet CIDR block, choose a CIDR for the subnet that’s equal to or more specific than the VPC CIDR. For example, if the VPC pool CIDR is /50, you can choose a netmask length between /50 to /64 for the subnet. Possible IPv6 netmask lengths are between /44 and /64 in increments of /4.
- Choose Create subnet.
To add a subnet to your VPC using the AWS CLI
Use the create-subnet command.