Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relation between EIP and ENI in AWS/EC2

I'm a new user of AWS/EC2. I'm not sure that how Amazon manage a pair of EIP and ENI.

What I want to do in ec2 is to use a software license which is related to MAC address. So for using this license, I have to keep a same MAC address on EC2.

Actually I've already prepared my EIP, and it looks this EIP is related to specific ENI. So I think that the pair of this EIP and ENI is keeped unless I release this EIP or ENI. Is my understanding right?

like image 341
jef Avatar asked Sep 17 '25 16:09

jef


1 Answers

No, EIP (Elastic IP address) can be assigned to any ENI on that instance, and it can be released and assigned to another ec2 instance or ENI as well.

For Elastic Network Interfaces (ENI), the best explanation is from AWS:

An elastic network interface (ENI) is a virtual network interface that you can attach to an instance in a VPC. An ENI can include the following attributes:

  1. A primary private IP address.
  2. One or more secondary private IP addresses.
  3. One Elastic IP address per private IP address.
  4. One public IP address, which can be auto-assigned to the elastic network interface for eth0 when you launch an instance, but only when you create an elastic network interface for eth0 instead of using an existing network interface.
  5. One or more security groups.
  6. A MAC address.
  7. A source/destination check flag.
  8. A description.

Refer:

Elastic Network Interfaces (ENI)

like image 145
BMW Avatar answered Sep 19 '25 07:09

BMW