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

How Node.js & PHP Work? Read Before You Start

What Alibaba Cloud Elastic High-Performance Computing (E-HPC) Can Help You Do

Deep Learning Course notebooks worth $2,000 are now open source

The 5 Misconceptions of Sponsoring a Virtual Conference

Writing a built-in Tendermint Core app in Go

Gettineg monochannel 16-bit signed integer PCM audio samples from the microphone in the Browser

Ansible Tower and its ‘venv’ Lifecycle on OpenShift

One symbol of that politicization is an organization called Evangelicals for Trump.

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

Upgrade Aurora PostgreSQL with Minimal Downtime using AWS DMS

Produce and consume messages from a Kafka topic using docker

Database Versioning — Liquibase

AWS DMS Heartbeat — Avoid Critical Production DB Issues