IP addressing
When an EC2 instance is launched, it carries an IP address and IPv4 DNS hostname. The IP address and DNS hostname vary depending on whether the instance is launched in an EC2-Classic platform or a VPC. When an instance is launched in Amazon VPC, it supports both IPv4 and IPv6 addresses. An EC2-Classic platform supports only IPv4, it does not support IPv6.
By default, Amazon uses IPv4 addressing for the instance and VPC CIDR. This is the default behavior of EC2 instances and VPC. Alternatively, a user can assign IPv6 addressing protocol to VPCs and subnets that would subsequently allow you to assign IPv6 addresses to instances in a VPC.
Private IPs
As we have seen in earlier sections, a private IP address cannot be reached over the internet. Private IP addresses can be used for communication between the instances within the same network. When an instance is launched, Amazon uses Dynamic Host Configuration Protocol (DHCP) to assign a private IP address to the instance. Apart from...