What Is AWS Network Interface, and How to Implement It?
What Is AWS Network Interface, and How to Implement It?
Table of Contents
Introduction
AWS Network Interface or Elastic Network Interfaces (AWS ENIs) are virtual network cards attached to EC2 instances that help facilitate network connectivity for instances. Having two or more of AWS Network Interface connected to an instance permits it to communicate on two separate subnets.
What is AWS Elastic Network Interface?
An AWS Elastic Network Interface is a logical networking component depicting a virtual network card within a virtual private cloud (VPC). AWS Network Interface has the following characteristics:
-
A primary private IPv4 address of a user’s VPC
-
One Elastic IP address (IPv4) for every private IPv4 address
-
One or more secondary private IPv4 addresses of a user’s VPC
-
A description
-
A destination/source check flag
-
One public IPv4 address
-
One or more security groups
-
A MAC address
-
One or more IPv6 addresses
AWS Network Interfaces can be created, configured, and attached to instances within the same Availability Zone. User accounts might also have requester-managed network interfaces created and maintained by AWS services. Users cannot manage these network interfaces. They allow users to utilize other services and resources.
An AWS ENI can be attached to an instance or detached from an instance and then attached to another instance upon creation. The network interface characteristics follow it when it is detached from an instance and attached to another instance. The network traffic is rerouted to the new instance when a network instance is moved from one instance to the other.
To create an AWS ENI, consider the following steps:
-
Open the Amazon EC2 console
-
Click on Network Interfaces from the navigation pane
-
Click on Create network interface
-
Optionally add a descriptive name for Description
-
Choose a subnet (IPv4-only, IPv6-only, or dual-stack (IPv4 and IPv6)). The next option will change according to the type of subnet you select
-
Do either of the following for Private IPv4 address:
-
Permit Amazon EC2 to choose an IPv4 address from the internet by clicking on Auto-assign
-
Enter an IPv4 address selected by you from the subnet by clicking on Custom
-
-
Do either of the following for IPv6 address:
-
Select None if you do not wish to allocate an IPv6 address to the network interface
-
If you want Amazon EC2 to choose an IPv6 address from the subnet, then select Auto-assign
-
Choose Custom to select and enter an IPv6 address from the subnet
-
-
Optionally, select Elastic Fabric Adapter and Enable to create an Elastic Fabric Adapter
-
Select one or more security groups
-
Optionally, select Add New Tag for each tag and enter a tag key and an optional tag value
-
Click on Create network interface
How to implement AWS Network Interface?
Since the association of AWS ENIs is assigned dynamically, their use in implementing failover in network design is very common. If your service necessitates high availability, then it is advised that you use two servers, primary and standby servers. This will allow you to transfer the service to the standby server if the primary server fails, ensuring high availability.
To achieve this pattern with AWS ENIs, you will have to create a secondary ENI instance, use it as the switch, and then link it to the primary server and an elastic IP (optional). Switch the ENI over whenever you need to switch to the standby instance (manually or using a script).
If you are building your infrastructure on AWS cloud and looking for a service that helps you optimize performance and cost and improve security, learn about the AWS Trusted Advisor service.
Watch the insightful AWS e-Learning video on how to isolate instance with AWS Network Interfaces.
Start your cloud learning journey with an AWS certification
As a first step, you can showcase your cloud skills and knowledge by clearing the CLF-C01: AWS Certified Cloud Practitioner exam and earning a certificate. The exam costs US$ 100 and is for individuals meeting the following criteria:
-
Familiarity with AWS cloud for a minimum of 6 months
-
Understanding of IT services and their usage in the AWS cloud platform
-
Understanding of key AWS services and use cases, pricing models and billings, security aspects, and the impact of cloud on business
Expand your career opportunities with NetCom Learning
The AWS Cloud Practitioner Essentials course offered by NetCom Learning can be of immense help to individuals wanting to pass the CLF-C01: AWS Certified Cloud Practitioner exam and get the AWS Certified Cloud Practitioner certificate. The course is 8 hours long, priced at US$ 675.
You can also avail of the Introduction to Amazon Elastic Compute Cloud (EC2) course to better understand the Amazon EC2 service and get a demonstration on building and configuring an EC2 instance.
Read our blog on AWS cloud migration if your organization is gearing up for cloud migration project and wants to upskill your teams for the change.