Configuring and Mapping Multiple EIPs to ENI Using NAT Gateway

Introduction

  1. We have deployed an “ecs.g5.4xlarge” instance that can have up to three additional Network Interfaces. The OS is Centos 7.
  2. We have configured CPANEL on the instance to show EIP availability.
  3. We have deployed a NAT Gateway.

Prerequisites

  1. An Alibaba Cloud account. If you don’t have one already, visit the Free Trial page to sign up for a free account.
  2. An instance that can support multiple Network Cards (such as ecs.g5.4xlarge).
  3. NAT Gateway.
  4. Access to the ECS API/CLI.

Assign a Private IP to an ENI

aliyuncli ecs AssignPrivateIpAddresses --AccessKeyId xxxxxxxxxxxxxxxxxx --AccessKeySecret nnnnnnnnnnnnnnnnnnnnn --NetworkInterfaceId eni-d7o0bbec73w53nxctkaz --SecondaryPrivateIpAddressCount 8
ifconfig eth0:1 172.16.0.118 netmask 255.255.255.0 up

Configure NAT Gateway

Test Private IP Activation

Test EIP Availability in CPANEL/WHM (Web Hosting Manager)

ifconfig eth0:1 172.16.0.118 netmask 255.255.255.0 up

Conclusion

  1. The number of Private IP Addresses that can be assigned to an ENI currently is limited 20 and is dependent on the instance type.
  2. The NAT IP Bandwidth Package allows assigning only up to 50 IP Addresses.
  3. Internet bandwidth is limited to 1 Gbps.

Further Reading

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

There’s Nothing to Worry About

Using COVID-19 API in Python

Dependency injection in ASP.NET Core

Accelerating Access to Global Servers from China Using Global Acceleration

HNG Internship goals

Scaling Zeppelin for Enterprise - Part 3

All you need to know about Git Merge vs Git Rebase in Examples

How To Set Up a Samba Share on Ubuntu 16.04

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

How to achieve application failover with AWS’s Auto Scaling Groups (Based on the updated GUI of…

How I Setup CI/CD With Github Actions For K3s

How to integrate checkov in github workflow

Configure Auto Scaling and Load Balancing on EC2 Instances.