Assigning multiple IPs to an instance and ENI

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 1Getting Started ...

Get AWS Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.