[Dnsmasq-discuss] help with 'tag' option for multiple subnets
Lindgren Fredrik
Fredrik.Lindgren at tieto.com
Thu Apr 19 07:54:23 BST 2018
Hi Jimmy,
You can have multiple tag checks for each statement
i.e:
# BIOS ipv4 PXE
dhcp-match=bios,option:client-arch, 0
dhcp-boot=tag:subnet1,tag:bios,pxelinux.0,reposerver,172.16.17.15
dhcp-boot=tag:subnet2,tag:bios,pxelinux.0,reposerver,192.168.17.15
# UEFI ipv4 PXE
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,tag:subnet2,EFI/bootx64.efi,reposerver,172.16.17.15
There are also tags automatically created for incoming interface
So if you have multiple interfaces on machine and get the DHCP requests for the different subnets from different interfaces you can use that to select which range to answer with
Otherwise you are using dhcp-relay and then there should be some indication from that, though haven't looked at any such setup so can't give examples for that.
Br,
Fredrik
________________________________
Från: Dnsmasq-discuss <dnsmasq-discuss-bounces at lists.thekelleys.org.uk> för Jimmy Vance <flhxs14 at gmail.com>
Skickat: den 18 april 2018 18:18
Till: dnsmasq-discuss at lists.thekelleys.org.uk
Ämne: [Dnsmasq-discuss] help with 'tag' option for multiple subnets
I have a simple dnsmasq configuration that handles PXE for BIOS PXE as well as UEFI PXE and this works well. I need to add a second subnet and planned on using the same system to act as the DHCP server for both subnets. I know how to add a tag to options, but for UEFI I already have a tag set, and cannot figure out how to add the proper tags to have these options serve both subnets properly
Current config
dhcp-range=set:subnet1,172.16.17.100,172.16.17.254,1d
dhcp-option=tag:subnet1,3,172.16.17.1
# BIOS ipv4 PXE
dhcp-boot=pxelinux.0,reposerver,172.16.17.15
# UEFI ipv4 PXE
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,EFI/bootx64.efi,reposerver,172.16.17.15
Adding additional subnet
dhcp-range=set:subnet1,172.16.17.100,172.16.17.254,1d
dhcp-option=tag:subnet1,3,172.16.17.1
dhcp-range=set:subnet2,192.168.17.100,192.168.17.254,1d
dhcp-option=tag:subnet2,3,192.168.17.1
# BIOS ipv4 PXE
dhcp-boot=tag:subnet1,pxelinux.0,reposerver,172.16.17.15
dhcp-boot=tag:subnet2,pxelinux.0,reposerver,192.168.17.15
# UEFI ipv4 PXE
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-boot=tag:efi-x86_64,EFI/bootx64.efi,reposerver,172.16.17.15
I haven't had any luck running across a similar configuration that explains how to handle the existing tag in the UEFI section so I can specify different IP addresses for each subnet.
Any ideas or suggestions welcomed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180419/ebc1e765/attachment-0001.html>
More information about the Dnsmasq-discuss
mailing list