(Note, the title of the question Is there a way to classify DHCP requests based on the interface they're coming from? is what I want answered, but it doesn't actually ask that question for a non-dhcp relay situation, and the answer doesn't help here since I can't rely on a relay to set options for me).
I have a hypervisor (KVM) with isc-dhcpd at dom0, and I need to be able to PXE boot client VMs. This works fine for any one interface, but I can't seem to make it work for multiple interfaces - I have the following class for PXE:
class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
filename "pxelinux.0";
next-server 10.71.0.1;
}
The problem is that I have to pick which tftp interface I want to use for next-server
. I need clients to pick the tftp server on their own subnet or they can't boot (but otherwise they all look the same, unless I can find some kind of match discriminant). Is there a way to create a class which matches on both PXE and the subnet I'm about to lease, or the interface the packet came in on?