LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-03-2004, 12:39 PM   #1
ygfperson
LQ Newbie
 
Registered: Jul 2004
Location: massachusetts
Distribution: fedora core 2
Posts: 7

Rep: Reputation: 0
dhcp configuration with 2 ethernet cards


I haven't found useful infromation via googling or at the dhcpd.conf man page. When there is useful information it seems to point to a config file that slackware uses or some other distro besides mine

So here's my problem: I want to lease out ip addresses on eth0 in the 192.168.0.255 network. I think I've got everything set up in my dhcpd.conf file:
Code:
#/etc/dhcpd.conf
default-lease-time 172800;
max-lease-time     604800;
option subnet-mask 255.255.255.0;
option routers 192.168.0.14;
option domain-name-servers 192.168.0.14;

subnet 192.168.0.0 netmask 255.255.255.0 {
	range 192.168.0.10 192.168.0.250;
}
ddns-update-style none;
ddns-updates off;
When I try to run the dhcpd server it gives me an error saying I need to specify my ethernet card:
Code:
[root@localhost network-scripts]# service dhcpd start
Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit //////
Wrote 0 leases to leases file.
 
No subnet declaration for eth1 (128.113.145.186).
** Ignoring requests on eth1.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth1 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.
                                                           [FAILED]
[root@localhost network-scripts]#
Interface eth1 has a network on it too, which connects to the internet

so my question is... how do i specify which interface to use?
 
Old 09-03-2004, 01:39 PM   #2
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
Try starting it with:
Code:
/usr/sbin/dhcpd eth0
than make sure its running with:
Code:
/usr/sbin/dhcpd -d -f
Andrew
 
Old 09-28-2004, 12:40 AM   #3
ygfperson
LQ Newbie
 
Registered: Jul 2004
Location: massachusetts
Distribution: fedora core 2
Posts: 7

Original Poster
Rep: Reputation: 0
sorry for the late reply... I don't know if it counts as bumping but it's a valid reply I think

'/usr/sbin/dhcpd eth0' gives me:
Code:
[root@gastly-72 root]# /usr/sbin/dhcpd eth0
Internet Systems Consortium DHCP Server V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 leases to leases file.
 
No subnet declaration for eth0 (0.0.0.0).
** Ignoring requests on eth0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth0 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.
[root@gastly-72 root]#
I don't understand what they mean by 'write a subnet declaration in your dhcpd.conf file'. I couldn't find an example online which dealt with this.
 
Old 09-30-2004, 01:56 AM   #4
Sutekh
Member
 
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273

Rep: Reputation: 30
I don't know for sure but I am guessing that the eth0 card has not been setup on your system with an ip / subnet etc.

what is the output of
Code:
ifconfig eth0
If it doesn't have any ip address etc then set this up first before trying to run dhcpd
 
Old 10-05-2004, 07:50 AM   #5
bobinglis
Member
 
Registered: Dec 2003
Location: MK
Distribution: \\slackware 10.1
Posts: 50

Rep: Reputation: 15
DHCP

I use the following config and it works for me using eth0 and eth1, eth1 is internal and eth0 the internet connection, Mandrake 10 is the OS,

ddns-update-style none;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
# default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
#you can enter domain name and DNS servers here
option domain-name "xxxxxx.co.uk";
option domain-name-servers 212.159.13.49;

range dynamic-bootp 192.168.0.16 192.168.0.253;
default-lease-time 43200;
max-lease-time 21600;
}
In the file:/etc/sysconfig/dhcpd there is an interface statement in which you can state the interface you want to listen on.
I hope this is not too late to help
 
  


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
using 2 ethernet cards one Tx and one Rx kayser Linux - Networking 11 05-03-2004 02:03 PM
two ethernet cards Canadian_2k2 Linux - Networking 4 12-07-2003 10:58 PM
RedHat 9 dhcp configuration problem for intel ethernet card linux_issues Linux - Networking 9 11-04-2003 01:52 PM
DHCP/Samba networking with two ethernet cards GreenerLinux Libranet 10 10-24-2003 09:55 PM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM

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

All times are GMT -5. The time now is 01:39 AM.

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