<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Текст выноски Знак";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.a
        {mso-style-name:"Текст выноски Знак";
        mso-style-priority:99;
        mso-style-link:"Текст выноски";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=RU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello Mukund, thanks for reply, but the problem is not in dhcp client, it’s freeing associated ip address and sending DHCPRELEASE message to server. But dhcp server stay holding that IP address in leases database. It seems that dhcp server is not receiving that DHCPRELEASE message for some reason, or ignoring it.. You may find more details below.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>BR,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>  Evgeny.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Mukund Deshpande [mailto:sai.mukund.sagar@gmail.com] <br><b>Sent:</b> Thursday, June 14, 2012 10:06 AM<br><b>To:</b> Users of ISC DHCP<br><b>Cc:</b> </span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Евгений</span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Ерофеев</span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><br><b>Subject:</b> Re: dhcpd not receiving DHCPRELEASE and not freeng leases<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you check "man dhclient" you will be able to see<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>"" The  client normally doesnât release the current lease as it is not required by the DHCP protocol.  Some cable ISPs require their clients to notify the server<o:p></o:p></p></div><div><p class=MsoNormal>       if they wish to release an assigned IP address.  The -r flag explicitly releases the current lease, and once the lease has been released, the client exits."""<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Running dhclient with -r flag will release the IP address.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>/usr/sbin/dhclient -r <portname> should work.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I hope this helps.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Regards,<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>SMS<o:p></o:p></p><div><p class=MsoNormal>On Thu, Jun 14, 2012 at 11:29 AM, Евгений Ерофеев <<a href="mailto:e.erofeev@tr.center.rt.ru" target="_blank">e.erofeev@tr.center.rt.ru</a>> wrote:<o:p></o:p></p><p class=MsoNormal>Hello all!<br><br>Does anyone have any ideas regarding problem below?<o:p></o:p></p><div><div><p class=MsoNormal><br>-----Original Message-----<br>From: Евгений Ерофеев [mailto:<a href="mailto:e.erofeev@tr.center.rt.ru">e.erofeev@tr.center.rt.ru</a>]<br>Sent: Thursday, June 07, 2012 11:07 AM<br>To: '<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>'<br>Subject: dhcpd not receiving DHCPRELEASE and not freeng leases<br><br>Hello!<br><br>Server is receiving requests from clients and giving them addresses well,<br>but not receiving DCHP Release messages, and not freeing leases.<br><br>Here client requests and receives address and releases it(sniffing on<br>network interface with tshark):<br><br># tshark -i eth2 udp port 67<br>Capturing on eth2<br> 0.000000      0.0.0.0 -> 255.255.255.255 DHCP 342 DHCP Discover -<br>Transaction ID 0x84015146<br> 1.006523 <a href="tel:192.168.10.10">192.168.10.10</a> -> <a href="tel:192.168.10.50">192.168.10.50</a> DHCP 342 DHCP Offer     -<br>Transaction ID 0x84015146<br> 1.009113      0.0.0.0 -> 255.255.255.255 DHCP 342 DHCP Request  -<br>Transaction ID 0x84015146<br> 1.065067 <a href="tel:192.168.10.10">192.168.10.10</a> -> <a href="tel:192.168.10.50">192.168.10.50</a> DHCP 342 DHCP ACK       -<br>Transaction ID 0x84015146<br> 5.358745 <a href="tel:192.168.10.50">192.168.10.50</a> -> <a href="tel:192.168.10.10">192.168.10.10</a> DHCP 342 DHCP Release   -<br>Transaction ID 0x76db7505<br><br>Here are messages from /var/log/syslog:<br><br>Jun  6 17:51:46 si3000-fw01 kernel: [608371.509562] device eth2 entered<br>promiscuous mode Jun  6 17:51:53 si3000-fw01 dhcpd: DHCPDISCOVER from<br>52:54:00:19:ec:6a via eth2 Jun  6 17:51:54 si3000-fw01 dhcpd: DHCPOFFER on<br><a href="tel:192.168.10.50">192.168.10.50</a> to 52:54:00:19:ec:6a via eth2 Jun  6 17:51:54 si3000-fw01<br>dhcpd: DHCPREQUEST for <a href="tel:192.168.10.50">192.168.10.50</a> <a href="tel:%28192.168.10.10">(192.168.10.10</a>) from 52:54:00:19:ec:6a<br>via eth2 Jun  6 17:51:54 si3000-fw01 dhcpd: DHCPACK on <a href="tel:192.168.10.50">192.168.10.50</a> to<br>52:54:00:19:ec:6a via eth2 Jun  6 17:52:30 si3000-fw01 kernel:<br>[608415.403433] device eth2 left promiscuous mode<br><br>There is no release part in logs, and lease stays in<br>/var/lib/dhcp/dhcp.leases:<br><br># cat dhcpd.leases<br># The format of this file is documented in the dhcpd.leases(5) manual page.<br># This lease file was written by isc-dhcp-4.2.4<br><br>server-duid "\000\001\000\001\027[R\264RT\000\204\341\360";<br><br>lease 192.168.10.50 {<br> starts 3 2012/06/06 13:22:01;<br> ends 4 2012/06/07 13:22:01;<br> cltt 3 2012/06/06 13:22:01;<br> binding state active;<br> next binding state free;<br> rewind binding state free;<br> hardware ethernet 52:54:00:19:ec:6a;<br> uid "si3000-ast";<br>}<br>lease 192.168.10.50 {<br> starts 3 2012/06/06 13:51:54;<br> ends 4 2012/06/07 13:51:54;<br> cltt 3 2012/06/06 13:51:54;<br> binding state active;<br> next binding state free;<br> rewind binding state free;<br> hardware ethernet 52:54:00:19:ec:6a;<br> uid "si3000-ast";<br>}<br><br>For some reason there are 2 leases, by the way..<br><br>dhcpd is started as:<br>/usr/local/sbin/dhcpd -q -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid<br>eth2<br><br># cat /etc/dhcp/dhcpd.conf<br>ddns-update-style none;<br>authoritative;<br>log-facility local7;<br><br>subnet 192.168.10.0 netmask 255.255.255.0 {<br>       default-lease-time 3600;<br>       max-lease-time 86400;<br>       option routers 192.168.10.1;<br>       option broadcast-address 192.168.10.255;<br>       option subnet-mask 255.255.255.0;<br><br>       range 192.168.10.50 192.168.10.60; }<br><br>interface config:<br># ifconfig eth2<br>eth2      Link encap:Ethernet  HWaddr 52:54:00:84:e1:f0<br>         inet addr:192.168.10.10  Bcast:192.168.10.255  Mask:255.255.255.0<br>         inet6 addr: fe80::5054:ff:fe84:e1f0/64 Scope:Link<br>         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>         RX packets:118587 errors:0 dropped:0 overruns:0 frame:0<br>         TX packets:53132 errors:0 dropped:0 overruns:0 carrier:0<br>         collisions:0 txqueuelen:1000<br>         RX bytes:142578657 (135.9 MiB)  TX bytes:3534057 (3.3 MiB)<br><br>No firewall rules blocking traffic:<br># iptables -nvL<br>Chain INPUT (policy ACCEPT 6455 packets, 945K bytes)<br> pkts bytes target     prot opt in     out     source<br>destination<br>   0     0 ACCEPT     all  --  lo     *       <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br>99037   68M ACCEPT     all  --  *      *       <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>            state RELATED,ESTABLISHED<br><br>Chain FORWARD (policy ACCEPT 5 packets, 260 bytes)<br> pkts bytes target     prot opt in     out     source<br>destination<br>11017 1709K ACCEPT     all  --  *      *       <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>            state RELATED,ESTABLISHED<br>   0     0 ACCEPT     all  --  vlan4081 ppp+    <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br>   0     0 ACCEPT     all  --  vlan4082 ppp+    <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br>   0     0 ACCEPT     all  --  vlan4083 ppp+    <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><br>Chain OUTPUT (policy ACCEPT 104K packets, 64M bytes)<br> pkts bytes target     prot opt in     out     source<br>destination<br><br>I'm using ISC dhcpd 4.2.4 downloaded from official site and built from<br>source.<br>OS i'm using is Debian Linux Wheezy.<br><br>Client uses the same OS and standard isc dhclient.<br><br>From client side:<br><br>#ifup eth0<br>Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet<br>Systems Consortium.<br>All rights reserved.<br>For info, please visit <a href="https://www.isc.org/software/dhcp/" target="_blank">https://www.isc.org/software/dhcp/</a><br><br>Listening on LPF/eth0/52:54:00:19:ec:6a<br>Sending on   LPF/eth0/52:54:00:19:ec:6a<br>Sending on   Socket/fallback<br>DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 DHCPREQUEST on<br>eth0 to 255.255.255.255 port 67 DHCPOFFER from <a href="tel:192.168.10.10">192.168.10.10</a> DHCPACK from<br><a href="tel:192.168.10.10">192.168.10.10</a> bound to <a href="tel:192.168.10.50">192.168.10.50</a> -- renewal in 36240 seconds.<br><br>#ifdown eth0<br>Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet<br>Systems Consortium.<br>All rights reserved.<br>For info, please visit <a href="https://www.isc.org/software/dhcp/" target="_blank">https://www.isc.org/software/dhcp/</a><br><br>Listening on LPF/eth0/52:54:00:19:ec:6a<br>Sending on   LPF/eth0/52:54:00:19:ec:6a<br>Sending on   Socket/fallback<br>DHCPRELEASE on eth0 to <a href="tel:192.168.10.10">192.168.10.10</a> port 67<br><br>Could you please help fixing this?<br><br><br><br><br>_______________________________________________<br>dhcp-users mailing list<br><a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><o:p></o:p></p></div></div></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <br>Regards,<o:p></o:p></p><div><p class=MsoNormal>Mukund<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>