-1

希望有人可以帮助我。

我有一个 DHCPD/PXE 服务器,它似乎为同一个 mac 地址分配了 2 个 IP 地址。

我需要分配 IP 地址的计算机是连续的

我试过“允许重复;” 和“拒绝重复;” 我可以看到唯一的区别是这个“uid”行。

除了这个烦恼——我的 dhcpd/pxe 服务器工作正常。

这是我的租赁文件中的一个片段:

lease 10.11.46.227 {
  starts 4 2014/10/02 15:01:06;
  ends 0 2150/11/08 21:29:20;
  cltt 4 2014/10/02 15:01:06;
  binding state active;
  next binding state free;
  hardware ethernet 00:1e:67:b9:32:f6;
  uid "\000\215\013\011b\345\227\021\343\270\270\000\036g\2712\366";
}
lease 10.11.46.228 {
  starts 4 2014/10/02 15:09:13;
  ends 0 2150/11/08 21:37:27;
  cltt 4 2014/10/02 15:09:13;
  binding state active;
  next binding state free;
  hardware ethernet 00:1e:67:b9:32:f6;
}

这是我的 dhcpd.conf

    allow booting;
    allow bootp;
    authoritive;
    deny duplicates;

    class "pxeclients" {
            match if substring(option vendor-class-identifier,0,9) = "PXEClient";
            next-server 10.11.0.1;
            filename "pxelinux.0";
    }

    subnet 10.11.0.0 netmask 255.255.0.0 {
            range 10.11.1.1 10.11.25.200;
            default-lease-time 4294967294;
            max-lease-time 4294967294;
            min-lease-time 4294967294;
    }

    # Pxe Server so it doesnt get changed.
    host masterPXE {
            hardware ethernet 00:1E:67:98:D5:EB;
            fixed-address 10.11.0.1;
    }
4

1 回答 1

0

我已经在内核选项中启用了 ip=dhcp 的 linux 系统看到了这一点,然后在用户空间中运行的辅助 dhcp 客户端重新请求了 IP 地址。

最简单的解决方案是将您的 max-lease-time 设置为 5 分钟左右,或者从用户端客户端中删除 dhcp 主机 ID,以便客户端看起来只是在请求另一个 DHCP 地址时已经有一。

于 2014-10-02T23:29:45.803 回答