Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

History: I got a tiny shiny plugserver which I want to plug to my ADSL router (or however you want to call it) on one end (eth0), and the other end (eth1) I want to run a dhcp server for my LAN. ATM I am stuck with getting LAN to work. OS is fedora 12. I configured my /etc/dhcp/dhcpd.conf like this:

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'
#

option domain-name "unknown.org";
option domain-name-servers 192.168.44.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.44.255;

default-lease-time 86400;
max-lease-time 172800;

subnet 192.168.44.0 netmask 255.255.255.0
{
host fedorabigbox
{
        hardware ethernet 00:19:66:8E:61:74;
        fixed-address 192.168.44.21;
}

#host mobile
#{
#       hardware ethernet ***;
#       fixed-address 192.168.44.22;
#}

        range 192.168.44.100 192.168.44.110;
        option routers 192.168.44.1;
}

# this is just dummy, as read many howtos, some suggesting to add a subnet blah netmask blah for each interface
subnet 192.168.33.0 netmask 255.255.255.0
{
        range 192.168.33.100 192.168.33.110;
        option routers 192.168.33.1;
}

But the server fails to start when trying to start it via /etc/init.d/dhcpd start

In general it would be nice if someone can point me to a in detail explanation of how network works, I am pretty new to this stuff.

More concrete question: How to point the subnets to eth1 and the other to eth0, how can this be achieved?

Does someone see any errors or flaws? Syntax should be correct, allready checked that with the dhcpd syntax check.

Thanks for any help

Appendix:

The Error:

Internet Systems Consortium DHCP Server 4.1.0p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.

No subnet declaration for eth0 (no IPv4 addresses).
** 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!

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
    http://bugzilla.redhat.com

exiting.
share|improve this question
    
@daisetsu: home networking questions are better suited to Super User than Server Fault. –  quack quixote Jun 7 '10 at 23:08
    
@ quack, thanks for correcting me. –  Daisetsu Jun 8 '10 at 0:45
    
is there anyone around here having some experience with dhcp server on redhat/centos/fedora ? –  drahnr Jun 9 '10 at 21:24
add comment

1 Answer

up vote 1 down vote accepted

I can show you the config I have for my Fedora "router"/firewall. I am running Fedora 14 (recently upgraded from Fedora 13) It has 2 ether net cards (eth0 and eth1). eth0 is internal network (10.0.0.x) eth1 is external network connected to my cable operator. My "router" has internal address 10.0.0.3 I have replace names and made some info generic. Replace with your particular info where needed.

option domain-name-servers 10.0.0.3, <external-dns1-ip>, <external-dns2-ip>;
# Sample /etc/dhcpd.conf
# (add your comments here) 

option domain-name "net.home";

group {
host pc1 {
    fixed-address 10.0.0.2;
    hardware ethernet xx:xx:xx:xx:xx:xx;
    }
host pc2 {
    fixed-address 10.0.0.4;
    hardware ethernet yy:yy:yy:yy:yy:yy;
    }
# Canon Pixma iP5200R
host printer1 {
    hardware ethernet zz:zz:zz:zz:zz:zz;
    fixed-address 10.0.0.12;
    }
# Wireless IP camera
host ipcamera {
    hardware ethernet ww:ww:ww:ww:ww:ww;
    fixed-address 10.0.0.15;
    }
}


 # home.net
 subnet 10.0.0.0 netmask 255.255.255.0 {
authoritative;
range 10.0.0.20 10.0.0.100;
default-lease-time 86400;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.3;
}
share|improve this answer
    
nice! thank you for your example, as soon as I have time I will get to my arm router project :>, marking this as solved –  drahnr Dec 18 '10 at 10:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.