iKuai爱快流控路由

标题: 希望爱快的DHCP服务器的Option60和Option67可以配合起来 [打印本页]

作者: 丿零灬    时间: 2023-9-29 16:50
标题: 希望爱快的DHCP服务器的Option60和Option67可以配合起来
希望爱快的DHCP服务器的Option60和Option67可以配合起来,能够根据客户端DHCP报文中的信息来告诉客户端不同的启动文件名。比如,如果客户端是Legacy BIOS模式,则bootfile的值需为 undionly.kpxe, 如果是UEFI模式,则bootfile的值需为 boot.kpxe 等,现在使用爱快,需要我手动指定,75:6e:64:69:6f:6e:6c:79:2e:6b:70:78:65或者62:6f:6f:74:2e:6b:70:78:65,在局域网中同时存在UEFI和BIOS启动的场景不能兼得。
希望可以像在Linux下的DHCP服务一样:



subnet 10.0.0.0 netmask 255.255.255.0 {
    option routers 10.0.0.254;
    range 10.0.0.2 10.0.0.253;


    class "pxeclients" {
        match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
        next-server 10.0.0.1;


        if option architecture-type = 00:07 {
            filename "boot.kpxe";
        } else {
            filename "undionly.kpxe";
        }
    }
}



Windows下也可以
[attach]176612[/attach][attach]176613[/attach][attach]176614[/attach][attach]176615[/attach][attach]176616[/attach][attach]176617[/attach][attach]176618[/attach][attach]176619[/attach]










作者: 梦寻凌雪    时间: 2023-10-4 20:38
支持支持
作者: xiaohhl    时间: 2023-11-10 02:45
UEFI
If you have machines which attempt to perform a UEFI network boot, then download http://boot.ipxe.org/ipxe.efi and save it to your TFTP server directory.

You will need to configure your DHCP server to hand out undionly.kpxe as the boot file to BIOS machines and ipxe.efi as the boot file to UEFI machines. If you are using ISC dhcpd then edit /etc/dhcpd.conf to contain

  option client-arch code 93 = unsigned integer 16;
  if option client-arch != 00:00 {
     filename "ipxe.efi";
  } else {
     filename "undionly.kpxe";
  }
  next-server X.X.X.X;
where X.X.X.X is the IP address of your TFTP server.

Note that UEFI network booting tends to be substantially slower than BIOS network booting, due to fundamental architectural limitations in UEFI. Most UEFI systems provide the ability to perform a network boot in a BIOS compatibility mode. You may wish to upgrade your system to use BIOS mode for network booting.
作者: xiaohhl    时间: 2023-11-10 02:49
其实需求的描述很简单:根据DHCP的请求信息,判断如果是legacy,我们就指定一个legacy支持的引导文件,如果是UEFI,就指定一个EFI支持的引导文件,避免服务器需要人工切换名字。




欢迎光临 iKuai爱快流控路由 (https://bbs.ikuai8.com/) Powered by Discuz! X3.3