<div dir="ltr"><div>Thanks Glenn, I agree completely. if the DNS updated this wouldn't be an issue. I'm trying to work out what is going on there but it is a bit of a busy DNS server. I will try and isolate the traffic though. <br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><a href="https://connect-mobile.co.za/mobile_marketing_solutions/" target="_blank"><img src="https://www.connect-mobile.co.za/signatures/wayne.gif"></a><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 30 Mar 2021 at 01:21, <<a href="mailto:glenn.satchell@uniq.com.au">glenn.satchell@uniq.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The on-disk leases file is just a representation of what is in memory - <br>
that is the true status, so as soon as it is released it would be marked <br>
so in the in memory copy. I don't think timing would affect that. What <br>
Sten says though about the history in the leases file is correct - each <br>
new operation is appended to the file, so you can see previous ones, at <br>
least for the life of the file. My understanding is that the file is <br>
re-written every hour to preven tit growing too large. The previous file <br>
remains dhcpd.leases~ so between the two you can get up to 2 hours of <br>
history.<br>
<br>
When a lease is released, it is marked as available. Given this <br>
particular client has had both IPs in the past, then the matching <br>
algorithm to find a new lease could come up with both possibilities. <br>
Without looking at the code I wouldn't know precisely how it decides <br>
upon a particular lease from the list of candidates. The client should <br>
be prepared to switch IPs upon release of the lease and subsequent <br>
discover. That is not the same as renewing an existing lease. I guess <br>
the real problem is that DNS is not being updated.<br>
<br>
Packet capture between dhcpd and the DNS server will at least show if <br>
updates are being sent and you can then narrow it down to a problem with <br>
either server.<br>
<br>
regards,<br>
Glenn<br>
<br>
On 2021-03-30 03:26, Sten Carlsen wrote:<br>
> Hi<br>
> <br>
> These two addresses are both in the same pool, so nothing illegal is<br>
> happening. It is still odd that it sometimes gets one address and then<br>
> the other, this should not happen.<br>
> <br>
> Consider the leases file as a historical document, each time something<br>
> happens, the leases file gets added to. Once in a while it gets<br>
> regenerated with just the current status of all leases.<br>
> <br>
> So for this sequence of events you should be able to reconstruct what<br>
> happened by looking into this file.<br>
> <br>
> One thing that comes to mind is timing. The release and the discover<br>
> happens in the same second, so what if the server could not write to<br>
> the leases file before being asked about a new lease - this is not<br>
> extending an existing lease as the discover indicates that the device<br>
> does not have an address at this moment.<br>
> <br>
> Would it be possible to add a pause of a few seconds between the<br>
> release and the discover? at least for an experiment. If that works,<br>
> some timing is at the bottom of this.<br>
> <br>
> Possibly a wireshark trace could reveal the exact timing of these two<br>
> messages.<br>
> <br>
> The leases file snippet did also not have both addresses as active,<br>
> which could uncover other interesting things.<br>
> <br>
> --<br>
> Best regards<br>
> Sten Carlsen<br>
> <br>
> A pessimist is a person that can find a problem for every solution.<br>
> <br>
>> On 29 Mar 2021, at 12.05, Wayne Gemmell | Connect<br>
>> <<a href="mailto:wayne@connect-mobile.co.za" target="_blank">wayne@connect-mobile.co.za</a>> wrote:<br>
>> <br>
>> Hi Sten<br>
>> <br>
>> One of the host I've been testing with in the kannel pool alternates<br>
>> between the following<br>
>> <br>
>> inet <a href="http://10.3.2.36/16" rel="noreferrer" target="_blank">10.3.2.36/16</a> [1]<br>
>> <br>
>> inet <a href="http://10.3.2.60/16" rel="noreferrer" target="_blank">10.3.2.60/16</a> [2]<br>
>> <br>
>> Leases look as follows. I don't really understand why each would be<br>
>> both free and active.<br>
>> <br>
>> Here's the log file of the responsible peer:<br>
>> <a href="https://pastebin.com/UP6M1Lic" rel="noreferrer" target="_blank">https://pastebin.com/UP6M1Lic</a><br>
>> <br>
>> DHCP Lease list on responsible peer. The other one has similar data<br>
>> but no host names. <a href="https://pastebin.com/WX3NwkM2" rel="noreferrer" target="_blank">https://pastebin.com/WX3NwkM2</a><br>
>> Here's snippet of the lease file <a href="https://pastebin.com/fKFiZpQ0" rel="noreferrer" target="_blank">https://pastebin.com/fKFiZpQ0</a><br>
>> <br>
>> [3]<br>
>> <br>
>> On Fri, 26 Mar 2021 at 19:32, Sten Carlsen <<a href="mailto:stenc@s-carlsen.dk" target="_blank">stenc@s-carlsen.dk</a>><br>
>> wrote:<br>
>> <br>
>> Thanks<br>
>> <br>
>> Sten<br>
>> <br>
>> On 26 Mar 2021, at 08.43, Wayne Gemmell | Connect<br>
>> <<a href="mailto:wayne@connect-mobile.co.za" target="_blank">wayne@connect-mobile.co.za</a>> wrote:<br>
>> <br>
>> Thanks Sten<br>
>> <br>
>> I've moved my class out of the subnet  and the issue still persists.<br>
>> <br>
>> Well, that is one can of worms out of the picture.<br>
>> <br>
>> What are the two addresses?<br>
>> <br>
>> [3]<br>
>> <br>
>> On Thu, 25 Mar 2021 at 17:51, Sten Carlsen <<a href="mailto:stenc@s-carlsen.dk" target="_blank">stenc@s-carlsen.dk</a>><br>
>> wrote:<br>
>> <br>
>> You define the class kannel inside the subnet, so if there are any<br>
>> other subnets, it will be defined there as well. Class definitions<br>
>> are global always, defining them inside a subnet may have some<br>
>> "interesting" side effects as some options are taken from that<br>
>> subnet even if the host gets an address in a different subnet -<br>
>> routers is one of them.<br>
>> <br>
>> So one thought is, if the backup address is not in this subnet, the<br>
>> host will be given incorrect information.<br>
>> <br>
>> --<br>
>> Best regards<br>
>> Sten Carlsen<br>
>> <br>
>> --------------------------------------------------<br>
>> Aoccdrnig to rseerach at Cmabrigde Uinervtisy,<br>
>> it deosn't mttaer in waht oredr the ltteers in a<br>
>> wrod are, the olny iprmoatnt tihng is taht the<br>
>> frist and lsat lteter be at the rghit pclae.<br>
>> The rset can be a ttoal mses and you can slitl<br>
>> raed it wotihut porbelm. Tihs is bcuseae the<br>
>> hmuan mnid deos not raed ervey lteter by istlef,<br>
>> but the wrod as a wlohe. Amzanig, huh?<br>
>> --------------------------------------------------<br>
>> <br>
>> On 25 Mar 2021, at 13.01, Wayne Gemmell | Connect<br>
>> <<a href="mailto:wayne@connect-mobile.co.za" target="_blank">wayne@connect-mobile.co.za</a>> wrote:<br>
>> <br>
>> I tried it. No change. The issue still persists.<br>
>> <br>
>> [3]<br>
>> <br>
>> On Tue, 23 Mar 2021 at 16:19, Wayne Gemmell | Connect<br>
>> <<a href="mailto:wayne@connect-mobile.co.za" target="_blank">wayne@connect-mobile.co.za</a>> wrote:<br>
>> <br>
>> I'll give it a try, thanks.<br>
>> <br>
>> [3]<br>
>> <br>
>> On Tue, 23 Mar 2021 at 01:32, Bill Shirley<br>
>> <<a href="mailto:bill@c3po.polymerindustries.biz" target="_blank">bill@c3po.polymerindustries.biz</a>> wrote:<br>
>> <br>
>> Try:<br>
>> update-optimization             off;<br>
>> <br>
>> Bill<br>
>> On 3/19/2021 2:22 AM, Wayne Gemmell | Connect wrote:<br>
>> <br>
>> Hi<br>
>> <br>
>> When my dhcp server gets a DHCPRELEASE followed by a DHCPDISCOVER<br>
>> then it randomly allocates the IP address or the backup IP address<br>
>> that are assigned to the host in the lease file to the host. The<br>
>> assignments always got to the correct host and the mac address<br>
>> doesn't change.<br>
>> <br>
>> When this backup IP address is allocated then dynamic DNS isn't<br>
>> updated and my container is unreachable.<br>
>> <br>
>> I've put all the relevant details in the link below but am more than<br>
>> happy enough to furnish anything that is missing. Can anyone help<br>
>> please?<br>
>> <br>
>> <a href="https://gitlab.isc.org/isc-projects/dhcp/-/issues/172" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/dhcp/-/issues/172</a> [4]<br>
>> <br>
>> [3]<br>
>> <br>
>> _______________________________________________<br>
>> ISC funds the development of this software with paid support<br>
>> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
>> information.<br>
>> <br>
>> dhcp-users mailing list<br>
>> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
>> <br>
>> _______________________________________________<br>
>> ISC funds the development of this software with paid support<br>
>> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
>> information.<br>
>> <br>
>> dhcp-users mailing list<br>
>> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
>  _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
> <br>
> _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
>  _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
> <br>
> _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
>  _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
> <br>
> <br>
> <br>
> Links:<br>
> ------<br>
> [1] <a href="http://10.3.2.36/16" rel="noreferrer" target="_blank">http://10.3.2.36/16</a><br>
> [2] <a href="http://10.3.2.60/16" rel="noreferrer" target="_blank">http://10.3.2.60/16</a><br>
> [3] <a href="https://connect-mobile.co.za/mobile_marketing_solutions/" rel="noreferrer" target="_blank">https://connect-mobile.co.za/mobile_marketing_solutions/</a><br>
> [4] <a href="https://gitlab.isc.org/isc-projects/dhcp/-/issues/172" rel="noreferrer" target="_blank">https://gitlab.isc.org/isc-projects/dhcp/-/issues/172</a><br>
> _______________________________________________<br>
> ISC funds the development of this software with paid support<br>
> subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more<br>
> information.<br>
> <br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
_______________________________________________<br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div>