在DHCP请求p中指定租用时间

2024-09-28 22:24:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用scapy创建一个Dhcp请求包。有什么方法可以在我的请求包中指定DHCP租约时间吗?在


Tags: 方法时间dhcpscapy租约试图用
1条回答
网友
1楼 · 发布于 2024-09-28 22:24:30

DHCPREQUESTDHCPDISCOVER包的options部分中,以期望的租赁时间为其值。在

来自RFC 2131 Section 3.5

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.

相关问题 更多 >