Configuring EC2 Instances with Standby Interfaces for High Availability in AWS VPC

Configuring EC2 Instances with Standby Interfaces

Prev Question Next Question

Question

You need to set up EC2 instances inside a VPC.

The requirement is also to create a standby interface if any of the EC2 instances do not respond to traffic.

How can you achieve this?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

AWS Docs provides the following details:

Scenarios for Network Interfaces.

Attaching multiple network interfaces to an instance is useful when you want to:

Create a management network.

Use network and security appliances in your VPC.Create dual-homed instances with workloads/roles on distinct subnets.

Create a low-budget, high-availability solution.

Creating a Management Network.

You can create a management network using network interfaces.

In this scenario, the primary network interface (eth0) on the instance handles public traffic, and the secondary network interface (eth1) handles backend management traffic.

It is connected to a separate subnet in your VPC that has more restrictive access controls.

The public interface, which may or may not be behind a load balancer, has an associated security group that allows access to the server from the internet (for example, allow TCP port 80 and 443 from

0.0.0.0/0

, or from the load balancer) while the private facing interface has an associated security group allowing SSH access only from an allowed range of IP addresses either within the VPC or from the internet, a private subnet within the VPC or a virtual private gateway.

To ensure failover capabilities, consider using a secondary private IPv4 for incoming traffic on a network interface.

In the event of an instance failure, you can move the interface and/or secondary private IPv4 address to a standby instance.

Options A, B and C are incorrect since none of these options will help accomplish the requirement.

For more information on using the Elastic Network Interface, please refer to the below URL.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html
soe ye )

‘Subnet A Route Table Subnet 8 Route Table
| 192.168.0.0/16 —> Local | | 192.168.0.0/16 —P Local l
00.0.0/0 in tabseed inremst eon > vow-ac5d6e7F|

Internet gateway
igw-1azb3cad

Subneta Subnet®
Public,
traffic, 7
Private IP
— ce 192,168.1.201
Elastic P
203.0.113.10
Private IP _
192.168.0.10 v
// Management
traffic
vec *

192.168.0.0/16

Virtual private gateway
vow-4e5d6e7F
ven

AD customer satenay

Webserver Route Table
‘Network Interface

if )
| |
| o.0.0.0/0 —p 192.168.0.10 |
| 172.16.0.0 > 192.168.1.201 |
| |
\ |

‘Security Group Security Group
Tor etho Tor etht

Allow TCP 80 Allow TCP 22
192.168.0.0 —P> 192.168.1.201

Default gateway —> 192.168.0.10.

from from
0.0.0.0/0 172.16.0.0/16

CorporateData Center {
172160016) 9 “~~~ ~~ -

To set up EC2 instances inside a VPC and create a standby interface, the recommended solution is to attach a secondary ENI (Elastic Network Interface) to the instance. Therefore, the correct answer is D.

An Elastic Network Interface (ENI) is a virtual network interface that can be attached to an EC2 instance in a VPC. It allows an instance to have multiple network interfaces, each with its own private IP address, security group, and MAC address. By attaching a secondary ENI to the instance, you can create a standby interface that can take over if the primary interface fails to respond to traffic.

Option A, which suggests assigning a secondary IP to the ENI attached to the EC2 instance, is incorrect. Although it is possible to assign multiple IP addresses to a single ENI, this approach does not provide redundancy in case of failure.

Option B, which suggests attaching a public and private IP to the instance, is also incorrect. While it is possible to attach multiple IP addresses to an instance, this approach does not provide a standby interface in case the primary interface fails.

Option C, which suggests attaching an elastic IP to the instance, is incorrect as well. An Elastic IP is a static, public IPv4 address that you can associate with your AWS account. Although it provides a fixed IP address for your instance, it does not provide a standby interface in case of failure.

Therefore, the recommended solution is to attach a secondary ENI to the instance. This will provide a standby interface that can take over if the primary interface fails to respond to traffic.