EC2 - IP Addresses Flashcards
Overview of how IPs work with Instances
What is a Public IP?
It means that a machine can be identified on the internet
True or False? Two machines can have the same public IP.
False. It must be unique across the whole web.
What is a Private IP?
It means that a machine can only be identified on a private network
True or False? Two machines on the same network can have the same private IP address.
The IP must be unique across the private network. However, two different private networks can have the same IP address.
True or False? Only a specified range of IPs can be used as a private IP.
True
What is an Elastic IP and why would you need it?
It’s a public IPv4 that you own as long as you don’t delete it. It’s used if you need to have a fixed IP for you instance.
Why would the public IP for an instance change?
Because the instance had been stopped and started.
What is the default amount of Elastic IPs available on your account and how many instances can they be assigned to?
You have 5 available by default. You can only attach it to one instance at a time.
Why should you avoid using an Elastic IP, and what are two alternative options?
They often reflect poor architectural decisions.
Alternatives:
- Use a random public IP and register a DNS name to it
- Use a Load Balancer and don’t use a public IP
Why can’t you SSH to an instance using a private IP?
Because you aren’t on the same network (unless you’re using a VPN).