[Dnsmasq-discuss] dhcpd3 to dnsmasq : grouping using the network-id
Simone
3nomis at gmail.com
Mon Feb 1 22:05:40 GMT 2010
Hi,
I'm trying to translate this piece of dhcpd3-server's configuration
for dnsmasq but I'm quite confuse about the syntax to use for grouping
with ``network-id``.
this is the first part of my configuration ::
subnet 192.168.11.0 netmask 255.255.255.0 {
range 192.168.11.200 192.168.11.250;
option domain-name-servers 192.168.11.254;
option broadcast-address 192.168.11.255;
option routers 192.168.11.253;
next-server 192.168.11.253;
get-lease-hostnames true;
option subnet-mask 255.255.255.0;
option root-path "/opt/ltsp/i386";
if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
filename "/ltsp/i386/pxelinux.0";
} else {
filename "/ltsp/i386/nbi.img";
}
}
I translated it to :
dhcp-range=192.168.11.200,192.168.11.250,255.255.255.0,8h
dhcp-option=6,192.168.11.254 # dns
dhcp-option=3,192.168.11.253 # gw
dhcp-option=44,192.168.11.253 # wins
next-server 192.168.11.253;
dhcp-option=17,"/opt/ltsp/i386"
# PXE / Etherboot tagging
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=eth,Etherboot
# assigning (eventually) different servers selecting by tag
dhcp-boot=net:pxe,/ltsp/i386/pxelinux.0,ltsp-server,192.168.11.253
dhcp-boot=net:eth,/ltsp/i386/pxelinux.0,ltsp-server, 192.168.11.253
# other
dhcp-boot=/ltsp/i386/nbi.img,ltsp-server,192.168.11.253
dhcp-boot=net:pxe,/ltsp/i386/pxelinux.0,ltsp-server,192.168.11.253
dhcp-boot=net:eth,/ltsp/i386/pxelinux.0,ltsp-server, 192.168.11.253
# other
dhcp-boot=/ltsp/i386/nbi.img,ltsp-server,192.168.11.253
Here starts the problematic part of the dhcpd3-server config, I have
multiple occurrances of selection per-mac :
host ltsp001 {
hardware ethernet 00:0c:30:20:b3:13;
fixed-address 192.168.11.101;
next-server 192.168.11.253; # next-server #1
}
host ltsp002 {
hardware ethernet 00:0c:10:11:d1:23;
fixed-address 192.168.11.102;
next-server 192.168.11.253; # next-server #1
}
host ltsp003 {
hardware ethernet 00:0c:10:50:c3:12;
fixed-address 192.168.11.103;
next-server 192.168.11.252; # next-server #2
}
host ltsp003 {
hardware ethernet 00:0c:40:30:b4:15;
fixed-address 192.168.11.104;
next-server 192.168.11.252; # next-server #2
}
I reserved ip for the hosts defined above :
# Setting static ip addresses
dhcp-host=00:0c:30:20:b3:13,192.168.11.101,ltsp001
dhcp-host=00:0c:10:11:d1:23,192.168.11.102,ltsp002
dhcp-host=00:0c:10:50:c3:12,192.168.11.103,ltsp003
dhcp-host=00:0c:40:30:b4:15,192.168.11.104,ltsp004
But I don't know how can I assign multiple mac addresses to a single
network-id ...
I read in the man page that I can use this syntax( valid for a single mac):
dhcp-mac=<tag>, mac
So I tried to group as follows :
# Grouping per mac-address, creating 2 different "network-id"
# network-id: ltspgroup1
dhcp-mac=ltspgroup1,00:0c:30:20:b3:13
dhcp-mac=ltspgroup1,00:0c:10:11:d1:23
# network-id: ltspgroup2
dhcp-mac=ltspgroup2,00:0c:10:50:c3:12
dhcp-mac=ltspgroup2,00:0c:40:30:b4:15
And to set different next-server and tftp server by network-id:
# Setting different "next-server" filtering by "network-id" tags
dhcp-boot=net:ltspgroup1,/ltsp/i386/pxelinux.0,ltsp-server,192.168.11.253
dhcp-boot=net:ltspgroup2,/ltsp/i386/pxelinux.0,ltsp-server,192.168.11.252
# Setting ip of the tftp srever
dhcp-option=net:ltspgroup1,option:193,192.168.11.253
dhcp-option=net:ltspgroup2,option:193,192.168.11.252
But I really don't know if I am right. What is the correct syntax?
Thank you in advance,
Simone
More information about the Dnsmasq-discuss
mailing list