I'm trying to run a PXE server and encountering the “PXE-E51: No DHCP or proxyDHCP offers were received” error, which usually means that:
the PXE client did not receive a reply to its DHCPDISCOVER message. Possible causes for this problem are:
- There is no DHCP or BOOT server
- The DHCP or BOOTP server is not running
- The DHCP or BOOTP server is not configured to service your PXE client
- The DHCP or BOOTP server is located in a different subnet, and no DHCP or BOOTP forwarding mechanisms are in effect
My setup and configuration are very close to the ones specified in this similar question on ServerFault; the difference is that unlike the author of the question, I see absolutely no DHCPDISCOVER
in the logs of DHCP server, and dhcpdump -i eth0
shows nothing.
When I try to boot using a different machine, I see the DHCPDISCOVER
and DHCPOFFER
entries in the log, and the machine starts querying TFTP. The same thing happens when I boot a virtual machine through PXE.
This means, I believe, that the switch is not preventing DHCP traffic (also, DHCP Snooping is disabled). It also means that firewalls are configured correctly (to be sure, I disabled the firewalls on the host and the DHCP server).
If I disconnect the real machine from the switch, the PXE boot indicates explicitly that something is wrong with the connection, so this shouldn't be an issue with the Ethernet cable.
This excludes the first three possible causes. As for the fourth one, I'm not sure what should I check. The broadcast and netmask values are the same for the switch, the router, the host and the DHCP server.
This looks a lot like an STP issue, but STP is disabled on the switch.
What else do I need to check?
With port mirroring configured to mirror Tx/Rx to the port used by development machine, dhcpdump
displays the following:
TIME: 2016-06-08 22:34:12.722
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 01000000
SECS: 4
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:34:14.724
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 02000000
SECS: 6
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:34:18.729
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 03000000
SECS: 10
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:34:26.739
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 04000000
SECS: 18
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:34:42.759
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 05000000
SECS: 34
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:35:14.817
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 06000000
SECS: 66
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
TIME: 2016-06-08 22:36:18.800
IP: 0.0.0.0 (0:0:0:0:0:0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 07000000
SECS: 130
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 55 ( 24) Parameter Request List 1 (Subnet mask)
2 (Time offset)
3 (Routers)
5 (Name server)
6 (DNS server)
11 (Resource location server)
12 (Host name)
13 (Boot file size)
15 (Domainname)
16 (Swap server)
17 (Root path)
18 (Extensions path)
43 (Vendor specific info)
54 (Server identifier)
60 (Vendor class identifier)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
OPTION: 57 ( 2) Maximum DHCP message size 1260
OPTION: 97 ( 17) UUID/GUID 0000020003000400 ........
0500060007000800 ........
09 .
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
---------------------------------------------------------------------------
By comparison, here's the dump from when a virtual machine successfully boots from PXE:
TIME: 2016-06-08 22:43:33.301
IP: 0.0.0.0 (52:54:0:7c:82:35) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: e5cf9a4f
SECS: 4
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 52:54:00:7c:82:35:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 57 ( 2) Maximum DHCP message size 1472
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
OPTION: 77 ( 4) User-class Identification 69505845 iPXE
OPTION: 55 ( 21) Parameter Request List 1 (Subnet mask)
3 (Routers)
6 (DNS server)
7 (Log server)
12 (Host name)
15 (Domainname)
17 (Root path)
43 (Vendor specific info)
60 (Vendor class identifier)
66 (TFTP server name)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
175 (???)
203 (???)
OPTION: 175 ( 48) ??? b1050110ec813918 ......9.
0101220101190101 ..".....
210101100102eb03 !.......
0100001301011401 ........
0111010117010115 ........
0101270101120101 ..'.....
OPTION: 61 ( 7) Client-identifier 01:52:54:00:7c:82:35
OPTION: 97 ( 17) UUID/GUID 00b818a0926b2af5 .....k*.
e854b1abacc0fd2d .T.....-
ba .
---------------------------------------------------------------------------
TIME: 2016-06-08 22:43:34.302
IP: 0.0.0.0 (52:54:0:7c:82:35) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: e5cf9a4f
SECS: 8
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 52:54:00:7c:82:35:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 57 ( 2) Maximum DHCP message size 1472
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
OPTION: 77 ( 4) User-class Identification 69505845 iPXE
OPTION: 55 ( 21) Parameter Request List 1 (Subnet mask)
3 (Routers)
6 (DNS server)
7 (Log server)
12 (Host name)
15 (Domainname)
17 (Root path)
43 (Vendor specific info)
60 (Vendor class identifier)
66 (TFTP server name)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
175 (???)
203 (???)
OPTION: 175 ( 48) ??? b1050110ec813918 ......9.
0101220101190101 ..".....
210101100102eb03 !.......
0100001301011401 ........
0111010117010115 ........
0101270101120101 ..'.....
OPTION: 61 ( 7) Client-identifier 01:52:54:00:7c:82:35
OPTION: 97 ( 17) UUID/GUID 00b818a0926b2af5 .....k*.
e854b1abacc0fd2d .T.....-
ba .
---------------------------------------------------------------------------
TIME: 2016-06-08 22:43:34.302
IP: 192.168.1.40 (52:54:0:ed:3d:b7) > 192.168.1.249 (52:54:0:7c:82:35)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: e5cf9a4f
SECS: 4
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 192.168.1.249
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 52:54:00:7c:82:35:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: pxelinux.0.
OPTION: 53 ( 1) DHCP message type 2 (DHCPOFFER)
OPTION: 54 ( 4) Server identifier 192.168.1.40
OPTION: 51 ( 4) IP address leasetime 43200 (12h)
OPTION: 1 ( 4) Subnet mask 255.255.254.0
OPTION: 3 ( 4) Routers 192.168.1.1
OPTION: 6 ( 8) DNS server 192.168.1.3,192.168.1.4
---------------------------------------------------------------------------
TIME: 2016-06-08 22:43:36.405
IP: 0.0.0.0 (52:54:0:7c:82:35) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: e5cf9a4f
SECS: 14
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 52:54:00:7c:82:35:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 3 (DHCPREQUEST)
OPTION: 57 ( 2) Maximum DHCP message size 1472
OPTION: 93 ( 2) Client System 0000 ..
OPTION: 94 ( 3) Client NDI 010201 ...
OPTION: 60 ( 32) Vendor class identifier PXEClient:Arch:00000:UNDI:002001
OPTION: 77 ( 4) User-class Identification 69505845 iPXE
OPTION: 55 ( 21) Parameter Request List 1 (Subnet mask)
3 (Routers)
6 (DNS server)
7 (Log server)
12 (Host name)
15 (Domainname)
17 (Root path)
43 (Vendor specific info)
60 (Vendor class identifier)
66 (TFTP server name)
67 (Bootfile name)
128 (???)
129 (???)
130 (???)
131 (???)
132 (???)
133 (???)
134 (???)
135 (???)
175 (???)
203 (???)
OPTION: 175 ( 48) ??? b1050110ec813918 ......9.
0101220101190101 ..".....
210101100102eb03 !.......
0100001301011401 ........
0111010117010115 ........
0101270101120101 ..'.....
OPTION: 61 ( 7) Client-identifier 01:52:54:00:7c:82:35
OPTION: 97 ( 17) UUID/GUID 00b818a0926b2af5 .....k*.
e854b1abacc0fd2d .T.....-
ba .
OPTION: 54 ( 4) Server identifier 192.168.1.40
OPTION: 50 ( 4) Request IP address 192.168.1.249
---------------------------------------------------------------------------
TIME: 2016-06-08 22:43:36.405
IP: 192.168.1.40 (52:54:0:ed:3d:b7) > 192.168.1.249 (52:54:0:7c:82:35)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: e5cf9a4f
SECS: 14
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 192.168.1.249
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 52:54:00:7c:82:35:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: pxelinux.0.
OPTION: 53 ( 1) DHCP message type 5 (DHCPACK)
OPTION: 54 ( 4) Server identifier 192.168.1.40
OPTION: 51 ( 4) IP address leasetime 43200 (12h)
OPTION: 1 ( 4) Subnet mask 255.255.254.0
OPTION: 3 ( 4) Routers 192.168.1.1
OPTION: 6 ( 8) DNS server 192.168.1.3,192.168.1.4
---------------------------------------------------------------------------
Best Answer
The relevant line in
dhcpdump
was:It appeared that the motherboard was faulty, which resulted in the lack of MAC address during PXE boot. In turn, this meant that all the
DHCPDISCOVER
requests from the client machine were sent without a validCHADDR
, and so never reached the DHCP server, for the reason I don't actually understand (I would understand if they will reach the DHCP server, but the server will decide not to reply).Force-writing the MAC address solved the problem.