LinuxQuestions.org
Visit Jeremy's Blog.
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 06-10-2004, 09:47 AM   #1
kennedy01
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 192.168.2.230 (I have a wireless link to my neighbors access point for my Internet connection) and my INTIF is eth2 using IP 192.168.100.1 Other than these modified values, the IPTABLES script stock.

http://www.e-infomax.com/ipmasq/howt...2.4.X-STRONGER

For clearity, when my clients (win2K) are setup as static 192.168.100.x using 192.168.100.1 as the GW and 192.168.2.1 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 255.255.255.0

option subnet-mask 255.255.255.0;

# 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 192.168.100.1;

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

option domain-name-servers 192.168.2.1, 66.193.174.2, 66.193.174.3;

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

subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.100 192.168.100.140;
}

#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;
#fixed-address 192.168.100.101;
#}
*******************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 http://www.isc.org/products/DHCP
Wrote 0 leases to leases file.
Listening on Socket/eth2/192.168.100.0/24
Sending on Socket/eth2/192.168.100.0/24
*********************************************************


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. . . . . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . . . . : 0.0.0.0
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
kennedy01
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 255.255.255.255 --dport 68 -j ACCEPT
$IPTABLES -A OUTPUT -o $INTIF -p udp -s $INTIP --sport 67 \
-d 255.255.255.255 --dport 68 -j ACCEPT



--justin
 
  


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
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


All times are GMT -5. The time now is 08:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration