2

On our network, each user gets their own octet, eg Fred gets 10.2.105.0/24 and Barney gets 10.2.106.0/24. They get a laptop and a development server from IT with a known mac address.

What I want to do is restrict each user to use a DHCP range within that block based on the mac address of their hardware. On ISC dhcpd, what I think is correct is something like:

    class "fred" {
        host machine1 { hardware ethernet 1:1:1:1:1:1; }
        host machine2 { hardware ethernet 1:1:1:1:1:2; }
    }
    subnet 10.2.100.0 netmask 255.255.255.0 {
        allow members of "fred";
        deny known-clients;
        range 10.2.100.1 10.2.100.254;
    }

Then I can just script generation of the config when adding or removing users or their assigned hardware.

Am I on the right track here or do I misunderstand the user of classes and hosts?

1 Answers1

2

You are definitely on the right track. The alternative way to do this would be to have the DHCP clients send the class field in their request; this would add configuration to the clients but reduce the need to enter the MAC of each one in the dhcpd config.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92