How to allocate/generate new IP address in ec2 instance in same subnet range?

∥☆過路亽.° 提交于 2019-12-01 15:31:33
kenlukas

Based on the documentation it isn't possible to select the IP from an address range for Elastic IP's unless you own the IP address space.

You can allocate an Elastic IP address from Amazon's pool of public IPv4 addresses, or from a custom IP address pool that you have brought to your AWS account. For more information about bringing your own IP address range to your AWS account, see Bring Your Own IP Addresses (BYOIP).

You may be able to hack around this but I don't think AWS would look kindly upon it.

I Found a solution for my problem:

While creating new instance itself we can assign IP address within the same subnet range.

Here are the steps : First have this ready

  • goto VPC --> Create Subnet
  • goto network&security --> create networkinterface

Then, * Launch Instance --> Choose the AMI --> choose instance type --> configure instance

Under configure instance :

*Select the network and subnet you have just created

  • Auto-assign Public IP : Enable

Then in same Page , downside you see Network interfaces : Here , Add Primary Ip , secondary Ip (you can add as many based on your subscription)

But for a free tier max 2 you can add !!

But main thing is you can assign any IP you need from that subnet range you had created.

Hoping this will help someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!