Dhcp vendor class question
-
I have set the
set vendor-string = option vendor-class-identifier;
option in dhcpd.conf to show vendor classes in DHCP logs.
I am trying to figure out what 0, 20 refers to in the line “match if substring(option vendor-class-identifier, 0, 20) = “PXEClient:Arch:00000”;” in the dhcpd.conf file.class "Legacy" { match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000"; filename "undionly.kkpxe"; }
Thanks!
-
@Greg-Plamondon
They talk about that here: https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence#Building_custom_DHCP_Classes_for_co-existence_with_FOGBasically, it means start at character 0 and go 20 characters after that, then compare what you see in those 20 characters to the following string.
-
While I don’t know for absolute off the top of my head, most substring fuctions take a starting posititon and then number of characters. So that would be to start as position 0 and take the next 20 characters.
Is there something special you are trying to do?
-
I have some HP EliteDesk 705 G5 PC’s that are giving me grief on PXE booting.
If I use uefi to boot it works. I need to use legacy pxe.
I get a messages that says:Configuring (net0 xx:xx:xx:xx:xx:xx)........ No configuration methods succeeded (http://ipxe.org/040ee119) DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds
I am trying to configure a dhcp section for the EliteBooks.
so far i have this:class "EliteDesk" { match if substring(option vendor-class-identifier, 0, 8) = "MSFT 5.0"; filename "realtek.kpxe"; }
But i am not sure if it is correct or if it’s being used.
-
@Greg-Plamondon My bet is that is not your problem here. But lets grab a pcap (packet capture) of the broken pxe booting process. That will tell us what the pxe booting computer is being told and then doing with it. If your FOG server and pxe booting computer is on the same subnet we can get the best possible answer by following this tutorial:
https://forums.fogproject.org/topic/9673/when-dhcp-pxe-booting-process-goes-bad-and-you-have-no-clueUpload the pcap to the forum, or a file share site (shared publicly with the link) and either post the link here or DM me in the forum and I’ll take a quick look a the pcap for you.
-
-
@Greg-Plamondon Ok lets switch over to chat because its faster.
-
@george1421 ok so lets wrap this thread up nice and neat.
On the
HP EliteDesk 705 G5
computers, they for what ever reason, do not like the unidonly.kpxe iPXE boot loader. iPXE undionly.kpxe will issue a dhcp request and the dhcp servers will send an OFFER packet but iPXE rejects the offer and just sends a DISCOVER packet again. And it continues over and over with the DISCOVER and receiving an OFFER but rejecting the given OFFER.We did find that ipxe.kpxe did work correctly on these HP systems. So this kind of tells me the UNDI firmware driver in the network adapter is faulty. I’m suspecting a future firmware update will address the issue. In the mean time we had to work out a solution to send ipxe.kpxe to these computers only and send undionly.kpxe to all other bios based systems. Luckily the OP had linux dhcp servers on this subnet so we set out to see if we can identify these systems based on their UUID. Through testing unfortunately the UUID on these HP systems are globally unique instead of encoding the model and unique ID in the UUID field like Dell does. So the OP settled on identifying the systems based on mac prefix. This is the following setting we added to the isc-dhcp server on his network.
class “Legacy-hpbroken” { match if (substring(option vendor-class-identifier, 0, 20) = “PXEClient:Arch:00000”) and (substring(hardware, 1, 3) = 00:01:02;); filename “ipxe.kkpxe”; }