On 2022-03-20 8:00 a.m., Tim ignored_mailbox@yahoo.com.au wrote
R. G. Newbury wrote: Controlling an hdhr with a dhcp served IP address is basically impossible as it is hard to find that address and remember it for use in your program. Control of the unit with most digital tv programs requires a static IP address. Mythtv for instance will not work if the IP address is changed, external to the mythtv program.
DHCP does not equal random new addresses each time. On a home network, you're extremely likely to get assigned the same address each time. But you can ensure that by configuring the DHCP server to work that way.
'Configuring the DHCP server to work that way', is to set it to deliver a static address. With a dhcp server, the problem is that any change in the network, or the items connecting to it, can cause the dhcp server to deliver a different address to a unit, while a static address, once set as a static address, will not change. Moreover, a static address setting is tied to the MAC of the unit, not its FQDN.
For many things on a home LAN, configuring a DHCP server is going to be the easiest way to set fixed IPs for every device (unless you like manually configuring your TV, your printer, your PC, your laptop, your smart gadgets, your internet fridge, and partridge in a pear tree.
No wonder I can never get the partridges to connect properly!
On Sun, 2022-03-20 at 12:13 -0400, R. G. Newbury wrote:
'Configuring the DHCP server to work that way', is to set it to deliver a static address. With a dhcp server, the problem is that any change in the network, or the items connecting to it, can cause the dhcp server to deliver a different address to a unit, while a static address, once set as a static address, will not change. Moreover, a static address setting is tied to the MAC of the unit, not its FQDN.
Again, I'd say generally not (addresses changing willy nilly). Unless you have one of those cutdown DHCP servers which only doles out a tiny number of addresses and has no choice but to share 4 addresses amongst 5 devices.
When a device boots up and tries to connect to the network, the DHCP server sees this, and checks if the device has a prior lease. If so, it tries to give it the same one again. The device can say it'd like a particular address, but the DHCP server is boss and *can* honour or ignore that request.
When another device boots up and tries to join the network, the same thing happens again. The DHCP server sees if it's previously served that device, and if it has, it'll try to assign it the same address as last time. If it's a new device, it'll try to serve it an address it hasn't given out before to anything else.
There are lease time parameters which can configure how short and how long leases last for (e.g. try to keep the lease reserved for a few days if possible, try to avoid changing leases within a few hours), but they tend to be applied to what to do when the server has run out of spare addresses and will have to re-use an address.
My experience is that the same devices usually don't get different addresses, and different devices don't usually take over an address used by something else. Part of that equation is the device, as well, it'll usually ask the DHCP server if it can have the same IP as last time, even if the lease period is over.
Of course that's no guarantee. Your DHCP server (such as in a router) might have short default times. ISPs often deliberately pick short times, so they can tell customers to disconnect, wait 10 minutes, and try again, when things stopped working (the idea being that they may get a different route, next time, and the ISP won't bother trying to fault find their own network, or it might auto-reset devices when they're free). On my LAN, I've set deliberately very long lease times, just to avoid these nightmares. Leases will be held, if possible, for months.
On 2022-03-20 12:50, Tim via users wrote:
On Sun, 2022-03-20 at 12:13 -0400, R. G. Newbury wrote:
'Configuring the DHCP server to work that way', is to set it to deliver a static address. With a dhcp server, the problem is that any change in the network, or the items connecting to it, can cause the dhcp server to deliver a different address to a unit, while a static address, once set as a static address, will not change. Moreover, a static address setting is tied to the MAC of the unit, not its FQDN.
Again, I'd say generally not (addresses changing willy nilly). Unless you have one of those cutdown DHCP servers which only doles out a tiny number of addresses and has no choice but to share 4 addresses amongst 5 devices.
When a device boots up and tries to connect to the network, the DHCP server sees this, and checks if the device has a prior lease. If so, it tries to give it the same one again. The device can say it'd like a particular address, but the DHCP server is boss and *can* honour or ignore that request.
When another device boots up and tries to join the network, the same thing happens again. The DHCP server sees if it's previously served that device, and if it has, it'll try to assign it the same address as last time. If it's a new device, it'll try to serve it an address it hasn't given out before to anything else.
There are lease time parameters which can configure how short and how long leases last for (e.g. try to keep the lease reserved for a few days if possible, try to avoid changing leases within a few hours), but they tend to be applied to what to do when the server has run out of spare addresses and will have to re-use an address.
My experience is that the same devices usually don't get different addresses, and different devices don't usually take over an address used by something else. Part of that equation is the device, as well, it'll usually ask the DHCP server if it can have the same IP as last time, even if the lease period is over.
Of course that's no guarantee. Your DHCP server (such as in a router) might have short default times. ISPs often deliberately pick short times, so they can tell customers to disconnect, wait 10 minutes, and try again, when things stopped working (the idea being that they may get a different route, next time, and the ISP won't bother trying to fault find their own network, or it might auto-reset devices when they're free). On my LAN, I've set deliberately very long lease times, just to avoid these nightmares. Leases will be held, if possible, for months.
In my network, devices are assigned DHCP IP address according to their MAC address. My wireless access point uses mac filtering.
With DHCP being assigned via MAC address, then they get a static IP address fixed to that device. This helps with scripting for some things. Something to consider.
Robin
On Tue, 2022-03-22 at 00:34 -0600, Robin Laing wrote:
In my network, devices are assigned DHCP IP address according to their MAC address.
Mine too, virtually all DHCP servers do (even if not providing fixed static addresses, but just nearly always giving the same addresses), that's always been the way DHCP associated clients with leases.
And there are some further client ID parameters that *can* be taken into consideration. You also need to remember that some clients automatically randomise their MAC for so-called privacy (*) reasons, that can make DHCP serving a bit of a headache.
* Random network addresses may anonymise you slightly, but your web- browser is going to fingerprint you very badly.
My wireless access point uses mac filtering.
That I don't bother with. It can't stop cracking, they just listen and clone MACs to find one that is allowed (there are no-skill-required programs that can do that for malcontent people). It's the same false belief of hiding access point SSIDs.
And it makes life difficult when you have to manually authorise everything that should be allowed to connect. Not to mention the MAC randomising shenanigans I just mentioned making it near impossible to use your own network if you use MAC filtering. It was an annoying feature my phone added in one update that took me a while to find out why its IP kept changing.
On Tue, 22 Mar 2022 00:34:55 -0600 Robin Laing mesat@telusplanet.net wrote:
In my network, devices are assigned DHCP IP address according to their MAC address. My wireless access point uses mac filtering.
With DHCP being assigned via MAC address, then they get a static IP address fixed to that device. This helps with scripting for some things. Something to consider.
Robin
Do not forget this randomization "security feature" :-)
# Place file in # /etc/NetworkManager/conf.d/90-disable-randomization.conf [device-mac-randomization] wifi.scan-rand-mac-address=no [connection-mac-randomization] ethernet.cloned-mac-address=permanent wifi.cloned-mac-address=permanent
BR, Bob