LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-11-2010, 11:53 AM   #1
designator
Member
 
Registered: Jun 2003
Location: California, USA
Distribution: OpenSUSE Tumbleweed
Posts: 219

Rep: Reputation: 37
Question IP range for a group in dhcpd.conf


Is there any way to associate a group to subnet in dhcpd.conf?
I want hosts in a specific group to be locked to an IP range defined in subnet.

Something like this:
Code:
authoritative;
ddns-update-style ad-hoc;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.1 192.168.0.100;
    option blah1;
    option blah2;
}

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.101 192.168.0.200;
    option blah3;
    option blah4;
}

group {
# How do a link this group to range 1-100?
    host test1 { hardware ethernet 00:11:22:33:44:55; }
    host test2 { hardware ethernet 00:22:22:33:44:66; }
}

group {
# How do a link this group to range 101-200?
   host test3 { hardware ethernet 00:22:55:66:99:88; }
   host test4 { hardware ethernet 00:33:77:11:22:44; }
}
Thanks in advance.
 
Old 01-11-2010, 05:25 PM   #2
designator
Member
 
Registered: Jun 2003
Location: California, USA
Distribution: OpenSUSE Tumbleweed
Posts: 219

Original Poster
Rep: Reputation: 37
Cool

I think I solved my problem with the following, but it seems really ugly and will contain a lot of repetitions of mac addresses between host definitions and subclasses. Is there a better way to do this?

Any suggestions welcome.
Thanks.

Code:
ddns-update-style interim;

class "static" {
        match hardware;
}

subclass "static" 1:00:22:44:66:88:99;

class "dynamic" {
}

subclass "dynamic" 1:00:11:22:33:44:55;

subnet 192.168.0.0 netmask 255.255.255.0 {
        pool {
                allow members of "dynamic";
                range 192.168.0.10 192.168.0.89;
        }

        pool {
                allow members of "static";
                range 192.168.0.90 192.168.0.100;
        }

        pool {
                allow unknown-clients;
                range 192.168.0.101 192.168.0.200;
        }
}

group {
        host test {
                hardware ethernet 00:22:44:66:88:99;
                fixed-address 192.168.0.10;
        }
}
 
  


Reply

Tags
dhcp, dhcpd, dhcpdconf, ip, network, networking, server, subnet



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to re-invoke dhcpd after changes were made to dhcpd.conf file. Azazwa Linux - Newbie 3 03-30-2009 04:44 AM
/etc/dhcpd.conf or /ltsp/dhcpd.conf ? maxsanders Ubuntu 1 07-07-2007 06:32 AM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
dhcpd.conf "range" spanning address classes? michaelsanford Linux - Networking 2 04-08-2005 05:19 PM
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration