<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: DHCP changing the IP address suddenly on embedded systems</title>
	<atom:link href="http://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/feed/" rel="self" type="application/rss+xml" />
	<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/</link>
	<description>Anything I found worthy to write down.</description>
	<lastBuildDate>Thu, 26 Mar 2026 13:15:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Xavier</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-1328</link>
		<dc:creator>Xavier</dc:creator>
		<pubDate>Wed, 02 May 2018 09:42:58 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-1328</guid>
		<description>Hi !

thanks all this explanation. It was helpfull for me to find out what&#039;s wrong on my laptop.

I&#039;ve had the same kind of issue... only when I&#039;m out of my country.
At home, everything is fine. When I arrive in India, I&#039;ve got the same problem than you. With same message on syslog.

It only needed for me to set up time on my computer to .... local time and reboot.
And then, everything is fine.</description>
		<content:encoded><![CDATA[<p>Hi !</p>
<p>thanks all this explanation. It was helpfull for me to find out what&#8217;s wrong on my laptop.</p>
<p>I&#8217;ve had the same kind of issue&#8230; only when I&#8217;m out of my country.<br />
At home, everything is fine. When I arrive in India, I&#8217;ve got the same problem than you. With same message on syslog.</p>
<p>It only needed for me to set up time on my computer to &#8230;. local time and reboot.<br />
And then, everything is fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean-Francois Dockes</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-1300</link>
		<dc:creator>Jean-Francois Dockes</dc:creator>
		<pubDate>Tue, 07 Nov 2017 14:50:58 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-1300</guid>
		<description>This does not work for me without editing the leases file to fix the dates. 

So for an even uglier, but working, hack, you can use the following shell function. It sets all dates to next year in the leases file. It seems that they will be reset to correct values in dhcp-lease-time seconds anyway (as far as I can see). I am not going to even pretend that this is very robust, but it seems to solve this very vexing problem for me. 

fixleases()
{
    year=`date +%Y`
    year=`expr $year + 1`
    dt=`date +&quot;$year/%m/%d %H:%M:%S&quot;`
    leases=`echo /var/lib/NetworkManager/dhclient-*.lease`
    #echo LEASES $leases

    sed -i \
        -e &quot;/^ *renew/c   \\ \\ renew 2 ${dt};&quot; \
        -e &quot;/^ *rebind/c   \\ \\ rebind 2 ${dt};&quot; \
        -e &quot;/^ *expire/c   \\ \\ expire 2 ${dt};&quot; \
    $leases
}</description>
		<content:encoded><![CDATA[<p>This does not work for me without editing the leases file to fix the dates. </p>
<p>So for an even uglier, but working, hack, you can use the following shell function. It sets all dates to next year in the leases file. It seems that they will be reset to correct values in dhcp-lease-time seconds anyway (as far as I can see). I am not going to even pretend that this is very robust, but it seems to solve this very vexing problem for me. </p>
<p>fixleases()<br />
{<br />
    year=`date +%Y`<br />
    year=`expr $year + 1`<br />
    dt=`date +&#8221;$year/%m/%d %H:%M:%S&#8221;`<br />
    leases=`echo /var/lib/NetworkManager/dhclient-*.lease`<br />
    #echo LEASES $leases</p>
<p>    sed -i \<br />
        -e &#8220;/^ *renew/c   \\ \\ renew 2 ${dt};&#8221; \<br />
        -e &#8220;/^ *rebind/c   \\ \\ rebind 2 ${dt};&#8221; \<br />
        -e &#8220;/^ *expire/c   \\ \\ expire 2 ${dt};&#8221; \<br />
    $leases<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-843</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 07 Feb 2013 19:10:25 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-843</guid>
		<description>It doesn&#039;t matter if it is an ugly hack if it gets the job done.  There are no points for style.</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t matter if it is an ugly hack if it gets the job done.  There are no points for style.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baruch</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-804</link>
		<dc:creator>Baruch</dc:creator>
		<pubDate>Wed, 10 Oct 2012 13:50:18 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-804</guid>
		<description>I believe most monotonic clock implementations are also irreverent of time jumps as they look at things like rdtsc and the like so their time movement is constant. At least it was on my tests on intel cpus. The implementation on arm devices may differ.</description>
		<content:encoded><![CDATA[<p>I believe most monotonic clock implementations are also irreverent of time jumps as they look at things like rdtsc and the like so their time movement is constant. At least it was on my tests on intel cpus. The implementation on arm devices may differ.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eli</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-803</link>
		<dc:creator>eli</dc:creator>
		<pubDate>Wed, 10 Oct 2012 12:36:29 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-803</guid>
		<description>The DHCP client is dhclient (as it says all over the post).

And in my case, the clock jumped from 1970 to 2012, so it surely remained monotonic. This was not time moving backwards, it was time jumping.</description>
		<content:encoded><![CDATA[<p>The DHCP client is dhclient (as it says all over the post).</p>
<p>And in my case, the clock jumped from 1970 to 2012, so it surely remained monotonic. This was not time moving backwards, it was time jumping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baruch</title>
		<link>https://billauer.se/blog/2012/10/dhcp-ip-ntpdate-rtc/comment-page-1/#comment-802</link>
		<dc:creator>Baruch</dc:creator>
		<pubDate>Wed, 10 Oct 2012 12:30:07 +0000</pubDate>
		<guid isPermaLink="false">https://billauer.se/blog/?p=3206#comment-802</guid>
		<description>Which dhcp client is it? you could consider modifying it to use a monotonic clock on the system.

I recently had a similar problem with nut upsd where if the time was moved backwards it would stop monitoring the ups for the duration of the gap.

I guess that this problem will be prevalent in many applications as well. Most times people do not assume the clock is really going to move in any other direction than forward and in a constant rate.</description>
		<content:encoded><![CDATA[<p>Which dhcp client is it? you could consider modifying it to use a monotonic clock on the system.</p>
<p>I recently had a similar problem with nut upsd where if the time was moved backwards it would stop monitoring the ups for the duration of the gap.</p>
<p>I guess that this problem will be prevalent in many applications as well. Most times people do not assume the clock is really going to move in any other direction than forward and in a constant rate.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
