# Demystifying AWS EC2 Network Interface Cards
Published: 2023-09-18 08:02:41


## Introduction

Amazon Web Services (AWS) offers a wide range of services to meet the diverse needs of its users. Amazon Elastic Compute Cloud (EC2) instances are a fundamental component of AWS, serving as virtual servers that can be customized to suit various workloads. When working with EC2 instances, it's crucial to understand the different types of Network Interface Cards (NICs) available, as they play a pivotal role in networking and communication within the AWS cloud environment. In this article, we'll explore the three primary types of NICs used in AWS EC2 instances: Elastic Network Interface (ENI), Elastic Network Adapter (ENA), Elastic Fabric Adapter (EFA), and the Elastic Network (EN).

### 1. Elastic Network Interface (ENI)

Elastic Network Interfaces (ENIs) are fundamental to AWS networking. Each EC2 instance can have one or more ENIs attached to it. ENIs serve as virtual network cards, allowing instances to communicate with other AWS resources and the internet. They come with a set of attributes, such as a private IP address, a MAC address, and security group rules, which enable fine-grained control over network traffic.


**Key Features of ENI:**
- ENIs are used for basic networking functionality within EC2 instances.
- They support both IPv4 and IPv6 addresses.
- ENIs can be moved between instances within the same Availability Zone (AZ).
- They are essential for creating High Availability (HA) architectures and multi-tier applications.

### 2. Elastic Network Adapter (ENA)

Elastic Network Adapters (ENAs) are hardware-accelerated NICs designed for enhanced network performance in AWS EC2 instances. ENAs are optimized for modern networking protocols and support features like jumbo frames and increased packet per second (PPS) performance. They are particularly beneficial for workloads that require high network throughput, such as big data processing and high-performance computing.

**Key Features of ENA:**
- ENAs offer significantly improved network performance over standard ENIs.
- They support features like Enhanced Networking, which allows for higher PPS and lower latency.
- ENAs are required for specific instance types, and they are automatically enabled when using these instances.

### 3. Elastic Fabric Adapter (EFA)

Elastic Fabric Adapters (EFAs) are specialized NICs designed for high-performance computing (HPC) workloads, machine learning, and other demanding applications. EFAs provide low-latency, high-bandwidth communication between instances within a Placement Group, allowing for tight coupling and efficient data transfer.

**Key Features of EFA:**
- EFAs deliver the lowest network latency and highest bandwidth performance among AWS NICs.
- They are specifically designed for HPC and ML workloads.
- EFAs require instances that support them and a Placement Group configuration for optimal performance.

### 4. Elastic Network (EN)

The Elastic Network (EN) is a virtual networking service introduced by AWS. It is not a traditional NIC like ENI, ENA, or EFA. Instead, EN is a managed, global network that connects VPCs and on-premises data centers. It provides advanced networking features such as Global Accelerator, Transit Gateway, and Direct Connect.

**Key Features of EN:**
- EN enables global networking and connects multiple VPCs and on-premises environments.
- It offers features like low-latency global load balancing through Global Accelerator.
- EN simplifies the network architecture and improves connectivity across different regions.

## Differences Between ENI, ENA, EFA, and EN:

1. **Use Cases:**
   - ENI: General-purpose networking within EC2 instances.
   - ENA: Enhanced networking for improved performance in various workloads.
   - EFA: High-performance networking for HPC and ML applications.
   - EN: Global networking for connecting VPCs and on-premises environments.

2. **Performance:**
   - ENI: Basic networking performance.
   - ENA: Enhanced performance with support for modern networking protocols.
   - EFA: Highest performance with low-latency, high bandwidth.
   - EN: Provides advanced networking features rather than direct instance networking.

3. **Instance Compatibility:**
   - ENI: Compatible with most EC2 instances.
   - ENA: Requires specific ENA-enabled instance types.
   - EFA: Requires specific EFA-enabled instance types and Placement Groups.
   - EN: Not tied to specific instances, used for global networking.



*[reference: https://varunmanik1.medium.com/aws-eni-vs-en-vs-efa-22250513590f ]*