UEFI 客户端的 DnsMasq、DHCP 代理、PXE 出现问题

UEFI 客户端的 DnsMasq、DHCP 代理、PXE 出现问题

我正在尝试使用 dnsmasq 设置 PXE 服务器作为 dhcp-proxy。

它与 client-arch=0(x86 传统客户端)配合良好,但 UEFI 客户端甚至不会终止与 PXE 服务器的 DHCP 数据包交换,并且在这些较新的客户端上甚至不会出现 pxe-prompt(使用 dnsmasq 设置)。

我已经使用 Wireshark 转储了 PXE 服务器和客户端之间的 DHCP 对话,我看到了一些差异,但我不明白为什么只有旧客户端才能成功连接到我的服务器。

PXE 服务器和旧式 BIOS 客户端之间的 DHCP 消息转储(作品!)

PXE 服务器和 UEFI 客户端之间的 DHCP 消息转储(不起作用:()

我在网上找不到可行的配置:按照很多示例,我得到的是 UEFI 系统不与 PXE 服务器交换最终的 REQUEST/ACK。

Dnsmasq 配置:

port=0
interface=bond
log-dhcp
dhcp-range=192.168.1.200,proxy,255.255.255.0
dhcp-no-override

dhcp-option=vendor:,6,2b

pxe-prompt="Press any key for boot menu", 5

dhcp-match=set:x86PC, option:client-arch, 0
dhcp-match=set:BC_EFI, option:client-arch, 7

pxe-service=tag:x86PC,x86PC, "Legacy BIOS PXE", bios/pxelinux
pxe-service=tag:BC_EFI,BC_EFI, "UEFI PXE", efi64/syslinux.efi

dhcp-boot=tag:x86PC, bios/pxelinux.0
dhcp-boot=tag:BC_EFI, efi64/syslinux.efi

有解决办法吗?

编辑:我正在使用 2.76 版本,支持 UEFI(请参阅官方网站上的更改日志)。

EDIT2:我的 UEFI 客户端被归类为 PXEClient:Arch:00007(因此,BC_EFI 是正确的 dnsmasq arch 标签)。

答案1

DnsMasq proxyDHCP 在 UEFI 环境中不起作用:

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2015q4/009907.html

EDIT_1 如果你正在使用支持 UEFI 的新 DnsMasq,请尝试添加缺失的架构 9

 dhcp-match=set:EFI_ x86-64, option:client-arch, 9

UEFI 64 客户端也使用 9 作为架构。

编辑_2

请以此为基础进行配置

# Don't function as a DNS server:
port=0

# Log lots of extra information about DHCP transactions.
log-dhcp

# Set the root directory for files available via FTP.
tftp-root=/tftpboot

# Disable re-use of the DHCP servername and filename fields as extra
# option space. That's to avoid confusing some old or broken DHCP clients.
dhcp-no-override

# The boot filename, Server name, Server Ip Address
dhcp-boot=bios/pxelinux,,192.168.1.200

# PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
# pxe-prompt="Booting PXE Client", 1

# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
# Intel_Lean_Client, IA32_EFI, ARM_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
# This option is first and will be the default if there is no input from the user.

# PXEClient:Arch:00000
pxe-service=X86PC, "Boot BIOS PXE", bios/pxelinux

# PXEClient:Arch:00007
pxe-service=BC_EFI, "Boot UEFI PXE-BC", efi64/syslinux.efi

# PXEClient:Arch:00009
pxe-service=X86-64_EFI, "Boot UEFI PXE-64", efi64/syslinux.efi

dhcp-range=192.168.1.200,proxy,255.255.255.0

来源 https://wiki.fogproject.org/wiki/index.php?title=ProxyDHCP_with_dnsmasq (在基本脚本中添加UEFI支持)

相关内容