LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-16-2004, 02:23 AM   #1
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Rep: Reputation: 15
Problems concerning DHCP-server on my Debian 3.0r2 server


It's hard to be a newbie, that's for sure.

The goal
========
My goal is to setup a text based (no X) file/print/internet/webserver server using Debian 3.0r2. With use of Samba for a few Windows clients, using DHCP for addressing. The server should have a shareable Internet connection using a 56K modem. No direct NET or DSL possible here, I'm affraid. It should also have a laser printer connected on the parallell port. The PC is an old Packard Bell 266 Intel P2 w 384 MB ram & 120 MB hdd. It has only one ethernet card, a 3COM, 3C905CX, with static IP, set to 192.168.7.1. The Apache webserver should be for local net use only. The server is UPS secured by an APC (Smart-UPS) for power loss, using the apcupsd daemon, which is not yet tested. It shouldn't be that hard to fix, I thought for a couple of weeks ago anyway. Later, Webmin and PHP4 will be added.

When installing I set no domain name, since it's local and no local DNS is used
Only a workgroup name is already set, to be able to get Samba working.

The Problem
============
My problem is to configuring the /etc/dhcpd.conf file.

After running:
dhcpd start

I receive:
"No subnet declaration for start(0.0.0.0)
Please write a subnet declaration in your dhcpd.conf file for the
network segment to which interface start is attached.
exiting."

An ifconfig etho command, seems ok, with the right IP-address etc.

I seached the net and found tons of people having the same error message, but noone seems to be able to solve it. The few answers I found, didn't help me anyway. Some says "you should have the options declaration within the subnet declarations", others don't. No one seems to actually knowing, only guessing.

My /etc/dhcpd.conf file:
subnet 192.168.7.0 netmask 255.255.255.0 {
range 192.168.7.10 192.168.7.20;
option domain-name "192.168.7.1";
option broadcast-address 192.168.7.255;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
}

I would really appreciate if anyone could share some light on this.

TIA

Last edited by spaceuser; 10-16-2004 at 02:26 AM.
 
Old 10-16-2004, 05:29 AM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
try to start the server with "dhcpd eth0".
add a line:
option routers <internel_iface_ip>;
to you conf.

sl mritch.
 
Old 10-16-2004, 07:22 AM   #3
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
option routers <internel_iface_ip>;
Tried that one and also to start using, dhcpd eth0, and receive the same answer as before.

BTW, the /etc/init.d/dhcp script already contains an INTERFACES = "eth0" tag. Do I really have to point out the ethernet card anyway, there is only one in the computer. Also the start script for dhcpd assumes eth0.

So the problem is still there... sorry to say

Last edited by spaceuser; 10-16-2004 at 07:24 AM.
 
Old 10-16-2004, 11:10 AM   #4
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
Quote:
... already contains an INTERFACES = "eth0" tag.
no you don't. was just an idea.

..but i thought the router option would help :-(

option routers <internel_iface_ip> = option routers 192.168.7.1
...internal_...


sl mritch.
 
Old 10-16-2004, 12:47 PM   #5
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
Yes it's strange that it wont work for me.

I put the option routers line like below:

subnet 192.168.7.0 netmask 255.255.255.0 {
range 192.168.7.10 192.168.7.20;
option domain-name "192.168.7.1";
option broadcast-address 192.168.7.255;
option subnet-mask 255.255.255.0;
option routers 192.168.7.1;
default-lease-time 600;
max-lease-time 7200;
}

I hope the order of the dhcpd.conf contents is not important

Thanks for your effort to help.
 
Old 10-16-2004, 02:19 PM   #6
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
the "dhcpd eth0" was because...

you're a dhcp client from your isp and
a dhcpd-server for your inner net.

..so i wanted to go sure dhcpd doesn't look around to see whats on. afaik there are other dhcp-servers around. try another? i just know udhcpd for now.

sl ritch.
 
Old 10-16-2004, 04:06 PM   #7
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You need a couple of things to complete the project.
To configure the network you need to edit /etc/network/interfaces and add;

auto eth0
iface eth0 inet dhcp

To allow other computers to use the route you need to install ip-masq (apt-get install ip-masq). Iwould suggest using MonMoth's firewall which will do both firewalling and forwarding for you.
Edit: Link is doing some weird stuff but MonMothas firewall is very popular and there are a number of artciles on it and they will come up on a google search.

Last edited by TigerOC; 10-16-2004 at 04:11 PM.
 
Old 10-17-2004, 02:55 AM   #8
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
I find this strange...
Quote:
iface eth0 inet dhcp
Could that really be the right thing to do, since my Internet connection is established using a 56K modem, and the eth0 is used to be able to create a local LAN. Shouldn't my dhcp settings be static for eth0 then. My current /etc/network/interfaces looks like this:

Code:
# The loopback interface
auto lo 
iface lo inet loopback

# The first network card - this entry was created during Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
            address 192.168.7.1
            netmask 255.255.255.0
            network 192.168.7.0
            broadcast 192.168.7.255

BTW, thanks for the tip about the firewall

Last edited by spaceuser; 10-17-2004 at 02:56 AM.
 
Old 10-17-2004, 03:54 AM   #9
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
If you not going to run a dhcp server then using static addressing for the interface is fine. You can leave it as is.
If you are using a modem connection then using MonMotha's firewall is all you need. When you configure the script you tell it that the external interface is the modem ppp0 and the internal interface is eth0. With ip-masq installed the script then takes care of ip-forward and ip-masquerading for you and acts as a firewall into the bargain. There is no need for dhcp at all which is really an old M$ concept.
 
Old 10-17-2004, 12:30 PM   #10
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Original Poster
Rep: Reputation: 15
Talking

Quote:
There is no need for dhcp at all which is really an old M$ concept.
Didn't know that M$ was behind the dhcp thing, but I like it anyway, it's kind of neat when you as me move between LANs, and you don't need to change the static IPs on the laptop all the time.

I need to confess that I think I have found why I receive the dhcp respone, "No subnet declaration for start(0.0.0.0)....."

I downloaded and followed the document, "Installing Debian GNU/Linux 3.0 For Intel x86", from the debian.org site. In the chapter 4.5.3, I quote,
Quote:
After you have edited the `dhcpd' configuration file, restart it with `/etc/init.d/dhcpd restart'
I have all the time tried, /etc/init.d/dhcpd start
But to start/stop it, I should have use, /etc/init.d/dhcp start
So now, I can connect my clients to it as expected.

Thanks, for all the help anyway. I will now configuring Samba and printing and also the MonMotha's firewall, so hopefully I will manage a few hours.
 
  


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
Controlling Poff/Pon on a Debian 3.0r2 server from Win clients? spaceuser Debian 1 10-22-2004 12:44 PM
Simple Debian Router including a DHCP Server stormblast Debian 20 09-22-2004 05:11 AM
ATI Radeon and X-Window-Server on Debian 3.0r2 ilyanep Linux - General 4 09-09-2004 05:34 PM
Cannot connect to apt source server - Debian 3.0r2 Andanos Debian 2 04-21-2004 11:39 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 08:36 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