DHCP Server einrichten?!

Post Reply
Message
Author
DOSe

DHCP Server einrichten?!

#1 Post by DOSe »

Hallo ich möchte gerne mir einen DHCP server einrichten

hab dhcpd installiert und meine Systemkonfiguration sieht so aus:
Fedora Core 2
eth0 FixIP 192.168.0.1 NetzwerkLAN
eth1 FixIP 192.168.0.2 NetzwerkDSL
ethDSL Dynamische Ip T-Online zugang

meine /etc/dhcpd.conf sieht so aus:

# Simple Beispiel-Konfiguration

subnet 192.168.0.1 netmask 255.255.255.0 {
range 192.168.0.20 192.168.4.250;
default-lease-time 86400;
max-lease-time 2592000;
}

ich hab das so gemacht wie in dem Tutorial von der Seite hier

wenn ich aber den Server starte kommt Folgendes.

/etc/rc.d/init.d/dhcpd start
dhcpd starten: Internet Software Consortium DHCP Server V3.0.1rc12
Copyright 1995-2003 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
/etc/dhcpd.conf line 3: subnet 192.168.0.1 netmask 255.255.255.0: bad subnet number/mask combination.
subnet 192.168.0.1 netmask 255.255.255.0
^
Configuration file errors encountered -- exiting

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
[FEHLGESCHLAGEN]

was hab ich Falsch gemacht?!

bin für jede Hilfe dankbar will im Grunde das Windows von Linux das Internet nutzen kann.

User avatar
Stormbringer
Posts: 1570
Joined: 11. Jan 2001 11:01
Location: Ruhrgebiet

#2 Post by Stormbringer »

Hi,

drei Dinge:
a) externes und internes Interface liegen im gleichen Subnet -> das ist nicht schön!
b)

Code: Select all

subnet 192.168.0.1 netmask 255.255.255.0 { 
Sollte heißen: subnet 192.168.0.0 netmask 255.255.255.0 {
c) auch eth1 wird eine ip Adresse zugewiesen bekommen ...

Gruß
Continuum Hierarchy Supervisor:
You have already been assimilated.
(Rechtschreibungsreformverweigerer!)

DOSe

#3 Post by DOSe »

a) externes und internes Interface liegen im gleichen Subnet -> das ist nicht schön! <- was soll das genau heissen?

Bin noch blutiger anfänger. :)

und im Tutorial stand das dieses beispiel nur für eine Netzwerkkarte ist wie weiss ich was da noch fehlt?!

Thx 4 Help schonmal.

User avatar
Stormbringer
Posts: 1570
Joined: 11. Jan 2001 11:01
Location: Ruhrgebiet

#4 Post by Stormbringer »

Hi,

hier mal ein Beispiel der /etc/dhcpd.conf:

Code: Select all

option time-servers 192.53.103.103;
option domain-name-servers 192.168.20.1;
option domain-name "local.lan";
option broadcast-address 192.168.20.255;
option subnet-mask 255.255.255.0;
option routers 192.168.0.1;
#
#
ddns-update-style none;
ddns-updates off;
default-lease-time 600;
log-facility local7;
max-lease-time 7200;
#
# 2nd LAN
subnet 192.168.20.0 netmask 255.255.255.0 &#123;
        default-lease-time 86400;
        max-lease-time 604800;
#        option domain-name local.lan2;
        option domain-name-servers 192.168.20.1;
        option routers 192.168.20.1;
        option smtp-server 192.168.20.1;
        option time-servers 192.168.20.1;
        range 192.168.20.100 192.168.20.200;
        deny unknown-clients;
        &#125;
(Ist aber nicht getestet! Die ip Adressen mußt Du halt anpassen.)

Gruß
Continuum Hierarchy Supervisor:
You have already been assimilated.
(Rechtschreibungsreformverweigerer!)

User avatar
Hans Solo
prolinux-forum-admin
Posts: 601
Joined: 20. Apr 2004 12:19
Location: AT
Contact:

#5 Post by Hans Solo »

hi
ausserdem musst du den server mit
dhcpd eth0
starten

mfg
arno
[root@host]# cd /pub
[root@host]# more beer

Otto

#6 Post by Otto »

192.168.0.0 statt 192.168.0.1
192.168.0.250 statt 192.168.4.250

Sollte also heißen:

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.20 192.168.0.250;
...

Post Reply