在 CentOS 7 上,您可以使用以下步骤为 dhcpd 设置绑定多个组的最大值:

  1. 打开 dhcpd.conf 文件以编辑:

sudo vi /etc/dhcp/dhcpd.conf


2. 在文件中找到并编辑以下行:

#option definitions common to all supported networks... option dhcp-max-message-size 4096;


将 'dhcp-max-message-size' 的值更改为您想要的最大值。默认值为 4096 字节。

3. 在文件的末尾添加以下行来设置每个组的最大值:

subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.10 192.168.1.20; max-lease-time 86400; default-lease-time 86400; option routers 192.168.1.1; option domain-name-servers 8.8.8.8; max-lease-count 50; // 设置每个组的最大值 }

subnet 192.168.2.0 netmask 255.255.255.0 { range 192.168.2.10 192.168.2.20; max-lease-time 86400; default-lease-time 86400; option routers 192.168.2.1; option domain-name-servers 8.8.8.8; max-lease-count 100; // 设置每个组的最大值 }


您可以为每个子网设置不同的最大租约数量。

4. 保存并关闭文件。

5. 重新启动 dhcpd 服务以应用更改:

sudo systemctl restart dhcpd


现在,您已成功设置了 dhcpd 绑定多个组的最大值。
CentOS 7 DHCPd 设置绑定多个组的最大值

原文地址: https://www.cveoy.top/t/topic/qe2B 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录