Windows – PXE boot fails to get IP address via DHCP, but DHCP works when OS booted

dhcppxe-bootwindows

I'm trying to PXE-boot a Cisco UCS C240 server to install a new OS over the network, but it isn't picking up an IP address via DHCP during boot. I get the "No DHCP or proxyDHCP offers were received" error from the Intel Boot Agent. A tcpdump on the DHCP server shows no DHCP-related packets were received on the DHCP server machine:

tcpdump -n -e -i eth2 ether src FC:99:47:49:D4:9E or ether dst FC:99:47:49:D4:9E

However, when I boot the machine into the installed operating system (in this case, Windows Server 2012), and configure that network interface for DHCP, it gets an IP address from the DHCP server. If I leave tcpdump running, I see the following:

13:34:36.525646 fc:99:47:49:d4:9e > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 126: 169.254.239.3.54275 > 255.255.255.255.111: UDP, length 84
13:34:40.118071 fc:99:47:49:d4:9e > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 110: 169.254.239.3.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
13:34:40.888206 fc:99:47:49:d4:9e > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 110: 169.254.239.3.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
13:34:40.975407 fc:99:47:49:d4:9e > 01:00:5e:00:00:fc, ethertype IPv4 (0x0800), length 66: 169.254.239.3.55524 > 224.0.0.252.5355: UDP, length 24
13:34:41.387736 fc:99:47:49:d4:9e > 01:00:5e:00:00:fc, ethertype IPv4 (0x0800), length 66: 169.254.239.3.55524 > 224.0.0.252.5355: UDP, length 24
13:34:41.418849 fc:99:47:49:d4:9e > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 358: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from fc:99:47:49:d4:9e, length 316
13:34:41.419144 60:73:5c:68:b4:b6 > fc:99:47:49:d4:9e, ethertype IPv4 (0x0800), length 342: 10.10.0.131.67 > 10.10.0.151.68: BOOTP/DHCP, Reply, length 300

What could cause DHCP to fail during the PXE boot process while succeeding when booted into the operating system? As far as I can tell, PXE is using the same network interface that Windows is. At least, the MAC address that is reported during PXE boot is the same as the MAC address that gets the IP via DHCP when Windows is up.

Best Answer

I've seen Portfast (or the lack thereof) cause this. Enabling Portfast on the ports between the DHCP client and server resolved the problem for me.

The other time you may see this issue is with Pre-Boot Execution (PXE) devices, such as Windows Deployment Services. The following figure shows a typical PXE implementation. Here is what happens with PXE:

You apply power to your computer, which activates the NIC, but less than five seconds later, the computer’s POST finishes and the NIC attempts to get an IP address from DHCP so that it can load a boot image directly from the PXE server, which fails.

The computer attempts to get an IP address from a DHCP server several times within approximately 10 seconds, after which it gives up and moves onto another boot device, such as the hard drive. The unfortunate part of this process is that because it fails to get an IP address or connect with the PXE server, you are not able to install your new operating system image on that computer.

The problem with this scenario is that because STP makes the computer wait 45 seconds prior to forwarding traffic on the port, the PXE network boot has timed out. image0.jpg PortFast is the solution to this problem of delays when client computers are connecting to switches. PortFast is not enabled by default. With PortFast enabled on a port, you effectively take the port and tell spanning tree not to implement STP on that port.

This solution is not a bad one if only one computer is plugged into the port — so that people will not be creating accidental loops on the network, which can be frighteningly easy to do.

http://www.dummies.com/how-to/content/spanning-tree-protocol-stp-and-portfast.html

Related Topic