Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, This is the chunck of config that I'm having trouble with: Code: class "sysadm" { match pick-first-value (option dhcp-client-identifier, hardware); lease limit 2; } subclass "sysadm" 00:0d:56:b8:2d:6c; # Dell ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    2

    Dhcpd.conf classes question


    Hi,

    This is the chunck of config that I'm having trouble with:
    Code:
    class "sysadm" {
            match pick-first-value (option dhcp-client-identifier, hardware);
            lease limit 2;
           }
    subclass "sysadm" 00:0d:56:b8:2d:6c; # Dell ethernet
    subclass "sysadm" 00:90:96:b8:5f:9d; # Dell wireless
    >>>>>>>>>>>>>>>>>>Other stuff <<<<<<<<<<<<<<<<<
    subnet 192.168.6.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option broadcast-address 192.168.6.255;
            option routers 192.168.6.1;
            
            pool {
                    allow members of "sysadm";
                    range 192.168.6.240 192.168.6.241;
            }
    }
    Basicly what I want to achieve is a class with the matching done on the mac adresses that I can use throughout several subnets for pools of IPs. This will significantly simplify the maintenance because if a new mac must be put in I write it in the class and then I use that class in all the 5 or 6 subnet declarations I have.

    The dhcpd daemon starts with no errors but I get a "NO free leases" message in the logs. I suspect that the matching doesn't occur because if I use a range without restrictions it gives a lease imediatly. Any ideea?

  2. #2
    Just Joined!
    Join Date
    May 2006
    Posts
    2
    Ok... so I did some more googeling afterwards...
    It works with the following config:
    Code:
    class "sysadm" {
            match option dhcp-client-identifier;
            lease limit 2;
           }
    subclass "sysadm" 1:00:0d:56:b8:2d:6c; # Dell ethernet
    subclass "sysadm" 1:00:90:96:b8:5f:9d; # Dell wireless
    >>>>>>>>>>>>>>>>>>Other stuff <<<<<<<<<<<<<<<<<
    subnet 192.168.6.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option broadcast-address 192.168.6.255;
            option routers 192.168.6.1;
            
            pool {
                    allow members of "sysadm";
                    range 192.168.6.240 192.168.6.241;
            }
    }
    Notice the "1" in front of the mac addresses in the subclass declarations. That stands for ethernet I guess.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •