Discussion Forums



Thread: how fast do IP addresses get reassigned?

This question is answered.

Welcome, Guest Help
Login Login


Permlink Replies: 13 - Pages: 1 - Last Post: Aug 3, 2007 7:42 AM by: Allen
Thorsten von Eicken
RealName(TM)


Posts: 633
Registered: 3/24/06
how fast do IP addresses get reassigned?
Posted: Aug 28, 2006 9:23 PM PDT
 
  Click to reply to this thread Reply

In trying to make dynamic IP addresses work the question of reassignment came up.

Say I run an instance and put its IP address into my DNS and then the instance crashes. I now bring up a fresh instance and change my DNS record to point to the new one. Now, how fast could EC2 reallocate the IP address of the crashed instance to a different instance of a different user? In other words, what is the risk that someone else's instance will get "my" traffic if it takes a few minutes or a few hours for my DNS to update to propage out?


RolandPJ@AWS

Posts: 581
Registered: 6/22/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 28, 2006 11:27 PM PDT   in response to: Thorsten von Ei...
Helpful
  Click to reply to this thread Reply

IP addresses can be re-used as soon as a previous instance terminates.

In practice, there is a delay of several minutes before another instance is booted with network enabled.

For private data exchanges you should use encryption.


mdavidpeterson

Posts: 516
Registered: 3/15/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 12:38 AM PDT   in response to: RolandPJ@AWS
 
  Click to reply to this thread Reply

Hi Roland,

In regards to,

>> In other words, what is the risk that someone else's instance will get"my" traffic if it takes a few minutes or a few hours for my DNS toupdate to propage out? <<

If I destroy an instance, or as Thorsten suggests, my instance crashes, how much of a window exists between the time an IP is thrown into the hold queue and the time it is moved into the reallocation queue?

My apologies if the above is contained in the docs... I haven't got through the all of the documentation as of yet.

Thanks in advance!


Update : Maybe a better way to state this is similar to the way Thorsten stated:  How long before an IP can be reallocated to someone other than the person who owns the account in which the previous machine in which was allocated that IP crashed or was shutdown?


Thorsten von Eicken
RealName(TM)


Posts: 633
Registered: 3/24/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 1:05 AM PDT   in response to: RolandPJ@AWS
 
  Click to reply to this thread Reply

This brings up the whole issue of failure detection (ha!)...

Say the machine on which my instance runs crashes hard: for how long will I still get billed before EC2 notices that the box is dead and thus all the instances have died?

Regarding the IP address reallocation, I don't quite understand the answer. The instances obtain an IP address using a DHCP lease. Will the next instance on the same machine use the same MAC address? In that case, it will presumably get the same DHCP lease and thus the same IP address? If not, i.e., the next instance will get a different MAC address, then it will get a different IP address and the IP address reallocation is really determined by the DHCP lease duration.

I did a bunch more work with EC2 this evening and the lack of a static IP address (or equivalent) is really one of the two show-stoppers for getting real web servers up and running on EC2 today...


James@AWS

Posts: 623
Registered: 6/22/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 1:13 AM PDT   in response to: mdavidpeterson
Helpful
  Click to reply to this thread Reply

In practice this window is in the region of minutes, but sub-10 minutes.


RolandPJ@AWS

Posts: 581
Registered: 6/22/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 2:20 AM PDT   in response to: Thorsten von Ei...
Correct
  Click to reply to this thread Reply

Firstly, regarding billing, you won't be billed at all from the time the host machine crashes (or indeed as soon as the host machine is network-isolated).

Secondly, although it might sound contrary to how DHCP leases normally work, we can and will re-use IP addresses as soon as we know that an instance is dead.


mdavidpeterson

Posts: 516
Registered: 3/15/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 4:16 AM PDT   in response to: James@AWS
 
  Click to reply to this thread Reply

Okay, thanks for the answer, James!


mdavidpeterson

Posts: 516
Registered: 3/15/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 4:36 AM PDT   in response to: RolandPJ@AWS
 
  Click to reply to this thread Reply

>> Secondly, although it might sound contrary to how DHCP leases normallywork, we can and will re-use IP addresses as soon as we know that aninstance is dead. <<

I think I need to sit myself down and read the docs cover-to-cover (oh the thrill! ;) :D), as this is obviously something you guys have thought about, and is something that can be easily managed.

My initial guess is that somewhere between a CNAME and the Load Balancing mechanism is the answer.


Brad Clements

Posts: 19
Registered: 3/15/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 7:31 AM PDT   in response to: RolandPJ@AWS
 
  Click to reply to this thread Reply

> Firstly, regarding billing, you won't be billed at all from the time thehost machine
> crashes (or indeed as soon as the host machine isnetwork-isolated).

So .. I have a long-running compute task that doesn't need any I/O while it's crunching.

Can I do an "ifconfig eth0 down" and you'll stop billing me?

;-)



RolandPJ@AWS

Posts: 581
Registered: 6/22/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 29, 2006 7:38 AM PDT   in response to: Brad Clements
 
  Click to reply to this thread Reply

Why don't you launch a large set of instances and try it out ;)

No, seriously, it's the HOST machine's connectivity that's important, not your instance's connectivity, so your cunning plan is unlikely to make you rich.

Regards
Roland


mdavidpeterson

Posts: 516
Registered: 3/15/06
Re: how fast do IP addresses get reassigned?
Posted: Aug 30, 2006 3:12 AM PDT   in response to: RolandPJ@AWS
 
  Click to reply to this thread Reply

And the winner of Forum Response of the Day, is > http://www.oreillynet.com/xml/blog/2006/08/amazonawsec2_forum_response_of.html

:D  Thanks for the laugh Brad, Roland!


Kaj Kandler

Posts: 5
Registered: 8/3/07
Re: how fast do IP addresses get reassigned?
Posted: Aug 3, 2007 6:45 AM PDT   in response to: Thorsten von Ei...
 
  Click to reply to this thread Reply

Mmmmh? Does this mean the IP address depends on the static server the instance is running on?

Should I conclude that IP addresses can be shared by multiple instance that happen to run on the same server?

That would be one more argument for static IP addresses. Search engines take not too kindly to many websites being hosted on the same IP. And if I share whatever hardware I happen to be booted on, I have no control over that.

K<o>


Kaj Kandler

Posts: 5
Registered: 8/3/07
Re: how fast do IP addresses get reassigned?
Posted: Aug 3, 2007 6:48 AM PDT   in response to: Thorsten von Ei...
 
  Click to reply to this thread Reply

I'd also suggest to extend the "don't reuse" time to at least 1h or something like 4h, which is a typical TTL in the DNS system. Otherwise servers might still cache the old information that then gets routed to a new server.

Even better would be a quarantine of ~2 days. so one could manually intervene.

K<o>


Allen

Posts: 5,320
Registered: 3/19/07
Re: how fast do IP addresses get reassigned?
Posted: Aug 3, 2007 7:41 AM PDT   in response to: Kaj Kandler
 
  Click to reply to this thread Reply

I agree with that suggestion.  If the instance had been up for over an hour, then it would be nice if its former IP address were quarantined for at least 10 minutes.  If it was up for over a month, then maybe you could quarantine its IP address for two days.




Point your RSS reader here for a feed of the latest messages in all forums