Ask
Reply
Solution
19-02-2021 12:37 PM
Hi
Why does some devices maintain there Internal IP and some change, for example a phone always gets the same IP address, whereas another phone it changes
All devices are getting the IP by DHCP from the vodafone router
19-02-2021 12:52 PM
Hi
Dunno.
There is a lease time....
19-02-2021 01:30 PM - edited 19-02-2021 01:47 PM
I don't know either, or at least I know why they should get the same address but I can't understand why one doesn't.
You are right It's the DHCP server in the router giving the I.P. addresses but it should remember the devices by their MAC address so it can give it out the same I.P. consistently.
I don't think the lease time has anything to do with it a) because it's set to forever in the Vodafone router (at least it is in the THG3000- don't know about the earlier routers) and b) because it's only to tell the device how long to wait to ask for a new I.P. but I don't think the DHCP server will clear the entry in it's cache unless it runs out of new I.P. addresses to give.
I will say I'm not an expert in DHCP but the above is how I believe it should work, gleaned over the years.
Doesn't really answer your question - sorry.
Edit. The lease time is 24 hours on the guest wifi (THG3000) are you using that? If so perhaps it is the lease time.
19-02-2021 06:48 PM - edited 19-02-2021 06:54 PM
Fight club rules apply! The simple answer is that there is no simple answer!
Many DHCP servers will allocate a new IP address to any device where a previous lease has been allowed to fully expire (often citing security as the reason). It's worth remembering that if the common default lease time is 24hrs, then the existing lease will be refreshed (with the existing IP) once half the lease has expired. If that is the situation you have, then no "always-on" device will ever have a lease with much less than 12hrs remaining.
That's the common way it works, but it's not something that is set in stone and manufacturers and even sysadmins can pick and choose their own varients.
*I have the leases here set to 7 days, the burglar alarm though really likes to actively relinquish its leases roughly every hour (with some randomness). And setting it to static triggers an alert!
20-02-2021 01:53 PM - edited 21-02-2021 07:56 PM
I thought I would try an little experiment.
I connected 2 devices, a laptop and a PC that had not been connected to my THG3000 since it was factory reset the day before. I set the lease time in the router to 1 hour and connected the laptop first. It got x.x.x.117. Next I connected the PC it got x.x.x.178. I confirmed both had 1 hour leases. I then powered them off overnight.
In the morning I powered them back on in the opposite order i.e. PC first. It still got x.x.x.178 and the laptop second and it still got x.x.x.117, both on new 1 hour leases.This seems to confirm that the DHCP retained the registration beyond the lease expiry. Edit: Reasonable assumption, but wrong, see my next post.
I don't understand why the I.P. addresses are so high and so far apart as I would have expected it to issue them in sequence and I don't have that many devices.
It would be interesting to try again after another factory reset but that would be too much hassle.
21-02-2021 07:52 PM - edited 21-02-2021 08:02 PM
O.K. so it was still bugging me that the I.P. addresses were so high and far apart that I did another experiment.
I have a spare THG3000 so I factory reset it.
I then connected two laptops in turn. First a Fujitsu (FJ) and then a HP (HP).
I connected the FJ first and it got x.x.x.155 then the HP it got x.x.x.84
Another Factory reset.
I connected the HP first, it got x.x.x.84 then the FJ and it got x.x.x.155
Now I don't believe it can retain anything through a factory reset so the only conclusion I have is the THG3000 has a algorithm that gives a I.P. address based on the hardware of the device and that can really only be the MAC address.