EC2 Network interfaces, instance IPs and DNS Flashcards

1
Q

how many ENIs does an EC2 instance have?

A

It starts with 1 ENI

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

Can EC2 instances have more than one ENI?

A

Yes, they can have more than one ENI in separate subnets, but everything must be within one AZ.

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

When you launch an instance with Security Groups, where are they allocated?

A

To the ENI, not to the instance.

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

Enumerate some ENI properties

A
  • Mac address
  • Primary IPv4
  • 0 or more secondary private IP addresses
  • 0 or 1 public IPv4
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can the private IP of an instance change?

A

No, it will be static and not change for the lifetime of the instance

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

What is given with the private IP?

A

A private DNS name

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

How many private IPs can an instance have associated?

A

0 or more

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

How many public IPs can an instance have associated?

A

0 or 1

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

What is given with the public IP?

A

A public DNS name

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

Can the public IP of an instance change?

A

This is a dynamic IP that is not fixed

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

In which cases will the public IP be removed from the instance?

A

If you stop an instance. When you start up again, it is given a brand new IPv4 address.

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

What happens to the public IP when you restart the instance?

A

The public IP will not change.

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

Changing between EC2 hosts will…

A

Change the public IP of the instance.

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

What is the public DNS name resolved into?

A

The Public DNS name will resolve to the primary public IPv4 address of the instance

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

What is the private DNS name resolved into?

A

The Public DNS name will resolve to the primary private IPv4 address of the instance

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

What happens if you are using a public IPv4 and assign an elastic IP?

A

The original IPv4 address will be lost. There is no way to recover the original address.

17
Q

How many IPv6 IPs can you assign to an ENI interface?

A

0 or more

18
Q

What are security groups applied to?

A

Network interfaces

19
Q

What would you do if you want multiple IPs in an instance to be impacted by different security groups?

A

you need to make multiple interfaces and apply different security groups to those interfaces

20
Q

Define what are source and destination checks:

A

It is a check that discards traffic in the ENI interface when it does not come and go from/to the addresses associated with the EC2 instance.

21
Q

What do you need to do in regards to the destination/source checks to use and EC2 instance as a NAT instance?

A

Disable the source/destination checks.

22
Q

What is the only difference between primary and secondary interfaces?

A

Secondary interfaces function in all the same ways as primary interfaces except you can detach secondaty interfaces and move them to other EC2 instances.

23
Q

What is a common use of ENIs related to licensing?

A
  • Legacy software is licensed using a mac address. If you provision a secondary ENI to a specific license, you can move around the license to different EC2 instances.
24
Q

Does the OS see the public IPv4?

A

No. This is handled by the NAT, transparent for the OS.

25
Q

What can you do to avoid losing the public (dynamic) IPv4 when stopping and starting the instance?

A

you need to asign an elastic IP address