LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-19-2009, 11:58 PM   #1
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Rep: Reputation: 15
Getting DHCP to allocate address for two different subnets on 2 nics


I have a linux box with two network cards

router 10.152.100.126

eth0 10.152.100.0/24 IP 10.152.100.101

eth1 10.200.100.0/24 IP 10.200.100.129

Eth0 connects to router;

I need to get pcs connected to each LAN to get the appropriate subnet addresses. For example, pc1 on eth1 gets 10.200.100.5 and pc1 on eth0 network to get 10.152.100.5.

Problem is, I keep getting '10.200.100.0/24 no free leases' for the network on eth1. Eth0 is fine though. If I use the share-network inside clause, pc's on both sides of the network get the 10.152.100.0/24

I have a copy of the DHCP.conf file, if anyone can point to the mistake I would greatly appreciate it as this is driving me insane.

ddns-update-style none;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
lease-file-name "/var/lib/dhcpd.leases";

subnet 10.152.100.0 netmask 255.255.255.0 {
filename "pxelinux.0";
range 10.152.100.5 10.152.100.100;
option subnet-mask 255.255.255.0;
option broadcast-address 10.152.100.255;
default-lease-time 3600;
max-lease-time 86400;
next-server 10.152.100.101;
}

subnet 10.200.100.0 netmask 255.255.255.0 {
filename "pxelinux.0";
range 10.200.100.5 10.200.100.100;
default-lease-time 3600;
max-lease-time 86400;
option ip-forwarding off;
option broadcast-address 10.200.100.255;
option subnet-mask 255.255.255.0;
next-server 10.200.100.129;
}

GROUP NETWORK1 {
option routers 10.152.100.126;

option domain-name-servers 192.231.203.3;

host PC01 { hardware ethernet 00:23:AE:06:5D:99; fixed-address 10.152.100.5; }

GROUP NETWORK2 {
option domain-name-servers 192.231.203.3;
host AP01 { hardware ethernet 00:21:5d:da:6d:b4; fixed-address 10.200.100.5; }
}
 
Old 02-20-2009, 04:53 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
The subnet sections should be sufficient to get the proper IP leases out the correct interface.

I'm not familiar with the GROUP sections, but it appears that GROUP NETWORK1 might be missing a closing '}'
 
Old 02-20-2009, 04:59 AM   #3
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
One more thing... What is the DHCP server's eth1 connected to? A separate broadcast domain, I hope.

Eth1, and the clients for the 10.200.100.0/24 network, should be connected to a separate vlan/broadcast domain than what eth0 is connected to.
 
Old 02-22-2009, 04:27 PM   #4
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
hey guys thanks for your input. Yes thanks eth1 and eth0 are seperate domain.

I got this working after all. Just a bit of tinkering was all.
 
Old 02-22-2009, 06:33 PM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
can you post what tinkering made it work so the next that that googles this problem will find the answer? thanks!
 
Old 02-25-2009, 08:10 PM   #6
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Admiral Beotch View Post
can you post what tinkering made it work so the next that that googles this problem will find the answer? thanks!
The code as posted above is correct. I just checked.
 
  


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
DHCP subnets klnasveschuk Linux - Networking 2 11-17-2007 11:04 PM
2 NICs & DHCP: 1 gets an address, 1 doesn't wesc78 Linux - Networking 5 05-14-2007 10:01 AM
DHCP for 2 subnets omlex Linux - Networking 11 03-04-2007 06:41 PM
DHCP Server for several subnets Simon_Sez Linux - Software 5 12-30-2005 05:06 PM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 07:32 AM

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

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