Specfying lease time in DHCP request packet
<p>I am trying to create a Dhcp request packet using scapy. Is there any way in which I can specify DHCP lease time in my request packet?</p>

<p>Put option #51, with the desired lease time as its value, in the <code>options</code> section of the <code>DHCPREQUEST</code> or <code>DHCPDISCOVER</code> packet.</p>

<p>From <a href="http://www.freesoft.org/CIE/RFC/2131/16.htm" rel="nofollow">RFC 2131 Section 3.5</a>:</p>

<blockquote>
  <p>In addition, the client may suggest values for the network address and lease time in the DHCPDISCOVER message. The client may include the 'requested IP address' option to suggest that a particular IP address be assigned, and may include the 'IP address lease time' option to suggest the lease time it would like.</p>
</blockquote>

python networking scapy dhcp