Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.