Automatic assigned elastic IP with auto scaled window server

Home»AWS Support Community Forum»Automatic assigned elastic IP with auto scaled window server

Automatic assigned elastic IP with auto scaled window server
Reply

Ashok Kumar

Please let me know how can assigned Elastic ip to auto scaled window server in Auto scaling at amazon.

Thanks

 

This discussion contains 4 replies and has 87 views.

Replies
Reply

Ashok Kumar

Any Update !!!!!

Reply

Taral Shah

Hi Ashok,

A couple of choices to above question

1) IP Address is fixed.

This is a case when you just add or remove one instance. In this aspect the Elastic IP will always be fixed. If this is the case refer to HTG http://www.newvem.com/how-to-automate-elastic-ip-assignment-on-ec2-instance-restart-or-reboot/ this is for Linux but you can create batch process in Windows and set in startup or on schedule as http://technet.microsoft.com/en-us/library/cc725745.aspx

2) If the Elastic IP address is not fixed. It would be little complex.

First you need to find out the available elastic IP and then assign as mentioned in point#1.

To find an Elastic IP run the command “ec2-describe-addresses” it gives all IPs avialble in that region along with the instance ID they are attached to it. You have to get that text, parse it and find the IPs which are not allocated. Get the IP and then follow the steps as mentioned in point#1.

e.g. output of ec2-describe-addresses gives me output as
ADDRESS 43.23.146.150   i-bbrc52da      standard
ADDRESS 175.133.188.131 i-y54a6564      standard
ADDRESS 175.131.253.53  i-t26d518c      standard
ADDRESS 185.73.165.209  i-6a6e1338      standard
ADDRESS 185.75.249.59     standard

As shown above, the 5th number is not allocated. Get all text and find the ip where instance IP is blank.

 

 

 

Reply

Ashok Kumar

Thanks Dear,

If we are using auto scaling with window server so can we use multiple elastic IP so that every lunched new server can get new IP address.

 

Please tell me.

 

Thaks

Ashok

Reply

Taral Shah

You can not have multiple elastic IPs to a single instance unless in VPC.

If you assign an elastic IP to an instance, if that IP is already assigned to some other instance, it will be unallocated from the previous instance and will be allocated to new one.

Can you elaborate more what you refer by multiple elastic IP to single instance.

For VPC multiple IPs refer http://aws.amazon.com/about-aws/whats-new/2021/07/06/multiple-ip-addresses-for-amazon-ec2-instances-in-amazon-vpc/

You must be logged in to reply to this topic.