[Dnsmasq-discuss] dhcp for two domains, two classes of computers

Simon Kelley simon at thekelleys.org.uk
Thu May 17 15:39:14 BST 2007


Asier Baranguán wrote:
> Hi All!
> 
> This is my scenario: Debian 4.0 Etch Server, 3 NICs, with Samba+LDAP acting
> as the PDC of one domain and dnsmasq as the DHCP and DNS resolver. This setup 
> has worked very well over two years (first with Sarge, later with Etch), but 
> now I'm in the need to add ~20 computers, with its own domain, dns and dhcp 
> server (Windows 2003 based)
> 
> Two dhcp servers in the same isn't a good idea so I pretend to make dnsmasq 
> the only DHCP server of the network, serving the two groups, each one with 
> its own DNS server, WINS server, SRV records, etc. I've readed that this 
> could be made with 'user classes' or vendor classes'. Unfortunately I don't 
> have a test scenario because changes will be in a production server so I want 
> to begin test with something that works.
> 
> Which is best for my purposes? user class or vendor class? How can I setup 
> this classes in the clients (Windows XP and 2003 computers)? I've tryed with
> 
> c:\> ipconfig /setclassid * "net:domain1"
> 
> but
> 
> c:\> ipconfig /showclassid *
> 
> shows no class :(
> 


This is really a question about Microsoft DHCP configuration, which I'm
fairly clueless about. Your dnsmasq config looks fine, with one possible
exception:

dhcp-vendorclass = domain1, "domain1"

You might like to lose the space after the comma. Unless you are using a
 very new release of dnsmasq that might actually match " domain1" (ie
with a space.

It's worth using something like Wireshark to grab the DHCP packets so
that you can tell if the relevant vendor or user class is being included
by the DHCP client. They will appear in the "options" part of the packet.

Cheers,

Simon.


> My setup is like this. ¿Missing something? please, help.
> 
>> - - - - - [ /etc/dnsmasq.conf ] - - - - - - - - - - - - - - - - - -
> 
> # /etc/dnsmasq.conf - Configuration file for dnsmasq. 20060421 - Asier
> 
> # Common settings for the server
> dhcp-authoritative
> 
> # Three NICS
> # eth0 - 192.168.1.0/24  -> Gateway network
> # eth1 - 192.168.48.0/24 -> network for domain1 computers (linux based)
> # eth2 - 192.168.28.0/24 -> network for domain2 computers (w2k3 based)
> 
> no-dhcp-interface=eth0
> bind-interfaces
> expand-hosts
> bogus-priv
> cache-size=5000
> filterwin2k      # ¿What's the point of this?
> 
> # Internal domain with Linux PDC - domain1
> local=/domain1/
> domain=domain1
> 
> # Other domain - W2003 based
> server=/domain2/192.168.28.72
> 
> ###
> ### DHCP for domain1
> ###
> dhcp-vendorclass = domain1, "domain1"
> dhcp-range = domain1,192.168.48.200,192.168.48.249,120h
> 
> # LDAP of net:net:domain1 is etchsrv
> srv-host = _ldap._tcp.domain1,etchsrv.domain1,389
> srv-host = _ldap._tcp.dc._msdcs.domain1,etchsrv.domain1
> 
> # Settings for DOMAIN1 clients
> dhcp-option = net:domain1,1,255.255.255.0            # netmask
> dhcp-option = net:domain1,2,3600                     # GMT+1
> dhcp-option = net:domain1,3,192.168.1.190            # Gateway
> dhcp-option = net:domain1,6,192.168.48.190           # DNS Server
> dhcp-option = net:domain1,15,DOMAIN1                 # Default DOMAIN1
> dhcp-option = net:domain1,19,0                       # ip-forwarding disabled
> dhcp-option = net:domain1,42,192.168.48.99           # NTP Server
> dhcp-option = net:domain1,44,192.168.48.99           # NetBIOS
> dhcp-option = net:domain1,45,192.168.48.99           # netbios dds
> dhcp-option = net:domain1,46,8                       # netbios node type
> dhcp-option = net:domain1,47                         # empty netbios scope.
> dhcp-option = net:domain1,119,domain1                # DNS suffix
> 
> # Computers with fixed IP address at net:domain1
> dhcp-host = xx:xx:xx:xx:xx:xx,net:domain1,192.168.48.20
> dhcp-host = xx:xx:xx:xx:xx:xx,net:domain1,192.168.48.21
> dhcp-host = xx:xx:xx:xx:xx:xx,net:domain1,192.168.48.22
> dhcp-host = xx:xx:xx:xx:xx:xx,net:domain1,192.168.48.23
> 
> ###
> ### DHCP for net:domain2
> ###
> dhcp-vendorclass = domain2, "domain2"
> dhcp-range = domain2,192.168.28.140,192.168.28.199,24h
> 
> # LDAP of net:domain2 is w2k3srv
> srv-host = _ldap._tcp.domain2,w2k3srv.domain2,389
> srv-host = _ldap._tcp.dc._msdcs.domain2,w2k3srv.domain2
> 
> # Settings for net:domain1 clients
> dhcp-option = net:domain2,1,255.255.255.0            # netmask
> dhcp-option = net:domain2,2,3600                     # GMT+1
> dhcp-option = net:domain2,3,192.168.28.190           # Gateway
> dhcp-option = net:domain2,6,192.168.28.72            # DNS Server
> dhcp-option = net:domain2,15,domain2                 # Other domain
> dhcp-option = net:domain2,19,0                       # ip-forwarding disabled
> dhcp-option = net:domain2,42,192.168.28.72           # NTP Server
> dhcp-option = net:domain2,44,192.168.28.72           # NetBIOS
> dhcp-option = net:domain2,45,192.168.28.72           # netbios dds
> dhcp-option = net:domain2,46,8                       # netbios node type
> dhcp-option = net:domain2,47                         # empty netbios scope.
> dhcp-option = net:domain2,119,domain2                # DNS suffix
> 
>> - - - - - [ /etc/dnsmasq.conf ] - - - - - - - - - - - - - - - - - -




More information about the Dnsmasq-discuss mailing list