LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-03-2005, 10:55 PM   #1
oberon-ken-obi
LQ Newbie
 
Registered: Jul 2004
Location: Oberon Australia
Distribution: Fedora Core3
Posts: 26

Rep: Reputation: 15
dhcp not writing leases


Hi all

Fedora Core2

Error message is as follows, excuse the format but im re-typing it from a screenshot.png.
dhcpd failed. The error was: Starting dhcpd Internet Systems Consortium DHCP Server V3.0.1rc14.
Copywrite etc blah blah.
For more info see www.isc.org/sw/dhcp/
[went here and it had no solution that I could understand]

Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.

Not configured to listen on any interfaces!

Goes on to say if i didnt get this from isc.org dont ask for help.
Read the readme before complaining, etc etc.

Problem began when I was told I would get better performance if I use static ip addresses. After backing up and writing down all the relevant config info that I thought I was changing, I tried it and I was unable to get it right. So I figured I will just go back to dhcp. Now it seems something other than the things I changed by hand have been altered as well.

Sending this via a WinXP box ... sorry the FC box PSU died so I installed the drive in a slid in cradle and failed to write the exact path/file name. I didnt change this file when I tried to set static ip addresses.

This is from memory.

/etc/dhcp(d?).conf is empty except for the # comments at the beginning.

I have man both dhcp.leases and dhcpd.conf and could not quite understand what was required.

I used the example dhcpd.conf file but it didnt work and I dont know what I needed to change for my implementation.

Dont know what else to post, please tell me of any other info needed to resolve my problem.

Regards

Allan

EDIT
fixed with reinstall of FC2, kinda makes my tag a bit redundant :+\
how do i remove the whole thread

Last edited by oberon-ken-obi; 04-05-2005 at 11:54 PM.
 
Old 04-04-2005, 06:30 AM   #2
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
Well, it is very confusing message indeed.

So,
1) Your linux is currently dead due to a malfunctional PSU. You plug the original linux harddrive into a XP box such that you can access the Linux files, right? (Why u did this, BTW?)

2) You tried to use static IP address for your Linux machine. For this cause, you altered something. Did that include the dhcpd.conf or not? What kind of manual changes you have made?

Actually, when you said, "/etc/dhcp(d?).conf is empty except for the # comments at the beginning.", doesn't it explain why the error message come up? You must define something such that dhcpd knows about the range of IPs that it has to distribute to.


Honestly, the sample dhcpd.conf is very very plain and easy to understand. If you cannot follows it, I do not think anyone else can do it better. Basically you follows each items defined in the conf file and substitute the dummy values with yours setting.
 
Old 04-04-2005, 06:57 AM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
When you get it powered up again post the output of ifconfig and the contents of the dhcpd.conf file you have tried.

You may also need to create the leases file if it does not exist.
 
Old 04-04-2005, 11:28 PM   #4
oberon-ken-obi
LQ Newbie
 
Registered: Jul 2004
Location: Oberon Australia
Distribution: Fedora Core3
Posts: 26

Original Poster
Rep: Reputation: 15
Hi all

Maybe I was not so clear initially.

In answer to ahwkong questions 1. and 2.

I did this so i could post a question. WinXP box had windows OS drive removed. FC2 was used via a slide in carriage, ie. not dual boot.

I did not manually alter any .conf files making the static ip address changes. All of the things I manually changed were written down and all were changed back when I couldnt get statics to work. Obviously things I didnt back up AND did not change manualy were altered by the OS somehow.

Quote---
Actually, when you said, "/etc/dhcp(d?).conf is empty except for the # comments at the beginning.", doesn't it explain why the error message come up? You must define something such that dhcpd knows about the range of IPs that it has to distribute to.
/Quote---

the (d?) reference was due to the fact that i was not sure if it was dhcp.conf OR dhcpd.conf.from my falable memory.

If I knew the answer, I would not post here.

Does that make it clearer ahwkong?

-----------

Thanks DavidPhillips for your input so far.

Output of ifconfig is

----------------
[root@brellium dhcp]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:6E:2B:C9:07
inet addr:10.1.1.101 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::20c:6eff:fe2b:c907/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:7182 (7.0 Kb)
Interrupt:10 Base address:0x9800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2186 errors:0 dropped:0 overruns:0 frame:0
TX packets:2186 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2046040 (1.9 Mb) TX bytes:2046040 (1.9 Mb)

[root@brellium dhcp]#


----------------

Contents of dhcpd.conf is

----------------

ddns-update-style interim;
ignore client-updates;

subnet 239.252.197.0 netmask 255.255.255.0 {
range 239.252.197.10 239.252.197.250;
default-lease-time 600;

}


------------------

This was just the minimum that the man dhcpd.conf said may work.
I dont know where the 1st two lines came from, i didnt try to comment those out, now that i think about it..

I have read the section on dhcpd.leases and it said this

--------------------

When dhcpd is first installed, there is no lease database. However,
dhcpd requires that a lease database be present before it will start.
To make the initial lease database, just create an empty file called
/var/lib/dhcp/dhcpd.leases. You can do this with:

touch /var/lib/dhcp/dhcpd.leases

-------------------

I then did that. Contents of dhcpd.leases is

-------------------

# All times in this file are in UTC (GMT), not your local timezone. This is
# not a bug, so please don't ask about it. There is no portable way to
# store leases in the local timezone, so please don't request this as a
# feature. If this is inconvenient or confusing to you, we sincerely
# apologize. Seriously, though - don't ask.
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.0.1rc12

all comments, no meat at all.

---------------------

Error message when I try to start dhcp with services control tool at this point is now.

---------------------------

For more info, please visit http://www.isc.org/products/DHCP
Wrote 0 leases to leases file.


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

-----------------------------

Now I am aware that the problem is at least partly here, my eth0 card has address of 10.1.1.101
and I have the default numbers
range 239.252.197.10 239.252.197.250;
I did try to change the range to 10.1.1.0 10.1.1.200
and matched the netmask to the output from ifconfig for that device. ie.255.0.0.0

Other various errors occured then, so I put it back to default settings suggested in man dhcp
and since I seem not to be able to grasp the concepts needed, and after some time spent I offer it up for your further suggestions.

Kindest regards

Allan
 
Old 04-04-2005, 11:40 PM   #5
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
I am not challenging the file name per se. And I just wonder, if your description says it is an empty dhcpd.conf, then of course it must give rise to a problem. You need to define something in the dhcpd.conf. If it is the case, shouldn't you put back the content.

That's why I said you made a very confused post in the first place.

Please show a little bit of respect, young man. People are just volunteers here.

So long.
 
Old 04-04-2005, 11:53 PM   #6
oberon-ken-obi
LQ Newbie
 
Registered: Jul 2004
Location: Oberon Australia
Distribution: Fedora Core3
Posts: 26

Original Poster
Rep: Reputation: 15
ahwkong

I have nothing but respect for the people who post on these boards, you seem to have taken what I said in the wrong context. I was merely trying to clarify what I said as sometimes I am a bit unclear about things, and I just wanted to make sure I got the file names correct so there would be no confusion. Ack seems the harder I try sometimes, it becomes as clear as mud.

As I have stated I didnt remove anything manually from the dhcpd.conf file so i cannot put it back. I realise that something needs to be in the file, but what that is, is the whole crux of the post.
What seems obvious to you, is not to me.

I did try to resolve it myself but not having an understanding of the dhcp protocol (even after reading man pages) I was unsuccessful at resolving it.

And thanks for the young man reference, 39 years young. I like the sound of that :+)

Regards

Allan
 
Old 04-07-2005, 07:16 AM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
that's at least part of the problem

ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:6E:2B:C9:07
inet addr:10.1.1.101 Bcast:10.255.255.255 Mask:255.0.0.0


the ip and subnet mask define the network as 10.0.0.0

This network must have a subnet declaration in your dhcpd.conf file.



something like this would be needed..

subnet 10.0.0.0 netmask 255.0.0.0 {
range 10.1.1.102 10.1.1.200;
default-lease-time 600;

}


The range of IP's shown is an example, use what you want to have excluding any used ip's on the network in this range.


You may want to also add dns servers and default gateway (router) to the dhcpd.conf



Post some of the other errors.

more options

max-lease-time 3600;
option routers 10.1.1.101;
option broadcast-address 10.255.255.255;
option domain-name "something.com";
# something valid here
option domain-name-servers 68.63.0.5, 68.63.0.6;





Last edited by DavidPhillips; 04-07-2005 at 07:31 AM.
 
Old 04-12-2005, 07:50 PM   #8
oberon-ken-obi
LQ Newbie
 
Registered: Jul 2004
Location: Oberon Australia
Distribution: Fedora Core3
Posts: 26

Original Poster
Rep: Reputation: 15
Hi DavidPhillips

Been doing other stuff so didnt try you idea till now. Your help is most certainly appreciated, I did as suggested regarding

DavidPhilips said...
something like this would be needed..

Code:
subnet 10.0.0.0 netmask 255.0.0.0 {
range 10.1.1.102 10.1.1.200;
default-lease-time 600;

}
Still nothing, so doing what all good newbies do was to start again with a clean slate.

Install went without a hitch, basically a default FC2 Desktop install to keep it simple and to have a working box with which to post.
Given the option at install to use DHCP or static I chose the former enabled firewall, allowed www through it.
Probed for modem, found it. Setup FInish.
Kernel was oldish (2.6.5-1.358) so I ran

Code:
# rpm -Uhv kernel 2.6.9-1_FC2.i686.rpm from the directory in which i had it stored.

This appeared to work fine.
However it broke DHCP (or something did), good grief i dont know what I do wrong sometimes. I did no other updates changed nothing else. So I re-did all the above steps/suggestions but still to no avail.

Still nothing, so doing what all good newbies do was to start again with a clean slate. At least I have documented it well this time.

Now I am posting from the FC2 box NOTHING updated at all, and thinking a great idea would be to make a copy of /etc/dhcpd.conf and any other dhcp* files that were auto generated, I did

Code:
# find / -name dhcp -mount
No dhcp.conf, no dhcpd.leases only have /var/lib/dhcp which is an empty directory.

ifconfig yields the following...

Code:
[root@localhost dhcp]# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:7264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7264 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:15250005 (14.5 Mb)  TX bytes:15250005 (14.5 Mb)
 
ppp0      Link encap:Point-to-Point Protocol
          inet addr:203.xxx.xxx.xxx  P-t-P:203.xxx.xxx.xxx  Mask:255.255.255.255      # masked as I have seen others do the same when posting 
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:7056 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7596 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:6782034 (6.4 Mb)  TX bytes:632484 (617.6 Kb)
 
[root@localhost dhcp]#
I am totally bewildered now, service-configuration tool does'nt even have DHCP listed (let alone running).
Still using dial-up, called my ISP and they say they have not changed anything pertaining to this, IE i still need DHCP enabled to connect.
Dont get the DHCP error at boot.

I am going to remove my tag until I can actually practice what I preach....

Yours,
now totally bewildered

Allan
 
Old 04-14-2005, 01:44 PM   #9
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
You do not need a dhcp server to connect to your isp. Maybe that's the problem. If however you do ned a dhcp server then you must create the required files and install and run dhcpd.


What are we trying to do again?
 
  


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
hostname not showing up in DHCP leases table! halo14 Debian 0 03-24-2005 09:37 AM
Wrong Hostname in the DNS and DHCP Address Leases of Windows 2000 saneax Linux - Networking 1 03-03-2005 03:14 AM
DHCP leases file not being generated. abhijeetudas Linux - Networking 1 09-25-2004 10:31 PM
DNS not resolving notes server name and dhcp not releasing leases DanielKwok Linux - Networking 1 02-10-2004 10:04 PM
Gotta learn to crawl...DHCP is writing no leases for my Win ME laptop?! yurlittlepony Linux - Networking 2 05-31-2003 08:20 PM


All times are GMT -5. The time now is 03:55 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