Sujet : Re: I never thought of this scenario
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : comp.os.linux.miscDate : 07. Apr 2024, 13:24:28
Autres entêtes
Organisation : A little, after lunch
Message-ID : <uuu39t$2pd0s$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 07/04/2024 12:37, Robert Heller wrote:
My question is, if that had already been occupied by another piece of
kit, would I have ended up with an IP address clash?
This would not happen. I believe that the DHCP server process does something
like an "arp" before it assigns leaases.
I think it may in fact do a *ping*. In fact this led me to the realisation that none of my Raspberry PI PICO W widgets were responding to pings...another 2 hours of my life working out why...:-)
"To prevent a newly allocated IP address conflicting with existing IP addresses, the DHCP server sends an ICMP Echo Request packet before sending a DHCP Offer message. This ICMP packet contains the IP address to be allocated in both the source and destination IP address fields. The server can allocate the IP address if it receives no ICMP Echo Reply packet within the detection period (no client is using this IP address). If the server receives an ICMP Echo Reply packet within the detection period, the DHCP server lists this IP address as a conflicting IP address (as it is in use by another client), and then waits for the next DHCP Discover message to start the IP address selection process again."
https://support.huawei.com/enterprise/en/doc/EDOC1100126920/5cef90ad/how-a-dhcp-server-allocates-network-parameters-to-new-dhcp-clients >Also, anything with an "old"
(pre-reboot) lease would eventually ask for a lease renewal sooner or later
(eg when the lease runs out). It would ask for its existing IP address and the
router would likely grant that and create an entry int its lease table.
yes.
So, even if the router does not have any persistant lease data (eg saved
across reboots), the data would eventually be re-created is pretty shourt
order. I suspect the lease time for most od these little routersis fairly
should (an hour?),
24 hours...
so the problem you fear is a non-problem.
It was a potential problem when my Pi Picos didnt respond to pings
-- Climate Change: Socialism wearing a lab coat.