Dhcp

PXE 引導 Linux。PXE-E51:未收到 DHCP 或 proxyDHCP 提供

  • December 5, 2012

我試圖讓一個 ubuntu 盒子(192.168.10.9)充當 PXE 伺服器,但我無法讓 DHCP 工作。

PXE 伺服器連接到充當交換機的 SOHO 路由器 (192.168.10.1)。

我已禁用路由器上的 DHCP 伺服器。

$ dhcpd --version
isc-dhcpd-4.2.4

的內容/etc/dhcp/dhcpd.conf

ddns-update-style none;

option domain-name-servers 192.168.10.1;

default-lease-time 3600;
max-lease-time 7200;

authoritative;

log-facility local7;

allow booting;
allow bootp;

subnet 192.168.10.0 netmask 255.255.255.0 {
  range dynamic-bootp 192.168.10.101 192.168.10.200;
  option routers 192.168.10.1;
  option broadcast-address 192.168.10.255;
  next-server 192.168.10.9;

  filename "/tftpboot/pxelinux.0";
}

的內容/etc/default/isc-dhcp-server

INTERFACES="eth0"

當客戶端啟動時,它會嘗試從伺服器獲取 IP 地址,但失敗並顯示以下錯誤消息:

PXE-E51: No DHCP or proxyDHCP offers were received.

/var/log/syslog在伺服器端,我在客戶端嘗試啟動 時拖尾:

Dec  4 12:57:10 athspk-Dell dhcpd: DHCPDISCOVER from 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:11 athspk-Dell dhcpd: DHCPOFFER on 192.168.10.101 to 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:12 athspk-Dell dhcpd: DHCPDISCOVER from 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:12 athspk-Dell dhcpd: DHCPOFFER on 192.168.10.101 to 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:17 athspk-Dell dhcpd: DHCPDISCOVER from 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:17 athspk-Dell dhcpd: DHCPOFFER on 192.168.10.101 to 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:25 athspk-Dell dhcpd: DHCPDISCOVER from 00:1f:d0:8e:6b:db via eth0
Dec  4 12:57:25 athspk-Dell dhcpd: DHCPOFFER on 192.168.10.101 to 00:1f:d0:8e:6b:db via eth0

DHCP 伺服器提供了一個地址,但如果它無法提取啟動映像,韌體將會出錯(神秘地)。仔細查看 192.168.0.9 上的 tftp 伺服器設置。我不確定您使用的是哪個 tftp 伺服器,但通常路徑是相對於在啟動時傳遞給守護程序的目錄,而不是絕對路徑。在另一台機器上啟動 tftp 客戶端並嘗試從同一目錄下載文件以確認功能正常。

或者,嘗試執行數據包擷取以準確觀察 DHCP 伺服器向客戶端提供的內容以及客戶端正在採取的操作。

引用自:https://serverfault.com/questions/454882