How to configure DHCP to assign devices to subnets

dhcpscopewindows-server-2008-r2

I have Windows 2008 R2. There are three classes of devices on our network- IP phones, Handheld (WM5 & 6) devices, and everything else (Computer, printers, servers). I use 2 Cisco Catalyst switches and have everything on a single VLAN. Our IP phones are Cisco also. I would like to create three subnets to handle these three different classes of equipment. I have a remote site with a Windows 2008 DHCP server that I would like to configure. What is the best way to set this up? Thanks for your help!

Best Answer

You can have everything on a single VLAN, but YOU have to define how to separate them. I wouldn't recommend using Windows 2008 as the DHCP server, isc-dhcp-server is much more powerful. Here's how I would do it:

# MODIFY TO MATCH YOUR ENVIRONMENT
class "phones"    { match if substring (hardware,1,3) = 00:11:22; }
class "handhelds" { match if substring (hardware,1,3) = 00:33:44; }

# Common configuration
option domain-name "your.domain.name.here";
option domain-name-servers 192.168.2.2;

shared-network lan {
        # phones
        subnet 192.168.0.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.0.10 192.168.0.254;
                        allow members of "phones";
                }
                option routers 192.168.0.1;
                option subnet-mask 255.255.255.0;
        }

        # handheld devices
        subnet 192.168.1.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.1.10 192.168.1.254;
                        allow members of "handhelds";
                }
                option routers 192.168.1.1;
                option subnet-mask 255.255.255.0;
        }

        # Everything else
        subnet 192.168.2.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.2.10 192.168.2.254;
                        allow unknown-clients;
                }
                option routers 192.168.1.1;
                option subnet-mask 255.255.255.0;
        }
}