|
Discussion Forums
|
Thread: how fast do IP addresses get reassigned?
 |
This question is answered.
|
|
|
|
Replies:
13
-
Pages:
1
-
Last Post:
Aug 3, 2007 7:42 AM
by: Allen
|
|
|
Posts:
633
Registered:
3/24/06
|
|
|
|
how fast do IP addresses get reassigned?
Posted:
Aug 28, 2006 9:23 PM PDT
|
|
|
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?
|
|
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 |
|
|
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.
|
|
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
|
|
|
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?
|
|
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
|
|
|
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...
|
|
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 |
|
|
In practice this window is in the region of minutes, but sub-10 minutes.
|
|
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 |
|
|
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.
|
|
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
|
|
|
Okay, thanks for the answer, James!
|
|
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
|
|
|
>> 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.
|
|
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
|
|
|
> 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?
;-)
|
|
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
|
|
|
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
|
|
Posts:
516
Registered:
3/15/06
|
|
|
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...
|
|
|
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>
|
|
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...
|
|
|
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>
|
|
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
|
|
|
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.
|
|
|
|