EC2 Network Features
EC2 Network covers a lot of features for low latency access, High Performance Computing, Enhanced Networking, ENA Express, Elastic Fabric Adapter, etc.
📌 Key Updates (2024-2026):
- EC2-Classic fully retired (August 2023) – All instances now run in VPC only
- Public IPv4 address charges – $0.005/IP/hour for ALL public IPv4 addresses (February 2024)
- ENA Express – Up to 25 Gbps single-flow bandwidth using SRD protocol, now supports cross-AZ traffic (2026)
- Network bandwidth – Up to 600 Gbps with C8gn/R8gn instances (6th gen Nitro Cards)
- Jumbo frames – Cross-region VPC peering now supports up to 8500 bytes MTU (March 2025)
- Instance Bandwidth Weighting – Adjust VPC/EBS bandwidth split by up to 25% (December 2024)
EC2 and VPC
- All EC2 instances run exclusively within a VPC
- EC2-Classic was fully retired in August 2023. All instances must be launched in a VPC.
- Launching an EC2 instance within a VPC provides the following benefits
- Assign static private IP addresses to instances that persist across starts and stops
- Assign multiple IP addresses to the instances
- Define network interfaces, and attach one or more network interfaces to the instances
- Change security group membership for the instances while they’re running
- Control the outbound traffic from the instances (egress filtering) in addition to controlling the inbound traffic to them (ingress filtering)
- Add an additional layer of access control to the instances in the form of network access control lists (ACL)
- Run the instances on single-tenant dedicated hardware
- Launch instances in IPv6-only, dual-stack, or IPv4-only subnets
EC2 Instance IP Addressing
- Private IP address & Internal DNS Hostnames
- Private IP address is the IP address that’s not reachable over the internet and can be resolved only within the network
- When an instance is launched, the default network interface
eth0 is assigned a private IP address and an internal DNS hostname, which resolves to the private IP address and can be used for communication between the instances in the same network only
- Private IP address and DNS hostname cannot be resolved outside the network that the instance is in.
- Private IP address behaviour
- remains associated with the instance when it is stopped or rebooted
- is disassociated only when the instance is terminated
- An instance when launched can be assigned a private IP address or EC2 will automatically assign an IP address to the instance within the address range of the subnet
- Additional private IP addresses, known as secondary private IP addresses can also be assigned. Unlike primary private IP addresses, secondary private IP addresses can be reassigned from one instance to another.
- Public IP address and External DNS hostnames
- A public IP address is reachable from the Internet
- Each instance assigned a public IP address is also given an External DNS hostname.
- External DNS hostname resolves to the public IP address outside the network and to the private IP address within the network.
- Public IP address is associated with the primary Private IP address through NAT
- Within a VPC, an instance may or may not be assigned a public IP address depending upon the subnet Assign Public IP attribute
- Public IP address assigned to the pool is from the public IP address pool and is assigned to the instance, and not to the AWS account. It cannot be reused once disassociated and is released back to the pool
- Public IP address behaviour
- cannot be manually associated or disassociated with an instance
- is released when an instance is stopped or terminated.
- a new public IP address is assigned when a stopped instance is started
- is released when an instance is assigned an Elastic IP address
- is not assigned if there is more than one network interface attached to the instance
- As of February 2024, all public IPv4 addresses incur a charge of $0.005 per IP per hour, whether attached to a service or not. This applies to both auto-assigned public IPs and Elastic IPs.
- IPv6 Addresses
- IPv6 addresses are globally unique and reachable over the Internet
- An instance can be launched in an IPv6-only subnet (Nitro-based instances only), dual-stack subnet, or IPv4-only subnet
- IPv6 addresses persist when an instance is stopped and started
- IPv6 addresses are not charged, making them a cost-effective alternative to public IPv4
- Multiple Private IP addresses
- Multiple private IP addresses can be specified to the instances.
- This can be useful in the following cases
- Host multiple websites on a single server by using multiple SSL certificates on a single server and associating each certificate with a specific IP address.
- Operate network appliances, such as firewalls or load balancers, that have multiple private IP addresses for each network interface.
- Redirect internal traffic to a standby instance in case the instance fails, by reassigning the secondary private IP address to the standby instance.
- Multiple IP addresses work with Network Interfaces
- Secondary IP address can be assigned to any network interface, which can be attached or detached from an instance
- Secondary IP address must be assigned from the CIDR block range of the subnet for the network interface
- Security groups apply to network interfaces and not to IP addresses
- Secondary private IP addresses that are assigned to ENIs attached to running or stopped instances.
- Secondary private IP addresses that are assigned to a network interface can be reassigned to another one if you explicitly allow it.
- Primary private IP addresses, secondary private IP addresses, and any associated Elastic IP addresses remain with the network interface when it is detached from an instance or attached to another instance.
- Although the primary network interface cannot be moved from an instance, the secondary private IP address of the primary network interface can be reassigned to another network interface.
- IP Prefix Delegation
- Instead of assigning individual secondary IP addresses, you can assign IP address prefixes to network interfaces
- IPv4 prefixes: /28 (16 IP addresses) can be assigned per prefix
- IPv6 prefixes: /80 can be assigned per prefix
- Significantly increases the number of IP addresses available per ENI
- Particularly useful for container workloads (e.g., Amazon EKS with VPC CNI plugin) to increase pod density per node
- Can be auto-assigned or manually specified when creating or modifying a network interface
Elastic IP Addresses
- An Elastic IP address is a static IPv4 address designed for dynamic cloud computing.
- An elastic IP address can help mask the failure of an instance or software by rapidly remapping the address to another instance in the account.
- The elastic IP address is associated with the AWS account and it remains associated with the account until released explicitly
- An elastic IP address is NOT associated with a particular instance
- An instance launched in a non-default VPC is assigned only a private IP address unless a public address is specifically requested or the subnet public IP attribute is enabled
- When an Elastic IP address is assigned to an instance, the public IP address is disassociated with the instance
- For an instance, without a public IP address, to communicate to the internet it must be assigned an Elastic IP address
- When the Elastic IP address is dissociated the public IP address is assigned back to the instance. However, if a secondary network interface is attached to the instance, the public IP address is not automatically assigned
- Elastic IP Address Pricing (Updated February 2024)
- All public IPv4 addresses (including EIPs) are now charged at $0.005 per IP per hour (~$3.60/month), whether in-use or idle
- This replaces the previous model where only unused EIPs were charged
- AWS Free Tier includes 750 hours of public IPv4 address usage per month for the first 12 months
- You are NOT charged for IP addresses you own and bring to AWS using BYOIP (Bring Your Own IP)
- Consider migrating to IPv6 to reduce costs
- All AWS accounts are limited to 5 EIPs per Region (soft limit, can request increase)
- Elastic IP supports tagging for cost allocation and organization
Elastic Network Interfaces (ENI)
- Elastic Network Interfaces (ENIs) are virtual network interfaces that can be attached to instances running in a VPC
- ENI consists of the following
- A primary private IPv4 address
- One or more secondary private IPv4 addresses
- One Elastic IP address per private IPv4 address
- One public IPv4 address, which can be auto-assigned to the elastic network interface for
eth0 when an instance is launched
- One or more IPv6 addresses
- One or more security groups
- A MAC address
- A source/destination check flag
- A description
- IPv4 prefixes (/28) and IPv6 prefixes (/80) for prefix delegation
- ENI can be created without being attached to an instance
- ENI can be attached to an instance, detached from that instance and attached to another instance. Attributes of an ENI like elastic IP address, private IP address follow the ENI and when moved from one instance to another instance, all traffic to the ENI will be routed to the new instance.
- An instance in VPC always has a default primary ENI attached (eth0) with a private IP address assigned from the VPC range and cannot be detached
- Additional ENI (eth1-ethn) can be attached to the instance and the number varies depending upon the instance type
- Most important difference between eth0 and eth1 is that eth0 cannot be dynamically attached or detached from a running instance.
- Primary ENIs (eth0) are created automatically when an EC2 instance is launched and are also deleted automatically when the instance is terminated unless the administrator has changed a property of the ENI to keep it alive afterwards.
- Multiple elastic network interfaces are useful for use cases:
- Create a management network
- Primary ENI eth0 handles backend with more restrictive control
- Secondary ENI eth1 handles the public facing traffic
- Licensing authentication
- Fixed MAC address associated with a license authentication
- Use network and security appliances in your VPC
- configure a third-party network and security appliances (load balancers, NAT, proxy) with the secondary ENI
- Create dual-homed instances with workloads/roles on distinct subnets.
- Create a low-budget, high-availability solution
- If one of the instances serving a particular function fails, its elastic network interface can be attached to a replacement or hot standby instance pre-configured for the same role in order to rapidly recover the service
- As the interface maintains its private IP, EIP, and MAC address, network traffic will begin flowing to the standby instance as soon as it is attached to the replacement instance
- ENI Best Practices
- ENI can be attached to an instance when it’s running (hot attach), when it’s stopped (warm attach), or when the instance is being launched (cold attach).
- Primary (eth0) interface can’t be detached
- Secondary (ethN) ENI can be detached when the instance is running or stopped.
- ENI in one subnet can be attached to an instance in another subnet, but the same AZ and same VPC
- When launching an instance from the CLI or API, both the primary (eth0) and additional elastic network interfaces can be specified
- Launching an Amazon Linux or Microsoft Windows Server instance with multiple network interfaces automatically configures interfaces, private IP addresses, and route tables on the operating system of the instance.
- A warm or hot attach of an additional ENI may require bringing up the second interface manually, configure the private IP address, and modify the route table accordingly.
- Instances running Amazon Linux or Microsoft Windows Server automatically recognize the warm or hot attach and configure themselves.
- Attaching another ENI to an instance is not a method to increase or double the network bandwidth to or from the dual-homed instance.
- ENA Queue Allocation (2025) – EC2 now supports flexible ENA queue allocation per ENI, enabling efficient load-balancing of network traffic across available queues on each network interface.
- EC2 Placement groups determine how the instances are placed on the underlying hardware.
- AWS provides three types of placement groups
- Cluster – clusters instances into a low-latency group in a single AZ
- Partition – spreads instances across logical partitions, ensuring that instances in one partition do not share underlying hardware with instances in other partitions
- Spread – strictly places a small group of instances across distinct underlying hardware to reduce correlated failures
- On-Demand Capacity Reservations in Cluster Placement Groups (2025)
- CPG-ODCRs provide assured capacity with low latency and high throughput within a Cluster Placement Group
- Supports sharing and targeting capabilities for cross-account usage
- Can be scheduled up to 120 days in advance with future-dated capacity reservations
Network Maximum Transmission Unit – MTU
- MTU of a network connection is the size, in bytes, of the largest permissible packet that can be transferred over the connection.
- The larger the MTU of the connection the more the data can be transferred in a single packet
- Largest ethernet packet size supported over most of the internet is 1500 MTU
- Jumbo Frames
- Jumbo frames are Ethernet frames that allow more than 1500 bytes of data by increasing the payload size per packet and thus increasing the percentage of the packet that is not packet overhead.
- Fewer packets are needed to send the same amount of usable data
- Jumbo frames should be used with caution for Internet-bound traffic or any traffic that leaves a VPC.
- Packets are fragmented by intermediate systems, which slows down this traffic.
- Maximum supported MTU for an instance depends on its instance type
- All EC2 instance types support 1500 MTU, and many current instance sizes support 9001 MTU or Jumbo frames
- Traffic is limited to a maximum MTU of 1500 in the following cases:
- Traffic over VPN connections
- Traffic over an internet gateway
- Updated MTU Support (March 2025):
- Cross-region VPC peering now supports jumbo frames up to 8500 bytes MTU (previously limited to 1500)
- EC2 now supports full instance bandwidth for inter-region VPC peering traffic and to AWS Direct Connect
- Transit Gateway supports 8500 MTU for all attachments
- Intra-region VPC peering continues to support 9001 MTU (jumbo frames)
- For instances that are collocated inside a placement group, jumbo frames help to achieve the maximum network throughput possible, and they are recommended in this case.
- Enhanced networking results in higher bandwidth, higher packet per second (PPS) performance, lower latency, consistency, scalability, and lower jitter.
- EC2 provides enhanced networking capabilities using single root I/O virtualization (SR-IOV) on supported instance types
- SR-IOV is a method of device virtualization that provides higher I/O performance and lower CPU utilization
- Two mechanisms for enhanced networking:
- Elastic Network Adapter (ENA) – supports network speeds of up to 100 Gbps (up to 600 Gbps on network-optimized instances). All instances built on the AWS Nitro System use ENA.
- Intel 82599 Virtual Function (VF) interface – uses the Intel ixgbevf driver, supports up to 10 Gbps. Only for legacy Xen-based instance types (C3, C4, R3, I2, M4, D2).
- All current-generation instances support enhanced networking via ENA
- Enhanced networking is available only within a VPC
ENA Express
- ENA Express is an enhanced networking feature that uses the AWS Scalable Reliable Datagram (SRD) protocol to improve network performance
- SRD is a high-performance network transport protocol that uses dynamic routing to increase throughput and minimize tail latency
- Key Benefits:
- Increases maximum single-flow bandwidth from 5 Gbps up to 25 Gbps (up to the aggregate instance limit)
- Reduces tail latency by up to 93% (P99.9) during periods of high network load
- Detects and avoids congested network paths through multi-pathing
- Handles packet reordering and most retransmits in the network layer, freeing the application layer
- How it works:
- Enabled per network interface attachment via API call or AWS Console toggle
- Sending instance initiates SRD communication if both sender and receiver have ENA Express enabled
- Falls back to standard ENA transmission if the receiving instance does not support ENA Express
- Works transparently with TCP and UDP protocols
- Scope:
- Originally supported traffic within the same Availability Zone only
- May 2026: ENA Express now supports cross-AZ traffic within a Region, delivering up to 25 Gbps single-flow bandwidth between AZs
- Supported on a wide range of instance types (120+ instance types as of 2025)
- ENA Express traffic cannot be sent in a Local Zone
- Best suited for workloads requiring high single-flow throughput; for workloads needing lowest latency with high PPS during non-congestion, standard enhanced networking may be preferable
Instance Bandwidth Weighting
- Launched December 2024 – allows adjusting the VPC networking and EBS bandwidth allocation on EC2 instances
- Customers can shift bandwidth by up to 25% between VPC and EBS in either direction
- When increasing bandwidth for one service (e.g., VPC), the available bandwidth for the other (EBS) is reduced by the same absolute amount
- Useful for workloads that are either network-intensive or storage-intensive but not both simultaneously
- Burst bandwidth remains the same for the selected option on most instance types
Network Bandwidth Capabilities (2025-2026)
- Network-optimized instances now support up to 600 Gbps network bandwidth:
- C8gn – Graviton4-based, up to 600 Gbps (GA June 2025)
- R8gn – Graviton4-based, up to 600 Gbps (GA September 2025)
- M8gn – Graviton4-based, up to 600 Gbps (GA December 2025)
- R8in/R8idn – Intel-based, up to 600 Gbps (2026)
- These instances feature 6th generation AWS Nitro Cards
- Previous generation network-optimized instances (C6in, R6in, R6idn) support up to 200 Gbps
Elastic Fabric Adapter – EFA
- An Elastic Fabric Adapter (EFA) is a network device that can be attached to the EC2 instance to accelerate High Performance Computing (HPC) and machine learning applications.
- EFA helps achieve the application performance of an on-premises HPC cluster, with the scalability, flexibility, and elasticity provided by AWS.
- EFA provides lower and more consistent latency and higher throughput than the TCP transport traditionally used in cloud-based HPC systems.
- EFA enhances the performance of inter-instance communication which is critical for scaling HPC and machine learning applications.
- EFA is optimized to work on the existing AWS network infrastructure and it can scale depending on application requirements.
- EFAs provide all of the same traditional IP networking features as ENAs, and they also support OS-bypass capabilities. OS-bypass enables HPC and machine learning applications to bypass the operating system kernel and to communicate directly with the EFA device.
- EFA uses the AWS Scalable Reliable Datagram (SRD) protocol to increase network throughput utilization
- EFA Updates (2024-2026):
- Cross-subnet communication (July 2024) – EFA now supports traffic across subnets for both existing and new instances. Requires security group rules to allow cross-subnet traffic.
- EFA-only interface (October 2024) – New interface type that decouples EFA from ENA. Allows standalone EFA devices on secondary interfaces without requiring IP addresses, solving IPv4 address exhaustion and IP routing challenges for AI/ML clusters.
- New EFA observability metrics (September 2025) – Metrics for retransmitted packets/bytes, retransmit timeout events, impaired remote connections, and unresponsive remote receiver events.
- NIXL support with EFA (March 2026) – Accelerates LLM inference at scale through increased KV-cache throughput, reduced inter-token latency, and optimized KV-cache memory utilization.
- Kubernetes Dynamic Resource Allocation for EFA (May 2026) – Amazon EKS supports DRA for EFA, simplifying RDMA configuration for AI/ML and HPC workloads.
- SageMaker HyperPod EFA-only support (June 2026) – Dedicated EFA devices without traditional ENA for IP networking in SageMaker clusters.
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- A user is launching an EC2 instance in the US East region. Which of the below mentioned options is recommended by AWS with respect to the selection of the availability zone?
- Always select the US-East-1-a zone for HA
- Do not select the AZ; instead let AWS select the AZ
- The user can never select the availability zone while launching an instance
- Always select the AZ while launching an instance
- You have multiple Amazon EC2 instances running in a cluster across multiple Availability Zones within the same region. What combination of the following should be used to ensure the highest network performance (packets per second), lowest latency, and lowest jitter? Choose 3 answers
- Amazon EC2 placement groups (would not work for multiple AZs. Defaults to Cluster)
- Enhanced networking (provides network performance, lowest latency)
- Amazon PV AMI (Needs HVM)
- Amazon HVM AMI
- Amazon Linux (Can work on other flavors of Unix as well)
- Amazon VPC (Enhanced networking works only in VPC)
- Regarding the attaching of ENI to an instance, what does ‘warm attach’ refer to?
- Attaching an ENI to an instance when it is stopped
- Attaching an ENI to an instance when it is running
- Attaching an ENI to an instance during the launch process
- Can I detach the primary (eth0) network interface when the instance is running or stopped?
- Yes, You can.
- You cannot
- Depends on the state of the interface at the time
- By default what are ENIs that are automatically created and attached to instances using the EC2 console set to do when the attached instance terminates?
- Remain as is
- Terminate
- Hibernate
- Pause
- Select the incorrect statement
- In Amazon VPC, the private IP addresses only returned to Amazon EC2 when the instance is terminated
- In Amazon VPC, an instance retains its private IP addresses when the instance is stopped.
- In Amazon VPC, an instance does NOT retain its private IP addresses when the instance is stopped
- In Amazon VPC, the private IP address is associated exclusively with the instance for its lifetime
- To ensure failover capabilities, consider using a _____ for incoming traffic on a network interface”.
- primary public IP
- secondary private IP
- secondary public IP
- add on secondary IP
- Which statements are true about Elastic Network Interface (ENI)? (Choose 2 answers)
- You can attach an ENI in one AZ to an instance in another AZ
- You can change the security group membership of an ENI
- You can attach an instance to two different subnets within a VPC by using two ENIs
- You can attach an ENI in one VPC to an instance in another VPC
- A user is planning to host a web server as well as an app server on a single EC2 instance, which is a part of the public subnet of a VPC. How can the user setup to have two separate public IPs and separate security groups for both the application as well as the web server?
- Launch a VPC instance with two network interfaces. Assign a separate security group to each and AWS will assign a separate public IP to them. (AWS cannot assign public IPs for instance with multiple ENIs)
- Launch VPC with two separate subnets and make the instance a part of both the subnets.
- Launch a VPC instance with two network interfaces. Assign a separate security group and elastic IP to them.
- Launch a VPC with ELB such that it redirects requests to separate VPC instances of the public subnet.
- An organization has created multiple components of a single application for compartmentalization. Currently all the components are hosted on a single EC2 instance. Due to security reasons the organization wants to implement two separate SSLs for the separate modules although it is already using VPC. How can the organization achieve this with a single instance?
- Create a VPC instance, which will have both the ACL and the security group attached to it and have separate rules for each IP address.
- Create a VPC instance, which will have multiple network interfaces with multiple elastic IP addresses.
- You have to launch two instances each in a separate subnet and allow VPC peering for a single IP.
- Create a VPC instance, which will have multiple subnets attached to it and each will have a separate IP address.
- Your system automatically provisions EIPs to EC2 instances in a VPC on boot. The system provisions the whole VPC and stack at once. You have two of them per VPC. On your new AWS account, your attempt to create a Development environment failed, after successfully creating Staging and Production environments in the same region. What happened?
- You didn’t choose the Development version of the AMI you are using.
- You didn’t set the Development flag to true when deploying EC2 instances.
- You hit the soft limit of 5 EIPs per region and requested a 6th. (There is a soft limit of 5 EIPs per Region for VPC on new accounts. The third environment could not allocate the 6th EIP)
- You hit the soft limit of 2 VPCs per region and requested a 3rd.
- A user has created a VPC with a public subnet. The user has terminated all the instances, which are part of the subnet. Which of the below mentioned statements is true with respect to this scenario?
- The user cannot delete the VPC since the subnet is not deleted
- All network interface attached with the instances will be deleted
- When the user launches a new instance it cannot use the same subnet
- The subnet to which the instances were launched with will be deleted
- A company wants to reduce AWS costs after learning about the new public IPv4 address charges. Which combination of approaches would help minimize public IPv4 costs? (Choose 2 answers)
- Migrate workloads to IPv6-only subnets where possible (IPv6 addresses are free and eliminate the need for public IPv4)
- Use more Elastic IP addresses instead of auto-assigned public IPs (Both EIPs and auto-assigned public IPs are now charged equally at $0.005/IP/hour)
- Use NAT Gateway with private subnets for outbound-only internet access (Reduces number of public IPs needed; instances use private IPs)
- Switch from VPC to EC2-Classic networking (EC2-Classic was fully retired in August 2023)
- Which of the following is a feature of ENA Express? (Choose 2 answers)
- Increases maximum single-flow bandwidth from 5 Gbps to 25 Gbps
- Requires application code changes to use SRD protocol
- Reduces tail latency (P99.9) for network traffic between EC2 instances
- Works only with EFA-enabled instances
- A machine learning team needs to scale their training cluster to thousands of instances but is running out of private IPv4 addresses. Which EFA feature should they use?
- EFA cross-subnet communication
- EFA-only network interfaces (EFA-only interfaces decouple EFA from ENA, allowing standalone EFA devices without requiring IP addresses)
- ENA Express with SRD protocol
- IP prefix delegation on ENIs
- An application requires high single-flow network throughput between EC2 instances across Availability Zones. Which feature should be enabled?
- Enhanced networking with Intel 82599 VF
- Elastic Fabric Adapter (EFA)
- ENA Express (ENA Express supports cross-AZ traffic as of May 2026, delivering up to 25 Gbps single-flow bandwidth)
- Jumbo frames (9001 MTU)
References