Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-10-2004, 09:47 AM   #1
LQ Newbie
Registered: Nov 2003
Location: Georgia
Distribution: Slackware 10.1
Posts: 28

Rep: Reputation: 15
Question dhcpd will not provide IP to client

Briefly before you get to the meat. I have IPTABLES working with static clients. I now would like to add dhcp server functionality to my Slackware box.

I have a slackware 9.1 install (no Xserver) that I want to use as a router/firewall. I have tested (and currently using) the IPTABLES firewall. The scripe used is in the link below. In this config I have edited my eth0 as my EXTIF using IP (I have a wireless link to my neighbors access point for my Internet connection) and my INTIF is eth2 using IP Other than these modified values, the IPTABLES script stock.

For clearity, when my clients (win2K) are setup as static 192.168.100.x using as the GW and as the nameserver EVERYTHING WORKS.

I now want to add dhcp server funcionality to my slackware box. I have edited the /etc/dhcpd.conf file as follows

*****************start OF dhcpd.conf*****************
root@Joshua:~# cat /etc/dhcpd.conf
# dhcpd.conf
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#These lines are for lease times and for update style.
#These do not need to be changed for normal operation

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;

# Change the subnet mask to the subnet mask of your network
# In most cases for a small network it will be

option subnet-mask;

# Change this to the IP address of the computer that is connected to the internet
# In most cases this will be the same as the computer as this script is running on

option routers;

# Change this to the IP addresses of the primary and secondary
# DNS servers of your ISP (internet service provider)

option domain-name-servers,,;

# This is the range of IP address that will be given out. It.s best
# To use the range as this is set aside for none internet networks
# This will hand out IPs address in the range of to

subnet netmask {

#The NIC with this MAC address will always get the same IP address 192.168.03

#host NAME_OF_HOST {
#host ds9 {
# NAME_OF_HOST should be changed to the name of that computer.
#hardware ethernet 00:07:95:A40:F7;
*******************END OF dhcpd.conf********************

I then start the server as follows WITH NO ERRORS

root@Joshua:/etc# /usr/sbin/dhcpd eth2
Internet Software Consortium DHCP Server V3.0pl2
Copyright 1995-2003 Internet Software Consortium.
All rights reserved.
For info, please visit
Wrote 0 leases to leases file.
Listening on Socket/eth2/
Sending on Socket/eth2/

When I set my win2k test client to dynamic dhcp the following error occurrs.

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . :
Subnet Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . :

F:\>ipconfig /renew

Windows 2000 IP Configuration

The following error occurred when renewing adapter Local Area Connection: DHCP Server unreachable

Why isnt my Slackware 9.1 box providing an IP to my clients?
Old 06-11-2004, 09:03 AM   #2
LQ Newbie
Registered: Nov 2003
Location: Georgia
Distribution: Slackware 10.1
Posts: 28

Original Poster
Rep: Reputation: 15
Found the problem

Found out why dhcpd was not providing an IP address to any clients. My strong firewall for IPTABLES had the ports blocked...and I didnt read the entire script. I have enabled the following lines and it works like a champ.

----- Begin OPTIONAL INPUT Section -----

# DHCPd - Enable the following lines if you run an INTERNAL DHCPd server
$IPTABLES -A INPUT -i $INTIF -p tcp --sport 68 --dport 67 -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -p udp --sport 68 --dport 67 -j ACCEPT

# ----- Begin OPTIONAL OUTPUT Section -----

# DHCPd - Enable the following lines if you run an INTERNAL DHCPd server
# - Remove BOTH #s all the #s if you need this functionality.
$IPTABLES -A OUTPUT -o $INTIF -p tcp -s $INTIP --sport 67 \
-d --dport 68 -j ACCEPT
$IPTABLES -A OUTPUT -o $INTIF -p udp -s $INTIP --sport 67 \
-d --dport 68 -j ACCEPT



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
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
Provide newbies with forum in which they last posted. scurver LQ Suggestions & Feedback 1 11-30-2004 02:01 PM
DHCPD startup failure, mdk 9.2, dhcpd v3.0.1rc11 fuzzyworm Linux - Networking 1 02-14-2004 03:58 AM
Internet Provide Question teenole Linux - Networking 1 10-22-2003 12:44 PM
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration