所以我遇到了問題。
我用 Debian9 設定了一個路由器,它的任務是網路中的客戶端能夠從 PXE 伺服器啟動(PXE 伺服器在另一個網路上)我聽說過。關於IP-Helper RelayAgent
但我沒有找到任何解決我的問題的文檔,我找到的所有文檔都是針對同一網路中的 PXE 伺服器的。
順便說一句,PXE 伺服器存在,但位於網路 A 中,我只需確保網路 B 上的用戶端可以從該伺服器啟動。
我做了很多研究但沒有發現任何東西:(
@安德烈亞斯·羅格
所以我在互聯網上查找...我將像這樣配置我的 dhcp.conf...
allow booting;
allow bootp;
subnet 10.5.200.0 netmask 255.255.255.0 {
option domain-name-servers 10.5.200.254;
option broadcast-address 10.5.200.255;
option subnet-mask 255.255.255.0;
option routers 10.5.200.254;
range 10.5.200.100 10.5.200.200;
# group {
# next-server the TFTP server address/pxe server;
# filename "filename";
#
#
# host ubuntu {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address 10.5.200.10; }
}
}
我的relay.conf是這樣的:
# Defaults for isc-dhcp-relay initscript
# sourced by /etc/init.d/isc-dhcp-relay
# installed at /etc/default/isc-dhcp-relay by the maintainer scripts
#
# This is a POSIX shell fragment
#
# What servers should the DHCP relay forward requests to?
SERVERS="10.5.200.254"
# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
INTERFACES="enp16s0"
# Additional options that are passed to the DHCP relay daemon?
OPTIONS=""
網路/介面:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
#test
#Member Network A
auto enp0s25
iface enp0s25 inet static
address 40.4.200.252
netmask 255.255.255.0
gateway 40.4.200.254
#My NEW NETWORK B
auto enp16s0
iface enp16s0 inet static
address 10.5.200.254
netmask 255.255.255.0
答案1
PXE 需要兩個東西:DHCP 和 TFTP。
由於 TFTP 只是可路由的 UDP 封包,因此如果您在路由器上設定了 IP 轉送並正確設定了防火牆規則,那麼這將會起作用。
您缺少的是其他網路中的 DHCP。設定起來非常簡單:將該網路新增至 dhcp 伺服器,並提供 PXE 所需的所有選項(正如您在第一個網路中所做的那樣,您將知道如何執行此操作)。最後,您需要在路由器上安裝並設定 dhcp 中繼代理。這會將網路 B 上廣播的 DHCP 請求轉送到 DHCP 伺服器。
答案2
您可以將子網路 B 的位址放入 debian-server 並讓 tftp 伺服器偵聽所有位址或介面嗎?或如果需要的話可以使用網關或代理程式。