Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-16-2004, 02:23 AM
|
#1
|
Member
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37
Rep:
|
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.
|
|
|
10-16-2004, 05:29 AM
|
#2
|
Member
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667
Rep:
|
try to start the server with "dhcpd eth0".
add a line:
option routers <internel_iface_ip>;
to you conf.
sl mritch.
|
|
|
10-16-2004, 07:22 AM
|
#3
|
Member
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37
Original Poster
Rep:
|
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.
|
|
|
10-16-2004, 11:10 AM
|
#4
|
Member
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667
Rep:
|
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.
|
|
|
10-16-2004, 12:47 PM
|
#5
|
Member
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37
Original Poster
Rep:
|
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.
|
|
|
10-16-2004, 02:19 PM
|
#6
|
Member
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667
Rep:
|
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.
|
|
|
10-16-2004, 04:06 PM
|
#7
|
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380
Rep:
|
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.
|
|
|
10-17-2004, 02:55 AM
|
#8
|
Member
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37
Original Poster
Rep:
|
I find this strange...
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.
|
|
|
10-17-2004, 03:54 AM
|
#9
|
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380
Rep:
|
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.
|
|
|
10-17-2004, 12:30 PM
|
#10
|
Member
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 08:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|