Hi,<div><br></div><div>If you check "man dhclient" you will be able to see</div><div><br></div><div>"" 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</div>
<div> 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."""</div><div><br></div><div>Running dhclient with -r flag will release the IP address.</div>
<div><br></div><div>/usr/sbin/dhclient -r <portname> should work.</div><div><br></div><div>I hope this helps.</div><div><br></div><div>Regards,</div><div>SMS<br><br><div class="gmail_quote">On Thu, Jun 14, 2012 at 11:29 AM, Евгений Ерофеев <span dir="ltr"><<a href="mailto:e.erofeev@tr.center.rt.ru" target="_blank">e.erofeev@tr.center.rt.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all!<br>
<br>
Does anyone have any ideas regarding problem below?<br>
<div class="HOEnZb"><div class="h5"><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" value="+911921681010">192.168.10.10</a> -> <a href="tel:192.168.10.50" value="+911921681050">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" value="+911921681010">192.168.10.10</a> -> <a href="tel:192.168.10.50" value="+911921681050">192.168.10.50</a> DHCP 342 DHCP ACK -<br>
Transaction ID 0x84015146<br>
5.358745 <a href="tel:192.168.10.50" value="+911921681050">192.168.10.50</a> -> <a href="tel:192.168.10.10" value="+911921681010">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" value="+911921681050">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" value="+911921681050">192.168.10.50</a> <a href="tel:%28192.168.10.10" value="+911921681010">(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" value="+911921681050">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" value="+911921681010">192.168.10.10</a> DHCPACK from<br>
<a href="tel:192.168.10.10" value="+911921681010">192.168.10.10</a> bound to <a href="tel:192.168.10.50" value="+911921681050">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" value="+911921681010">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></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>Mukund</div>
<br>
</div>