Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am configuring my home network. I have a USB 3g modem and a wifi router which has a ethernet port for DSL/Cable Connection.

I was planning to have my laptop connect to 3g via USB modem and route the traffic to ethernet port of the Laptop so it can be used as cable internet connection for the wifi router when i connect my laptop to the router.

I am still stuck configuring DHCP.

this is the content of /etc/dhcp/dhcpd.conf [QUOTE]

# Sample /etc/dhcpd.conf                                                                                                                                                      
# (add your comments here)                                                                                                                                                    
default-lease-time 600;
max-lease-time 7200;
option subnet-mask;
option broadcast-address;
option routers;
option domain-name-servers,;
option domain-name "";

subnet netmask {

Routing: for time being i did

# route add -host dev eth0

then I executed

# dhcpd eth0

the error which I am getting is

[root@spark dhcp]# sudo dhcpd eth0
Internet Systems Consortium DHCP Server 4.2.1-P1
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit [url][/url]
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config 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  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:

[root@spark dhcp]#

ifconfig output

[root@spark dhcp]# ifconfig
em2       Link encap:Ethernet  HWaddr 98:4B:E1:EF:7B:36  
          inet6 addr: fe80::9a4b:e1ff:feef:7b36/64 Scope:Link
          RX packets:10588 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9506 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1902468 (1.8 MiB)  TX bytes:962611 (940.0 KiB)
          Interrupt:45 Base address:0xe000 

eth0      Link encap:Ethernet  HWaddr CC:52:AF:54:19:BD  
          inet6 addr: fe80::ce52:afff:fe54:19bd/64 Scope:Link
          RX packets:109 errors:0 dropped:0 overruns:0 frame:192354
          TX packets:33 errors:20 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:15181 (14.8 KiB)  TX bytes:6798 (6.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:109435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:109435 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8260005 (7.8 MiB)  TX bytes:8260005 (7.8 MiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:115.184.XXX.XXX  P-t-P:220.224.XXX.XXX  Mask:
          RX packets:31 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:7768 (7.5 KiB)  TX bytes:5950 (5.8 KiB)

[root@spark dhcp]# 

It says I am missing subnet declaration, which i am not. What else could be the reason I am getting this error. thanks.

share|improve this question
up vote 1 down vote accepted

"It says I am missing subnet declaration, which i am not."

Yes you are -- when dhcpd tells you something, listen to it. Specifically, you've specified a subnet declaration for, but there's no way for the DHCP server to serve requests for the network because your machine isn't directly connected to it. Give eth0 an address in that network and watch dhcpd come ALIVE!

share|improve this answer
ahh! yes, coincidently i just figured out. :) – Idlecool Jul 23 '11 at 11:11

ahh I figured out, I forget to assign IP address to my eth0 interface,

# ifconfig eth0 

what a gotcha :|

share|improve this answer
You might want to assign your DHCP server an address that isn't in the DHCP server's range of addresses to hand out to others, just for cleanliness. – womble Jul 23 '11 at 11:47

Your Answer


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.