LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-26-2006, 07:43 PM   #1
mapster
LQ Newbie
 
Registered: Mar 2005
Location: Norway
Distribution: Mandriva 2007
Posts: 23

Rep: Reputation: 15
DHCP server not working


I can't seem to get my dhcp server working.

Here is dhcpd.conf:
Code:
ddns-update-style none;
subnet 10.0.1.0 netmask 255.255.255.0 {
	# default gateway
	option routers 10.0.1.1;
	option subnet-mask 255.255.255.0;
	option broadcast-address 192.168.1.255;

	option domain-name "NDT-LAN";
	option domain-name-servers 10.0.0.1;

	range dynamic-bootp 10.0.1.16 10.0.1.253;
	default-lease-time 21600;
	max-lease-time 43200;
}
The server starts up just fine. And it seems like the client pc's get contact with the server. When I run the server with the tags -d and -f, I get this output:
Code:
/usr/sbin/dhcpd -d -f
Internet Systems Consortium DHCP Server V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
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 eth2 (10.0.0.9).
** Ignoring requests on eth2.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth2 is attached. **

Listening on LPF/eth1/00:0a:cd:09:15:6d/10.0.1/24
Sending on   LPF/eth1/00:0a:cd:09:15:6d/10.0.1/24
Sending on   Socket/fallback/fallback-net
DHCPDISCOVER from 00:08:a1:2e:1b:cf via eth1
DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPDISCOVER from 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
And the two last lines repeat as I try to update the ip on the client pc's, which are running windows btw.

Anybody who can explain to me why the clients doesn't receive the ip my server sends?
 
Old 12-27-2006, 12:49 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
There's the old standby of wondering if there is a firewall isssue. But I also wonder if it is possible that your MS machine just doesn't like the address you are assigning. (I am most definitely not a MS guru.) You might try reducing your upper address a little and see if the problem clears up.

You can make sure the offers are actually leaving your machine using tcpdump. If they are leaving your machine, then I would think the problem would have to be with the MS box.
 
Old 12-27-2006, 02:14 AM   #3
Dhana_pal
LQ Newbie
 
Registered: Dec 2006
Posts: 5

Rep: Reputation: 0
You can use the ethereal on the MS-box to capture packets and see whether ur getting things send by Linux on ur MS-box.
This may help you to narrow down( either on Linux or MS-box). then proceed to fix the issue..
 
Old 12-27-2006, 03:53 PM   #4
mapster
LQ Newbie
 
Registered: Mar 2005
Location: Norway
Distribution: Mandriva 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Thanx for the help, I'll try that later this evening.
 
Old 12-27-2006, 04:36 PM   #5
Windchaser
LQ Newbie
 
Registered: Dec 2006
Location: Chicago, IL
Distribution: Fedora Core 5 and 6
Posts: 23

Rep: Reputation: 15
Normally the entire DHCP process is as follows:

client sends DHCPDISCOVER
server sends DHCPOFFER
client sends DHCPREQUEST
client sends DHCPACK/NAK

(there are a few other DHCP messages but they are not usually part of the initial exchange)

It would appear that your client does not like the address it is being offered or it is not seeing the DHCPOFFER since it is continually issuing a DHCPDISCOVER request. More likely than not the client is not seeing the DHCPOFFER. I would use ethereal on both ends and see what packets each end is seeing.
 
Old 12-27-2006, 05:46 PM   #6
mapster
LQ Newbie
 
Registered: Mar 2005
Location: Norway
Distribution: Mandriva 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Well, I just can't understand why it won't work... According to ethereal, my client does receive the dhcp offer.

dhcpd output:
Code:
DHCPDISCOVER from 00:08:a1:2e:1b:cf via eth1
DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPDISCOVER from 00:08:a1:2e:1b:cf (MAPSTER) via eth1

DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPDISCOVER from 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPDISCOVER from 00:08:a1:2e:1b:cf (MAPSTER) via eth1
DHCPOFFER on 10.0.1.253 to 00:08:a1:2e:1b:cf (MAPSTER) via eth1
TcpDump on server computer:
Code:
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:a1:2e:1b:cf (oui Unknown), length 300
arp who-has 10.0.1.253 tell 10.0.1.1
IP 10.0.1.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
arp who-has 10.0.1.253 tell 10.0.1.1
arp who-has 10.0.1.253 tell 10.0.1.1
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:a1:2e:1b:cf (oui Unknown), length 300
IP 10.0.1.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:a1:2e:1b:cf (oui Unknown), length 300
IP 10.0.1.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
IPX 00000000.00:08:a1:2e:1b:cf.0453 > 00000000.ff:ff:ff:ff:ff:ff.0453: ipx-rip-resp 663045250/1.2
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:a1:2e:1b:cf (oui Unknown), length 300
IP 10.0.1.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 300
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.113.139.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
Ethereal output on client computer:
Code:
Source	  		Destination		Protocol	Info
0.0.0.0			255.255.255.255		DHCP		DHCP Discover
SunrichT_09:15:6d	Broadcast		ARP		Who has 10.0.1.253? Tell 10.0.1.1
10.0.1.1		255.255.255.255		DHCP		DHCP Offer
SunrichT_09:15:6d	Broadcast		ARP		Who has 10.0.1.253? Tell 10.0.1.1
SunrichT_09:15:6d	Broadcast		ARP		Who has 10.0.1.253? Tell 10.0.1.1
0.0.0.0			255.255.255.255		DHCP		DHCP Discover
10.0.1.1		255.255.255.255		DHCP		DHCP Offer
0.0.0.0			255.255.255.255		DHCP		DHCP Discover
10.0.1.1		255.255.255.255		DHCP		DHCP Offer
00000000.0008a12e1bcf	00000000.ffffffffffff	IPX RIP		Response
0.0.0.0			255.255.255.255		DHCP		DHCP Discover
10.0.1.1		255.255.255.255		DHCP		DHCP Offer
00000000.0008a12e1bcf	00000000.ffffffffffff	IPX RIP		Response

Last edited by mapster; 12-27-2006 at 05:57 PM.
 
Old 12-28-2006, 03:13 AM   #7
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Have you checked the settings on the the client pcs' firewalls? Specifically can a general broadcast message get through? If it is safe to do so (perhaps after disabling internet connection), you might try just dropping the firewall entirely as a troubleshooting technique.

If this doesn't work, try using the line

Code:
	range dynamic-bootp 10.0.1.16 10.0.1.250;
in your dhcpd.conf file and restarting dhcpd in case (for whatever reason!) the MS computer doesn't like the address 10.0.1.253.
 
Old 12-28-2006, 09:34 AM   #8
mapster
LQ Newbie
 
Registered: Mar 2005
Location: Norway
Distribution: Mandriva 2007
Posts: 23

Original Poster
Rep: Reputation: 15
I've tried it without firewall, it doesn't do any difference. I've also tried to decrease the size of the subnet, I've even tried to specify an ip based on the fysical address of the ethernet card on the client computer.

The client does accept the ip assigned from my Netopia 3351 router, though. I'll try with another client soon...

Last edited by mapster; 12-28-2006 at 09:37 AM.
 
Old 12-28-2006, 10:03 AM   #9
itzamecwp
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 20

Rep: Reputation: 0
Here's our working dhcp conf file. With reverse DNS update. Tweak this one.
ignore client-updates;
allow unknown-clients;
authoritative;
ddns-update-style interim;
ddns-updates on;
update-static-leases on;

key rndc-key {
secret xxxxxxxxxxxxxxxxxxxxxxxx;
algorithm hmac-md5;
}

zone sigtest.com. {
primary 127.0.0.1;
secondary 100.100.100.150;
key rndc-key;
}

zone 100.100.100.in-addr.arpa. {
primary 127.0.0.1;
secondary 100.100.100.150;
key rndc-key;
}

# Signet Services Pty Ltd
subnet 100.100.100.0 netmask 255.255.255.0 {
option broadcast-address 100.100.100.255;
option netbios-name-servers 100.100.100.150;
option time-servers 100.100.100.150;
ignore client-updates;
authoritative;
ddns-updates on;
ddns-rev-domainname "in-addr.arpa.";
range 100.100.100.100 100.100.100.200;
option subnet-mask 255.255.255.0;
option routers 100.100.100.10;
option domain-name "sigtest.com";
option domain-name-servers 100.100.100.150;
default-lease-time 3600;
max-lease-time 86400;
allow unknown-clients;
ddns-domainname "sigtest.com";
}
 
Old 12-28-2006, 10:53 AM   #10
mapster
LQ Newbie
 
Registered: Mar 2005
Location: Norway
Distribution: Mandriva 2007
Posts: 23

Original Poster
Rep: Reputation: 15
That conf file doesn't seem to work either, so I believe that it isn't the conf file that is the problem. I see that I don't have a 255.255.255.255 route on the server computer and I believe I've read somwhere that it needs to be there, is that correct?

Edit: Somehow I got it working To be honest I don't really now what was wrong though. Newbie as I am with linux, I did a re-install of the distro... And suddenly it works I do believe it had something to do with iptables, I looked at it before I re-installed and discovered that it was empty. I don't know squat about iptables so I decided to do a re-install.
Oh, and thankz for all the help I got

Last edited by mapster; 12-28-2006 at 12:29 PM.
 
  


Reply



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
Help with getting a simple dhcp server working GUIPenguin Linux - Networking 2 02-09-2006 07:06 AM
Changing server IP address from DHCP not working khooke Linux - Networking 3 09-25-2005 09:00 AM
dhcp server is not working properly..... shahg_shahg Linux - Networking 1 02-23-2005 07:12 AM
DNS from DHCP server not working mikegorb Linux - Networking 1 10-25-2004 03:02 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

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

All times are GMT -5. The time now is 04:51 PM.

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