我有一个ESXi VM在Debian9的最新版本上运行一个tftpd服务器,用于网络PXE环境。为了测试目的,我配置了另一个VM来使用isc- DHCP -服务器(带有next-server和bootfile指令)来处理Debian 9上的dhcp。使用没有操作系统的第三个VM,我可以在没有问题的情况下将PXE引导到服务器。但是,在网络(特别是Ubiquiti EdgeRouter)上实现PXE时,PXE服务器无法工作,除非修改tftpd配置。
如果我从tftpd文件中注释掉TFTP_OPTIONS="--secure"行,服务器将与EdgeRouter一起正常工作。我还尝试将以下配置行添加到EdgeRouter配置文件中,但没有结果:
subnet-parameters "filename "/srv/tftp/pxelinux.0";"
subnet-parameters "filename ;pxelinux.0";"我被引导相信这个问题源于EdgeRouter是如何将DHCP选项传递给客户端的,但是是什么导致了这个问题,以及我如何解决它呢?我意识到我可以让secure选项被禁用,但我不想这样做。我也尝试将全部和部分路径添加到路由器配置中。
错误:
TFTP.
PXE-T01: File not found
PXE-E3B: TFTP Error - File Not found
PXE-M0F: Exiting Intel PXE ROM.
Operating System not found/etc/default/tftpd-hpa:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"/srv/tftp:
$ ls -alh
total 20K
drwxrwxr-x 3 root root 4.0K Mar 4 14:38 .
drwxr-xr-x 3 root root 4.0K Apr 18 00:37 ..
drwxrwxr-x 3 root root 4.0K Mar 4 14:38 debian-installer
lrwxrwxrwx 1 root root 47 Mar 4 14:38 ldlinux.c32 -> debian-installer/amd64/boot-screens/ldlinux.c32
lrwxrwxrwx 1 root root 33 Mar 4 14:38 pxelinux.0 -> debian-installer/amd64/pxelinux.0
lrwxrwxrwx 1 root root 35 Mar 4 14:38 pxelinux.cfg -> debian-installer/amd64/pxelinux.cfg
-rw-r--r-- 1 root root 79 Apr 18 00:41 test
-rw-rw-r-- 1 root root 62 Mar 4 14:38 version.info/config/config.boot:
dhcp-server {
disabled false
hostfile-update disable
shared-network-name LAN {
authoritative enable
subnet 192.168.1.0/24 {
bootfile-name pxelinux.0
bootfile-server 192.168.1.94
default-router 192.168.1.1
dns-server 192.168.1.1
lease 86400
start 192.168.1.1 {
stop 192.168.1.127
}
unifi-controller 192.168.1.225
}
}
use-dnsmasq disable
}
...
}发布于 2018-04-19 13:44:40
--secure, -s
Change root directory on startup. This means the remote host does not
need to pass along the directory as part of the transfer, and may add
security. When --secure is specified, exactly one directory should be
specified on the command line. The use of this option is recommended
for security as well as compatibility with some boot ROMs which cannot
be easily made to include a directory name in its request.前一个参数可以与您的问题相关的唯一一点是使用不同的DHCP服务器bootfile参数。
Wireshark的流量捕获会告诉你:
https://serverfault.com/questions/908395
复制相似问题