12

I get a new elastic IP, I attach it to an instance, but it doesn't work? I can't ping the IP from my local computer either? Am I missing something here?

  1. How do I use Amazon Elastic IP?
  2. When is a new IP assign to an instance? When I turn it off and reboot?
T. Zengerink
  • 199
  • 5
  • 13
001
  • 491
  • 1
  • 11
  • 21
  • Check this out, it help me a lot. http://alestic.com/2009/06/ec2-elastic-ip-internal – Ali Oct 13 '10 at 07:30

2 Answers2

11

An EBS-backed instance can be "stopped" as opposed to being "terminated". You won't pay server charges, just storage charges for the EBS boot volume. You can "start" the server again later and all boot volume data will still be there. If, however, the server had an Elastic IP associated with it, that association will be lost when the server is stopped, and you will pay unassociated EIP charges. Also, when you restart the server you will have to manually reassociate the EIP with it.

Jeff
  • 246
  • 3
  • 5
6

The default EC2 firewall configuration disallows all traffic from outside of the AWS Cloud, including pings. If you haven't modified your firewall configuration, then you won't be able to ping your hosts. You can enable pings by running something like

ec2auth default -P icmp -t 8:0

(substituting the name of the security group of your EC2 instance for "default")

If you shutdown an EC2 instance, that instance is destroyed; you can't turn off instances and reboot them [*]. So if you do turn off an instance and then start another one, you'll need to associate the Elastic IP address with the new instance.

[*] Unless you're using an EBS-backed instance. I've never used these, so I don't know how they interact with Elastic IP addresses.

Evan Broder
  • 811
  • 5
  • 5
  • You can stop an instance from running and start it up again but I think the ip changes! However you still have the same hdd booting up! If you terminate then that instance can no longer be used. – 001 Jun 27 '10 at 22:58
  • @khou, if an EC2 instance has an associated Elastic IP address, that doesn't chnge after a reboot. The internally assigned IP address for the instance, which you use to communicate with other instances, will change. – gareth_bowles Oct 13 '10 at 17:19