LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-21-2009, 03:33 AM   #1
dils
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Rep: Reputation: 0
DHCP server having 2 subnets through 2 nics


hi all,
am new at linux and am implementing a project to make 2 subnets get an internet connection passing through my linux box. am using fedora core 9 and i have 3 nics on my pc.

eth0: connected to the internet
eth1: connected to the network 192.168.4.0
eth2: connected to the network 192.168.5.0

my problem is that my dhcp server is not starting. my dhcpd.conf looks like this:

ddns-update-style interim;
ignore client-updates;
#First Subnet is specified
subnet 192.168.4.0 netmask 255.255.255.0 {
# The range of IP addresses the server will issue to DHCP enabled PC clients booting up on # the network
range 192.168.4.2 192.168.4.255;

# Set the amount of time in seconds that
# a client may keep the IP address
default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by the PC clients
option routers 192.168.4.1;
# Don't forward DHCP requests from this NIC interface to any other NIC interfaces
option ip-forwarding off;
# Set the broadcast address and subnet mask to be used by the DHCP clients
option broadcast-address 192.168.4.255;
option subnet-mask 255.255.255.0;

# Set the DNS server to be used by the DHCP clients
option domain-name-servers 172.22.5.13;
}
#second subnet specified
subnet 192.168.5.0 netmask 255.255.255.0 {

# The range of IP addresses the server will issue to DHCP enabled PC clients booting up on # the network
range 192.168.5.2 192.168.5.255;

# Set the amount of time in seconds that a client may keep the IP address
default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by the PC clients
option routers 192.168.5.1;
# Don't forward DHCP requests from this NIC interface to any other NIC interfaces
option ip-forwarding off;

# Set the broadcast address and subnet mask
# to be used by the DHCP clients

option broadcast-address 192.168.5.255;
option subnet-mask 255.255.255.0;

# Set the DNS server to be used by the DHCP clients
option domain-name-servers 172.22.5.13;
}

when i do "tail -f /var/log/messages", it says no declaration of subnet. should there be a different configuration file for declaring subnets? if so, where should it be found and what should be written in it to declare the subnet?

Thx in advance for your help.
 
Old 05-21-2009, 04:06 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
I'm still looking at the conf, but right off the bat, your range statements are incorrect and need some fix'in:

Code:
range 192.168.x.2 192.168.x.255;
192.168.x.255, given the netmask specified, is a broadcast address. The highest ip you can legally specify is 192.168.x.254.
 
Old 05-21-2009, 04:09 AM   #3
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Please paste the output of 'netstat -rnv' from your dhcp server.
 
  


Reply

Tags
dhcp, multiple, server


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
Getting DHCP to allocate address for two different subnets on 2 nics GGlinux Linux - Networking 5 02-25-2009 08:10 PM
DHCP Server for several subnets Simon_Sez Linux - Software 5 12-30-2005 05:06 PM
One DHCP server serving 2 subnets scng Linux - Networking 3 07-12-2005 09:57 AM
how can i create subnets on dhcp server castify Linux - Networking 0 07-24-2003 03:13 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 08:18 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