Create a subnet with IPv6
Hello Everyone
Welcome to CloudAffaire and this is Debjeet
In the last blog post, we have created a NAT gateway for an outbound only internet connection to a private subnet.
https://cloudaffaire.com/create-a-nat-gateway/
In this blog post, we are going to a new subnet with IPv4 and IPv6 CIDR block and will also create a new EC2 instance with IPv6 address.
Create a subnet with IPv6:
Step 1: Login to AWS console and navigate to ‘VPC’.
Step 2: Navigate to ‘Your VPCs’ and from ‘Actions’ click ‘Edit CIDRs’.
Note: In order to allocate an IPv6 CIDR block to your subnet, you need to add IPv6 CIDR block in your VPC first.
Step 3: Click ‘Add IPv6 CIDR’.
AWS will automatically allocate IPv6 CIDR block to your VPC. Click ‘Close’.
Your VPC now support IPv6 addressing
Next, we are going to create a new subnet with IPv6 CIDR block.
Step 4: Navigate to ‘Subnets’ and click ‘Create subnet’.
Step 5: Provide name, VPC, IPv4 and IPv6 CIDR for your subnet and click ‘Create’.
Note: IPv4 CIDR block is mandatory for VPC and subnet and you cannot create an IPv6 only subnet.
One success message will be displayed, click ‘Close’.
A new subnet with IPv4 and IPv6 CIDR block successfully created.
Next, we are going to enable Auto to assign IPv6 for this subnet.
Step 6: Select the subnet and from ‘Actions’ click ‘Modify auto-assign IP settings’.
Step 7: Check ‘Enable auto-assign IPv6 address’ and click ‘Save’.
Next, create an EC2 instance and place it inside this new subnet.
Note: IPv6 address has been allocated to your instance along with IPv4 private IP address.
IPv6 address is public address by default and can be accessed from anywhere in the world. But in order to access IPv6 address, you need your own IPv6 address in your host system. Unfortunately, our ISP doesn’t support IPv6 yet. Hence we will test the IPv6 address connectivity form an online site. http://www.ipv6now.com.au/pingme.php
Step 8: Open the above link in your browser. Provide your IPv6 address in the box and click ‘Ping now’.
Observe: Though IPv6 is publicly accessible anywhere from the world. But we are unable to ping our IPv6 address. We need to configure some additional setting in order to connect to the IPv6 address in AWS.
Cleanup: Delete your EC2 instance and VPC.
Note: We will use this same VPC for the next couple of blogs. If you wish to follow, then do not delete the VPC.
Hope you have enjoyed this blog post. In the next blog post, we are going to enable internet connection for IPv6 address.
To get more details on VPC, please refer below AWS documentation
https://docs.aws.amazon.com/vpc/index.html