Amazon Elastic Compute Cloud Developer Guide Private (RFC 1918) Addresses Instance Addressing There are two kinds of IP addresses and DNS names associated with Amazon EC2 instances. Each instance is assigned a private (RFC1918) address which is allocated by DHCP. This is the only address the operating system knows about. This is the address that should be used when communicating between Amazon EC2 instances. This address is not reachable from the Internet. Additionally, Amazon EC2 also provides a public (Internet routable) address for each instance using Network Address Translation (NAT). This is the address that must be used from outside the Amazon EC2 network (i.e. the Internet). Amazon EC2 also provides an internal DNS name and a public DNS name which map to the private and public IP addresses, respectively. The internal DNS name is only resolvable from within Amazon EC2. The public DNS name resolves to the public IP address from outside of Amazon EC2, and, currently, resolves to the private IP address from with Amazon EC2. Private (RFC 1918) Addresses All Amazon EC2 instances are allocated a private address by DHCP. These addresses come from a range defined in "RFC 1918 - Address Allocation for Private Internets". These addresses are routable only within Amazon EC2 and are used for communication between instances. This private address is associated exclusively with the instance for its lifetime. It is returned to Amazon EC2 when the instance terminates. You should always use the internal address when you know you are communicating between Amazon EC2 instances. Using this address assures that your network traffic follows the highest bandwidth, lowest cost, and lowest latency path through our network. From your instance, you can determine your private IP address by asking the operating system: PROMPT> ifconfig eth0 or by referring to the instance data: PROMPT> curl http://169.254.169.254/latest/meta-data/local-ipv4 Internal DNS Name Each instance is given an internal DNS name. This name is of the form domU-12-31-35-00-35-F3.z-2.compute-1.internal. It will resolve to the private IP address described above when resolved from within Amazon EC2 and will not resolve outside of Amazon EC2. Public Addresses At launch time, a public address is also associated with each Amazon EC2 instance using Network Address Translation (NAT). See "RFC 1631: The IP Network Address Translator (NAT)" for more information on NAT. This public address is associated exclusively with the instance for its lifetime. It is returned to Amazon EC2 when the instance terminates. You must use this public address to access your instance from outside of Amazon EC2 and you should distribute this address to clients (most likely through a DNS name that maps to it). Note Amazon EC2 instances cannot currently access other instances through their public NAT API Version 2007-03-01 31
The new reader is still in beta!
Powered by Tizra® Publisher | Terms of Service | Privacy | Contact Us