EC2 - IP Addresses Flashcards

Overview of how IPs work with Instances

1
Q

What is a Public IP?

A

It means that a machine can be identified on the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False? Two machines can have the same public IP.

A

False. It must be unique across the whole web.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Private IP?

A

It means that a machine can only be identified on a private network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

True or False? Two machines on the same network can have the same private IP address.

A

The IP must be unique across the private network. However, two different private networks can have the same IP address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

True or False? Only a specified range of IPs can be used as a private IP.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an Elastic IP and why would you need it?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why would the public IP for an instance change?

A

Because the instance had been stopped and started.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the default amount of Elastic IPs available on your account and how many instances can they be assigned to?

A

You have 5 available by default. You can only attach it to one instance at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why should you avoid using an Elastic IP, and what are two alternative options?

A

They often reflect poor architectural decisions.

Alternatives:

  1. Use a random public IP and register a DNS name to it
  2. Use a Load Balancer and don’t use a public IP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why can’t you SSH to an instance using a private IP?

A

Because you aren’t on the same network (unless you’re using a VPN).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly