LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2008, 09:05 PM   #1
pridefc
Member
 
Registered: Nov 2005
Distribution: redhat, debian, ubuntu
Posts: 47

Rep: Reputation: 15
DHCP creating multiple scopes


We currently have only 1 DHCP scope using dhcp reservation. We will be dividing up our current network (10.10.x.x/16) into multiple subnetworks (10.10.x.x/24) so we'd need to create a multiple dhcp scopes (each with its own default gateway) in dhcpd.conf file.
We're planning to copy the option lines for each scope and edit it accordingly.

Below is the sample of our current dhcpd.conf:
option domain-name "company.com";^M
option domain-name-servers 10.10.10.52, 10.10.10.2;^M
option time-servers time.company.com;^M
option netbios-name-servers 10.10.10.200, 10.10.10.201;^M
ddns-update-style none;^M
^M
^M
subnet 10.10.0.0 netmask 255.255.0.0 {^M

deny unknown-clients;^M
^M
default-lease-time 86400;^M
option subnet-mask 255.255.0.0;^M
option routers 10.10.10.1;^M

host XP {
hardware ethernet 00:00:7F:BA:8C:85;
fixed-address 10.10.20.221;
}
host MAC {
hardware ethernet 00:0E:7F:BB:6F:8G;
fixed-address 10.10.10.235;
}


We're planning to do something like below:
#scope for 10.10.10.0/24
option domain-name "company.com";^M
option domain-name-servers 10.10.10.52, 10.10.10.2;^M
option time-servers time.company.com;^M
option netbios-name-servers 10.10.10.200, 10.10.10.201;^M
ddns-update-style none;^M
^M
^M
subnet 10.10.10.0 netmask 255.255.255.0 {^M

deny unknown-clients;^M
^M
default-lease-time 86400;^M
option subnet-mask 255.255.0.0;^M
option routers 10.10.10.1;^M

host MAC {
hardware ethernet 00:0E:7F:BB:6F:8G;
fixed-address 10.10.10.235;
}

#scope for 10.10.20.0/24
option domain-name "company.com";^M
option domain-name-servers 10.10.10.52, 10.10.10.2;^M
option time-servers time.company.com;^M
option netbios-name-servers 10.10.10.200, 10.10.10.201;^M
ddns-update-style none;^M
^M
^M
subnet 10.10.20.0 netmask 255.255.255.0 {^M

deny unknown-clients;^M
^M
default-lease-time 86400;^M
option subnet-mask 255.255.255.0;^M
option routers 10.10.20.1;^M

host XP {
hardware ethernet 00:00:7F:BA:8C:85;
fixed-address 10.10.20.221;
}

Is this the correct way to do it?

Thanks.
 
Old 01-30-2008, 01:53 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you wouldn't redefine the same global options multiple times, just the subnet { } data. other than that, seems good.

a deny unknown-clients option makes dhcp VERY intensive to administer... you are aware of that right?
 
Old 01-30-2008, 02:28 PM   #3
pridefc
Member
 
Registered: Nov 2005
Distribution: redhat, debian, ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Yes, we've been using "deny unknown-clients" for years and we're used to it now.
So like this then? Leave the global options and just specify the subnet and the rest for each subnet (default gateway and even mask in some subnets will be different)?

option domain-name "company.com";^M
option domain-name-servers 10.10.10.52, 10.10.10.2;^M
option time-servers time.company.com;^M
option netbios-name-servers 10.10.10.200, 10.10.10.201;^M
ddns-update-style none;^M
^M
^M
#scope for 10.10.10.0/24
subnet 10.10.10.0 netmask 255.255.255.0 {^M

deny unknown-clients;^M
^M
default-lease-time 86400;^M
option subnet-mask 255.255.0.0;^M
option routers 10.10.10.1;^M

host MAC {
hardware ethernet 00:0E:7F:BB:6F:8G;
fixed-address 10.10.10.235;
}

#scope for 10.10.20.0/24
subnet 10.10.20.0 netmask 255.255.255.0 {^M

deny unknown-clients;^M
^M
default-lease-time 86400;^M
option subnet-mask 255.255.255.0;^M
option routers 10.10.20.1;^M

host XP {
hardware ethernet 00:00:7F:BA:8C:85;
fixed-address 10.10.20.221;
}
 
  


Reply



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
creating multiple users naumz Linux - Newbie 5 10-05-2007 05:36 PM
setting up linux dhcp server with multiple scopes guy_ripper Linux - Server 7 07-09-2007 03:53 PM
creating multiple users sikkalgopal Linux - Newbie 3 07-06-2007 06:01 AM
DHCP problems - multiple DHCP servers sat86 Linux - Networking 4 10-02-2005 05:43 AM
2 DHCP scopes 1 server 2 NICs DevZer0 Linux - Networking 1 09-27-2004 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:57 AM.

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