LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 07-09-2007, 02:06 PM   #1
guy_ripper
Member
 
Registered: Oct 2006
Posts: 80

Rep: Reputation: 15
setting up linux dhcp server with multiple scopes


Hi,

Anyone here knows how to setup a linux dhcp server with multiple scopes? I have 3 different subnets in our network. 192.168.1.x, 192.168.2.x and 192.168.3.x. All my servers are in .1 subnets and one of them is a dhcp. Now, I want also that my .2 and .3 subnets will taken care of an one dhcp server which part of .1 subnet. I'm using a linux router to communicate with different subnets.

Thanks in advanced.
 
Old 07-09-2007, 02:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
well you just add them, there's nothing stopping you doing this at all. just use a different subnet { } section for each one and off you go.
 
Old 07-09-2007, 02:23 PM   #3
guy_ripper
Member
 
Registered: Oct 2006
Posts: 80

Original Poster
Rep: Reputation: 15
acid_kewpie,

Thanks for your reply. I need to clarify does it need three network cards for my dhcp server? Each nic is connected with each subnets respectively?
 
Old 07-09-2007, 02:39 PM   #4
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Rep: Reputation: 15
It depends on your setup. Are the subnets physically separate? If so, you'd need to connect different nic cards to the different switches. If there are in the same physical network, then all you have to do is modify dhcpd.conf.
 
Old 07-09-2007, 03:12 PM   #5
guy_ripper
Member
 
Registered: Oct 2006
Posts: 80

Original Poster
Rep: Reputation: 15
Yes, @hatmatt... they are in separate LAN.
 
Old 07-09-2007, 03:21 PM   #6
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Rep: Reputation: 15
Then you would need to install a separate nic for each subnet and statically assign them the address 192.168.x.1 for the respective network. Then you would define the subnets in dhcpd.conf.

If anyone has a more elegant solution, feel free to jump in, but that's the only way that I know.
 
Old 07-09-2007, 03:52 PM   #7
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Or a single NIC is fine if the router supports a feature like ip-helper address (cisco) basically you are telling the router to relay DHCP requests to a SPECIFIC IP address that is the location of the DHCP server.

I had dual DHCP servers setup to handle 24 different subnets using this method. no problems.

Note there is a dhcp-relay package available for Linux as well if you are using Linux machines as routers.

If you are hosting multiple subnets in a large network you might also want to look at configuring DHCP fail-over in your DHCP servers, and then setup 2 machines as DHCP servers.
 
Old 07-09-2007, 03:53 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
that's a real ugly way to do it, but it depends what the rest of the network does as to wether the best solutions are feasible. you *should* place a DHCP relay agent on each subnet, any server or pc can actually perform this function, but normally it's the router or firewall. this just accepts dhcp requests and directly forwards to an existing DHCP server like this one.

as for doing it without, you can use 802.1q trunking on a single nic to get the same result.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Setting Up A PXE Install Server For Multiple Linux Distributions With Ubuntu Edgy Eft LXer Syndicated Linux News 0 12-20-2006 12:54 AM
2 DHCP scopes 1 server 2 NICs DevZer0 Linux - Networking 1 09-27-2004 06:47 PM
Setting up a DHCP server w/ the server on a wireless network Ionexchange Linux - Wireless Networking 0 05-08-2004 10:56 AM
dhcp server with multiple networks adamantium Linux - Networking 0 03-02-2004 09:16 AM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 07:32 AM


All times are GMT -5. The time now is 05:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration