LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-30-2008, 04:42 AM   #1
kashif2131971
Member
 
Registered: Mar 2008
Posts: 61

Rep: Reputation: 16
Unhappy dhcp server with two network cards


hi,

I am try to build dhcp server in fedora 4 and have two network card
eth0 have ip address 192.168.0.2 other one is wirless network for internet

i install dhcp package copy dhcp.conf into /etc/ my dhcp.conf look like this

ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.0.2;
option subnet-mask 255.255.255.0;

# option nis-domain "domain.org";
option domain-name "mytrek.com";
option domain-name-servers 192.168.0.2;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range 192.168.0.5 192.168.0.128;
default-lease-time 180;
max-lease-time 300;
but i m not able to start dhcpd service with command
/usr/sbin/dhcpd start
the error is as under

No subnet declaration for start (0.0.0.0).
** Ignoring requests on start. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface start is attached. **


Not configured to listen on any interfaces!

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
 
Old 03-30-2008, 05:06 AM   #2
mechdave
Member
 
Registered: Apr 2007
Location: Adelaide, Australia
Distribution: Ubuntu 8.10 and 7.10 server
Posts: 95

Rep: Reputation: 15
Try having a look at LinuxQuestions manpage for dhcpd.conf
 
Old 03-31-2008, 06:06 AM   #3
OdinnBurkni
Member
 
Registered: Feb 2007
Location: Iceland
Distribution: Fedora 14, CentOS, FreeNAS
Posts: 127

Rep: Reputation: 20
Two NICs and dhcpd

Hi.
I'm using Fedora 6 and 7 with dhcpd on two network cards with no problem.
I'll post my dhcpd.conf file here for you to see.

#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style none;
lease-file-name "/var/lib/dhcpd/dhcpd.leases";
default-lease-time 600000;
max-lease-time 7200000;

shared-network HomeNET {
subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.50 192.168.1.130;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers xxx.xxx.xxx.1, xxx.xxx.xxx.2;

host Myserver {
fixed-address 192.168.1.210;
hardware ethernet 00:00:00:00:00:00;
}

# host a name {
# fixed-address the IP we want to be given to the pc;
# hardware ethernet the MAC address on the pc;
# }

}
}

shared-network WirelessNET {
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.50 192.168.10.120;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.10.255;
option routers 192.168.10.254;
option domain-name-servers xxx.xxx.xxx.1, xxx.xxx.xxx.2;
}
}

Only thing you need is to put in the right IP addresses and make sure that the network cards on your dhcpd server matches the network in this script.
This is a script I use (with some modifications) on a Linux server with 3 network cards, 1 outside and 2 inside and it works well.

There is a file where you can tell the server which interfaces to give out IP to but I can't remember where it is. I remember that in it you had to say dhcpdargs=eth1 and id you had two interfaces you'd add dhcpdargs=eth2
Hope this helps.

Sorry, I misread, thought you had two nics for dhcpd. in your case you'd just trim this down so it suits you and put static IP on eth1. But based on you config, all you want to do is give out ip to the wireless? If so you would need to put them on different subnet. It's not wise to have both nics on same subnet unless you are making transparent firewall which I'm not sure is possible in this, I know you can do it with Cisco but not sure about that setup.

Last edited by OdinnBurkni; 03-31-2008 at 06:11 AM.
 
Old 03-31-2008, 07:41 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,750

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
/etc/sysconfig/dhcpd. Change the following line for the LAN interface.
set "DHCPARGS=eth0"
 
  


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 with 2 Network Cards BeagleBen Linux - Networking 4 06-06-2006 04:35 PM
Wireless cards that transmit? Building DHCP server/router creedog Linux - Wireless Networking 2 03-28-2006 03:56 PM
network cards dhcp and suse 8.2 spjsm Linux - Hardware 2 05-29-2003 09:33 AM
network cards dhcp and suse 8.2 spjsm Linux - Networking 0 05-28-2003 09:22 AM
DHCP server on two LAN cards V.krishna kumar Linux - Networking 3 10-24-2002 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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