Is it possible to detach Primary ENI for the EC2 instance?

0

Hello team,

I have lot of EC2 servers with IPV4 CIDR VPC. Now I'm trying to change the IPV4 to IPV6 for all the existing EC2 Instances. I can able to make IPV6 for all newly launched EC2 instances whereas I cant able to detach the Primary ENI (IPV4 attached) from the existing EC2 instances.

I can able to create a new ENI with IPV6 and attach to existing EC2 instances. However, my problem that i can't make this IPV6 based ENI to the existing EC2 instances.

My question - Is it possible to change the IPV6 for all the existing EC2 instances without providing any public IPV4 address? If yes please do let me know the solutions? (Without stopping - Because all of my EC2 instances are in Hibernated state)

Please correct If im in wrong direction!

asked 2 months ago363 views
3 Answers
0
profile picture
EXPERT
answered 2 months ago
  • The steps below are different. The link is the EC2 primary ENI. It is not a newly created ENI.

    2. Create a new EIP and associate with newly created NIC

0

I just following steps to complete

  1. Create a new NIC and attach to the existing EC2 instance
  2. Create a new EIP and associate with newly created NIC
  3. As of now, Im having two private IPs and one Public IP that is EIP
  4. Then I disassociate the EIP
  5. I had a quick look at the EC2 instance - Now new dynamic IP has been appeared to the existing EC2 instance
  6. I cant able to make disappearning Public IP from EC2 dashboard

Am i missing anything?

answered 2 months ago
0

Hello! Given that you have resources that are IPV4 and IPV6 your VPC must be operating in dual-stack mode -- your resources can communicate over IPv4, or IPv6, or both. Your intent to transition your resources currently communicating on IPV4 to IPV6 only is not possible. https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html#vpc-migrate-ipv6-cidr Your intent to detach a primary network interface from an EC2 instance is not possible. You can create new ENIs and attach the ENI as a secondary network interface. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#eni-basics

My question - Is it possible to change the IPV6 for all the existing EC2 instances without providing any public IPV4 address? If yes please do let me know the solutions? (Without stopping - Because all of my EC2 instances are in Hibernated state) Yes you can change IPV6 addressing on existing EC2 instances without providing a public/elastic IPV4 address. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html#working-with-multiple-ipv6

If you require IPV6-only I suggest creating IPV6-only subnets to launch your resources in. If you create an IPv6-only subnet, be aware of the following. An EC2 instance launched in an IPv6-only subnet receives an IPv6 address but not an IPv4 address. Any instances that you launch into an IPv6-only subnet must be instances built on the Nitro System. https://docs.aws.amazon.com/vpc/latest/userguide/create-subnets.html

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions