Issue in dhclient -x option

"Rathnakar, Dilip" <[email protected]> Mon, 13 May 2024 10:15:20 +0000
Newsgroups gmane.network.dhcp.isc.dhcp-client
Message-ID <PH0PR84MB1786E308A59B52C0EB8E6BC383E22__22198.2908363984$1715595348$gmane$org@PH0PR84MB1786.NAMPRD84.PROD.OUTLOOK.COM>
--===============4208969637804716665==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_PH0PR84MB1786E308A59B52C0EB8E6BC383E22PH0PR84MB1786NAMP_"

--_000_PH0PR84MB1786E308A59B52C0EB8E6BC383E22PH0PR84MB1786NAMP_
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable

Hi,

As per dhclient (isc-dhclient-4.4.1) man-page, the "dhclient -x" option sho=
uld do the following:
"Stop the running DHCP client without releasing the current lease. Kills ex=
isting dhclient process as previously recorded in the PID file. When shutdo=
wn via this method dhclient-script will be executed with the specific reaso=
n for calling the script set."

However, this is not working as expected. It is sending a DHCP release pack=
et during exit.

Steps to reproduce the behaviour:
1. Start dhclient using: "dhclient -d -q  -cf /var/db/dhclient-eth0.conf -l=
f /var/db/dhclient-eth0.leases -pf /var/db/dhclient-eth0.pid eth0"
2. Ensure dhclient process is running and IP address is acquired.
3. Stop dhclient using: "dhclient -x -pf /var/db/dhclient-eth0.pid -lf /var=
/db/dhclient-eth0.leases eth0"
4. Observe release packet in wireshark.


**Expected behavior**
Should stop running of DHCP client without releasing the current lease. (No=
 Release packet should be sent)

**Actual behavior***
Release packet sent.

**Environment:**
- ISC DHCP version: isc-dhclient-4.4.1
 - OS: Ubuntu 16.04

Is this a known issue or is there a workaround for this?
Any inputs would be appreciated.

Thanks,
Dilip

--_000_PH0PR84MB1786E308A59B52C0EB8E6BC383E22PH0PR84MB1786NAMP_
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
=09{font-family:"Cambria Math";
=09panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
=09{font-family:DengXian;
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
=09{font-family:Calibri;
=09panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
=09{font-family:"\@DengXian";
=09panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
=09{margin:0cm;
=09font-size:11.0pt;
=09font-family:"Calibri",sans-serif;
=09mso-ligatures:standardcontextual;}
span.EmailStyle17
=09{mso-style-type:personal-compose;
=09font-family:"Calibri",sans-serif;
=09color:windowtext;}
.MsoChpDefault
=09{mso-style-type:export-only;}
@page WordSection1
=09{size:612.0pt 792.0pt;
=09margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
=09{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-IN" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US">Hi,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal">As per dhclient (isc-dhclient-4.4.1) man-page, the &=
quot;dhclient -x&quot; option should do the following:
<o:p></o:p></p>
<p class=3D"MsoNormal">&quot;Stop the running DHCP client without releasing=
 the current lease. Kills existing dhclient process as previously recorded =
in the PID file. When shutdown via this method dhclient-script will be exec=
uted with the specific reason for calling
 the script set.&quot;<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">However, this is not working as expected. It is send=
ing a DHCP release packet during exit.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Steps to reproduce the behaviour:<o:p></o:p></p>
<p class=3D"MsoNormal">1. Start dhclient using: &quot;dhclient -d -q&nbsp; =
-cf /var/db/dhclient-eth0.conf -lf /var/db/dhclient-eth0.leases -pf /var/db=
/dhclient-eth0.pid eth0&quot;<o:p></o:p></p>
<p class=3D"MsoNormal">2. Ensure dhclient process is running and IP address=
 is acquired.<o:p></o:p></p>
<p class=3D"MsoNormal">3. Stop dhclient using: &quot;dhclient -x -pf /var/d=
b/dhclient-eth0.pid -lf /var/db/dhclient-eth0.leases eth0&quot;<o:p></o:p><=
/p>
<p class=3D"MsoNormal">4. Observe release packet in wireshark.<o:p></o:p></=
p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">**Expected behavior**<o:p></o:p></p>
<p class=3D"MsoNormal">Should stop running of DHCP client without releasing=
 the current lease. (No Release packet should be sent)<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">**Actual behavior***<o:p></o:p></p>
<p class=3D"MsoNormal">Release packet sent. <o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"FR">**Environment:**<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"FR">- ISC DHCP version: isc-dhclient-4=
.4.1 <o:p>
</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"FR">&nbsp;</span>- OS: Ubuntu 16.04<o:=
p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Is this a known issue or is there a workaround for t=
his?<o:p></o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Any inputs would be appreciated=
.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Thanks,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Dilip<o:p></o:p></span></p>
</div>
</body>
</html>

--_000_PH0PR84MB1786E308A59B52C0EB8E6BC383E22PH0PR84MB1786NAMP_--


--===============4208969637804716665==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users

--===============4208969637804716665==--