dynamic ip address renewing

rc240sx

Member
Nov 14, 2002
27
0
0
With isps that currently give dynamic ips, I believe there renewed every 3 days and if no one takes it you get the same one. Now can the ip be renewed when the computer is stil connected to the modem or would the ip be renewed only if the computer is restarted again? Meaning can your ip change while still online.
 

Confused

Elite Member
Nov 13, 2000
14,166
0
0
If the modem is turned on, and it is connected to the ISP, then half way through the IP addresses "lease" it will tell the DHCP server that it is still active, and the lease will be extended. I have had the same IP address with my cable modem for many months, as it is always on. The lease here is 4hrs, so providing it is off for no longer than 2 hours, then I keep the same IP address.


Confused
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,546
422
126
There is no real rule.

My DSL renews every time the modem is switched off.

My Cable renews once in two weeks regardless of any measure that I will take.
 

blcjr

Golden Member
Oct 28, 1999
1,010
0
0
Originally posted by: JackMDS
There is no real rule.

My DSL renews every time the modem is switched off.

My Cable renews once in two weeks regardless of any measure that I will take.

Is PPPOE a factor here?

I'm not sure why recycling the modem would result in a DHCP request. I don't think even restarting the computer should result in this if the current lease is still valid. But with PPPOE, who knows? I don't, and wish I did.
 

blcjr

Golden Member
Oct 28, 1999
1,010
0
0
Originally posted by: gunrunnerjohn
I keep an IP address for months, then it changes without any apparent warning.

If your computer could not connect to the DHCP server half way through the lease life to renew it, then 87.5 percent through the lease life it will simply send a discover broadcast to get a new ip address.

 

gunrunnerjohn

Golden Member
Nov 2, 2002
1,360
0
0
Whenever your reboot, DHCP asks for a new address. If you contact the same DHCP server (normally true), your lease is still in the tables with the same MAC address as the request. Most DHCP servers will simply hand you the same IP address as you previously had, though that's not universally true.
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,546
422
126
Originally posted by: blcjr

Is PPPOE a factor here?

I'm not sure why recycling the modem would result in a DHCP request. I don't think even restarting the computer should result in this if the current lease is still valid. But with PPPOE, who knows? I don't, and wish I did.
Interesting Idea I will check it!

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
My Cable renews once in two weeks regardless of any measure that I will take.

Not if you just set the IP statically =) Any decent DHCP server will ping the IP before handing it out so you won't get dup'd.

I'm not sure why recycling the modem would result in a DHCP request. I don't think even restarting the computer should result in this if the current lease is still valid. But with PPPOE, who knows? I don't, and wish I did.

If you're using a DSL router that connects via PPPOE and does NAT of course it would send a DHCPDISCOVER on bootup, most likely the router can't keep a lease record over reboot because there's no non-volatile storage for it. My Linux router keeps a record of what the IP of the DHCP server was and what IP it gave me and how long the lease is so if it reboots it just sends DHCPRQUEST directly to the DHCP server again and asks for a lease extension, I'm sure the same thing would apply if I needed PPPOE on the Linux box.