The Elastic Network Interface (ENI) is a virtual interface. Any instance when created comes with its default NI attached to it (eth0). Additional ENIs can be created and attached to an instance or can be detached from it. The number of ENIs that can be attached to an EC2 instance depends on its type. An ENI may have the following properties:
- One primary and multiple secondary IPv4 addresses and optionally, one public or Elastic (fixed) IPv4 IP
- One or more IPv6 addresses if supported by the instance type and network
- One MAC address
- Additional properties such as SG, source destination check, and so on.
This recipe is similar to creating a NAT instance that we learnt in Chapter 1, Getting Started with AWS Networking Components. In that case, we attached an Elastic IP to one instance. Here, we shall learn how to create an ENI and attach...