Attach IPv6 on EC2
On the AWS dashboard, you can see no IPv6 addresses attached for your EC2.
Fig 8. Instance List
Step 1. Go to AWS main dashboard. Select VPC
Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you’ve defined. This virtual network closely resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS.
For more information about VPC refer
Fig 9. VPC
You could see one VPC is running, so select that VPC. It’s a default VPC that attached to our EC2.
Fig 10. VPC
Step 2. Select your VPC >> Actions >> Edit CIDR’s
Step 3. In this window click on Add IPv6 CIDR’s
Fig 11. Edit CIDR
So new IPv6 CIDR’s is associated. Now go back to VPC dashboard.
Step 4. The next part is to edit the subnets.
Go to Subnets, to list all subnets. Enable IPv6 CIDR’s for all subnets
Fig 12. Subnets
Select the subnets >> Subnet actions >> Edit IPv6 CIDR’s >> Add IPV6 CIDR’s
Fig 13. Edit IPv6 CIDR
You can edit the subnet in the 00 field like 00, 01, 02 likewise
So the same for all subnets, I have done for all my three subnets.
Step 5. Edit the Route tables.
A route table contains a set of rules, called routes, that are used to determine where network traffic is directed.
Each subnet in your VPC must be associated with a route table; the table controls the routing for the subnet. A subnet can only be associated with one route table at a time, but you can associate multiple subnets with the same route table.
For more information about AWS Route table refer https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html
In this Route table, you have to edit it to accept IPv6 connection
Fig 14. Route table
Goto Routes >> Edit >> Add another rule >> add ::/0 then target igw-73f83f1b, just same as IPv4
Fig 15: Route tables
Fig 16: Route table
Step 6. Now we can assign an IPv6 address for our EC2.
Go to EC2 Dashboard >> Select your EC2 instance
Click on Actions >> Networking >> Manage IP addresses
You will see a window to assign IPv6 addresses
Fig 17: Manage IP addresses
Click on Assign new IP on the IPv6 addresses >> Yes Update
we got a new IPv6 address
Fig 18: Manage IP addresses
Go to your instance and check EC2
Fig 19: ifconfig result
[root@ip-172-31-44-194 ec2-user]# ping6 2600:1f16:ba0:d101:4fec:5f48:5cac:17ad
PING 2600:1f16:ba0:d101:4fec:5f48:5cac:17ad(2600:1f16:ba0:d101:4fec:5f48:5cac:17ad) 56 data bytes
64 bytes from 2600:1f16:ba0:d101:4fec:5f48:5cac:17ad: icmp_seq=1 ttl=64 time=0.041 ms
64 bytes from 2600:1f16:ba0:d101:4fec:5f48:5cac:17ad: icmp_seq=2 ttl=64 time=0.043 ms
64 bytes from 2600:1f16:ba0:d101:4fec:5f48:5cac:17ad: icmp_seq=3 ttl=64 time=0.043 ms
[root@ip-172-31-44-194 ec2-user]# ping6 www.google.com
PING www.google.com(ord38s09-in-x04.1e100.net) 56 data bytes
64 bytes from ord38s09-in-x04.1e100.net: icmp_seq=1 ttl=44 time=18.9 ms
64 bytes from ord38s09-in-x04.1e100.net: icmp_seq=2 ttl=44 time=18.9 ms
64 bytes from ord38s09-in-x04.1e100.net: icmp_seq=3 ttl=44 time=18.9 ms
You can also test the IPv6 from outside if you have IPv6 network or IPv6 enabled servers.
Another option test IPv6 by an online tool
That’s all. If you want to setup Network ACL’s and Egress only Internet gateway or any other aws related project, feel free to contact xieles support 24/7. Our cloud experts will help you to solve all your all aws related issues.
Xieles Support can help you to setup Network ACL’s and Egress only Internet gateway or any other aws related project. Get a quote from us if you need any assistance.