LinuxQuestions.org
Help answer threads with 0 replies.
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 08-08-2008, 07:44 AM   #1
ocgltd
Member
 
Registered: Sep 2005
Location: Canada
Distribution: Fedora 12 i386
Posts: 57

Rep: Reputation: 16
Setting up DHCPd on firewall to serve 3 internal subnets


I have a simple Fedora Core 5 installation acting as a firewall bridging 4 subnets (3 internal). I want it to serve IP addresses to 3 of these subnets.

From everything I have read, DHCPd can't serve different IP ranges to different subnets (based on NIC)...

Is there a way to achieve this that I'm missing?

Thanks,
MD
 
Old 08-08-2008, 10:51 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Are you running vlans? Have separate ethernet cards per subnet?

You should be able to have dhcpd serve up a different block to each vlan or separate card. For doing it on the same nic without vlans I'm not sure, you might be able to do it if you have an alias on it in the block you want to serve.

On debian and ubuntu you just edit the /etc/default/dhcp3-server file and tell it what interfaces you want to serve on and then in the server config file you just put in your different ip blocks, it sorts them out by the ips you have assigned to the various interfaces.
 
Old 08-08-2008, 11:39 AM   #3
ocgltd
Member
 
Registered: Sep 2005
Location: Canada
Distribution: Fedora 12 i386
Posts: 57

Original Poster
Rep: Reputation: 16
I have 4 seperate NIC's, each with unique IP and range. Can you link/post a sample config?
 
Old 08-08-2008, 12:26 PM   #4
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
not sure how exactly it is configured on fedora, but on debian-based distros like ubuntu you just need to update two files. for this example I'll assume that your 4 interfaces are configured as such:

eth0 : 10.1.1.1/24
eth1 : 10.1.2.1/24
eth2 : 10.1.3.1/24
eth3 : 10.1.4.1/24


then, update /etc/default/dhcp3-server (you'll have to find the equivalent file for fedora, since this is debian-specific) to contain:

INTERFACES="eth0 eth1 eth2 eth3"

and then your /etc/dhcp3/dhcpd.conf could contain:

Code:
option domain-name "my.net";
option domain-name-servers ns1.my.net, ns2.my.net;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;

subnet 10.1.1.0 netmask 255.255.255.0 {
  range 10.1.1.10 10.1.1.39;
  option domain-name "netA.my.net";
  option routers 10.1.1.1;
  option broadcast-address 10.1.1.255;
}

subnet 10.1.2.0 netmask 255.255.255.0 {
  range 10.1.2.10 10.1.2.39;
  option domain-name "netB.my.net";
  option routers 10.1.2.1;
  option broadcast-address 10.1.2.255;
}

subnet 10.1.3.0 netmask 255.255.255.0 {
  range 10.1.3.10 10.1.3.39;
  option domain-name "netC.my.net";
  option routers 10.1.3.1;
  option broadcast-address 10.1.3.255;
}

subnet 10.1.4.0 netmask 255.255.255.0 {
  range 10.1.4.10 10.1.4.39;
  option domain-name "netD.my.net";
  option routers 10.1.4.1;
  option broadcast-address 10.1.4.255;
}
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPD and Assigning Subnets to Different Interfaces metallica1973 Linux - Networking 8 01-25-2008 05:22 AM
how config proxy to serve two subnets timdog28 Linux - Server 1 02-14-2007 12:41 PM
Routing between internal subnets teamchachi Linux - Networking 2 05-11-2005 07:21 AM
Setting up firewall and internal vpn server alon005 Linux - Security 3 12-27-2004 02:16 AM
DHCPD two subnets on the same network taggedd Linux - Networking 4 10-27-2003 11:29 AM

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

All times are GMT -5. The time now is 05:37 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