Book Image

AWS Networking Cookbook

By : Satyajit Das, Jhalak Modi
Book Image

AWS Networking Cookbook

By: Satyajit Das, Jhalak Modi

Overview of this book

This book starts with practical recipes on the fundamentals of cloud networking and gradually moves on to configuring networks and implementing infrastructure automation. This book then supplies in-depth recipes on networking components like Network Interface, Internet Gateways, DNS, Elastic IP addresses, and VPN CloudHub. Later, this book also delves into designing, implementing, and optimizing static and dynamic routing architectures, multi-region solutions, and highly available connectivity for your enterprise. Finally, this book will teach you to troubleshoot your VPC's network, increasing your VPC's efficiency. By the end of this book, you will have advanced knowledge of AWS networking concepts and technologies and will have mastered implementing infrastructure automation and optimizing your VPC.
Table of Contents (10 chapters)

Working with network interfaces

Elastic Network Interface (ENI) in AWS is a network interface that can be attached to an EC2 instance. Based on its capacity, one EC2 instance can have number of ENIs attached to it. Each ENI comes with its own MAC and IP addresses. You can't move the ENI to another subnet after it is created. You can attach an ENI to an EC2 in the same AZ.

Getting ready

We need an AWS account and user with proper permissions for creating an ENI.

How to do it...

Here are the steps to follow:

  1. Log in to the AWS account and browse to https://console.aws.amazon.com/ec2/. In the left navigation menu, choose Network Interfaces.
Network Interface Dashboard
  1. Click on Create Network Interface.

Network Interface Creation Details
  1. In Description, provide the name. In Subnet, choose subnet where the NIC needs to be created. Leave IPv4 Private IP and IPv6 IP; they will be created as per CIDR range of subnet. Select Security Group. Otherwise, you can mention the IP address from the CIDR range. Click on Yes, Create.

Network Interface Detail
  1. You can see that only one network interface is created. However, its status is available as it is not attached to any instance. Click on the Attach button.
Network Interface Creation
  1. Choose the EC2 Instance ID with which you want to attach it. Click Attach.
Network Interface attached
  1. You can see that the interface is in use. You can Detach it and attach it to some other instance. From the Action menu you can manage the ENI. Click on Instance ID.
EC2 with two Network Interface
  1. You can see two private IPs and two network interfaces eth0 and eth1.