dhcpd3 - No Free Leases

Antworten
meilon
Beiträge: 6
Registriert: 22 Okt 2008, 11:07

dhcpd3 - No Free Leases

Beitrag von meilon »

Hallo,

hier wurde ein alter Server abgeschaltet, der auch als Gateway diente. Dadurch wollte opsi nicht mehr funktionieren, deswegen habe ich einmal 1stboot.py nochmal ausgeführt, jetzt ist das Pingproblem behoben - und dabei alle entsprechenden Configs überschrieben :oops:

Dafür funktionier der DHCPd nicht mehr:

Code: Alles auswählen

Nov  5 14:44:15 bbi-goe-svr-04 dhcpd: DHCPDISCOVER from 00:0c:29:0d:9d:ec via eth0: network 10.6.0/17: no free leases
Nov  5 14:44:21 bbi-goe-svr-04 last message repeated 2 times
Dies erhalte ich, wenn ein Client einen PXE-Boot versucht. Da ich mit Client via opsi config editor löschen und wieder hinzufügen schlechte Erfahrungen gemacht habe, wollte ich wissen, wie ich das per config wieder gerade biegen kann!

Kann jemand helfen?
meilon
Beiträge: 6
Registriert: 22 Okt 2008, 11:07

Re: dhcpd3 - No Free Leases

Beitrag von meilon »

Hat denn Niemand eine Idee?
rfrankow
Beiträge: 146
Registriert: 03 Jul 2008, 15:06

Re: dhcpd3 - No Free Leases

Beitrag von rfrankow »

das ist ein bischen zu wenig infos. was genau meinst du?
das einzigste was mir komisch scheint ist das: "network 10.6.0/17:"
Benutzeravatar
j.schneider
uib-Team
Beiträge: 2045
Registriert: 29 Mai 2008, 15:14

Re: dhcpd3 - No Free Leases

Beitrag von j.schneider »

Hallo,

"no free leases" bedeutet, dass der DHCP-Server nicht weiß welche IP-Adresse er dem Client zuordnen soll.
Ist der Client in der /etc/dhcp3-server/dhcpd.conf mit der MAC-Adresse eingetragen?
Vielleicht einmal die dhcpd.conf posten.

Gruß
Jan Schneider


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


meilon
Beiträge: 6
Registriert: 22 Okt 2008, 11:07

Re: dhcpd3 - No Free Leases

Beitrag von meilon »

Hallo,

da es nun wieder die Basiskonfiguration der dhcpd.conf ist, fehlen natürlich die Einträge für die static Leases der opsi Clients. Hier unsere conf:

Code: Alles auswählen

#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "bbigoettingen.local";
option domain-name-servers 10.6.2.24;
option netbios-name-servers 10.6.2.25;
option netbios-node-type 8;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}

# This will tell the box its hostname while booting:
use-host-decl-names on;

subnet 10.6.0.0 netmask 255.255.128.0 {
        option routers 10.6.2.24;

        #Group the PXE bootable hosts together
        group {
                # PXE-specific configuration directives...
                #option dhcp-class-identifier "PXEClient";
                # You need an entry like this for every host
                # unless you are using dynamic addresses
                next-server 10.6.2.25;
                filename "linux/pxelinux.0";
                # test-client
                # host test-client {
                #               hardware ethernet 00:00:cb:62:e9:24;
                #               fixed-address test-client;
                # }
        }
}
Ich weiß leider nicht, wie ich einen opsi Client eintragen muss, damit opsi den client dann hinterher auch wieder über opsi gelöscht werden kann (spezielle Kommentare o.ä.?)

Danke schon mal vorweg!
Benutzeravatar
j.schneider
uib-Team
Beiträge: 2045
Registriert: 29 Mai 2008, 15:14

Re: dhcpd3 - No Free Leases

Beitrag von j.schneider »

Wenn man möchte, dass opsi die Clients auch in die dhcpd.conf einträgt muss man folgende Konfiguration vornehmen:
/etc/opsi/backendManager.d/30_vars.conf:

Code: Alles auswählen

...
self.clientManagingBackend = [ BACKEND_DHCPD, BACKEND_FILE31 ]
...
Danach den opsiconfd neu starten.

Code: Alles auswählen

/etc/init.d/opsiconfd restart


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


meilon
Beiträge: 6
Registriert: 22 Okt 2008, 11:07

Re: dhcpd3 - No Free Leases

Beitrag von meilon »

Diese Einstellung hatte ich nicht verändert, mir fehlten einfach nur die Zeilen, um einen Client identifizieren zu können. Ich habe dann einfach einen Fake-Client neu hinzugefügt und konnte so erkennen, was ich selber nachtragen musste:

Code: Alles auswählen

<DNS-Name des Clients> {
    fixed-address <IP-Adresse des Clients>;
    hardware ethernet <MAC-Adresse des Clients>;
}
Das ganze kommt in den Group Bereich des jeweiligen Subnets. Nur mal zum Nachschauen, sollte ich oder irgend jemand anderes seine dhcpd.conf zerstören wie ich :D
Gibt es keine automatisierte Lösung, die das übernimmt? Ich meine, in irgend einer Datenbank stehen ja alle Clients mit IP und MAC Adresse. Sollte ich jetzt 100 Clients haben, müsste ich die ja alle von hand nach dem Schema eintragen. Gibt es da ein Kommandozeilen Script, das sowas automatisch machen könnte?

Und jetzt mal etwas anderes, was eigentlich weniger mit opsi zu tun hat: Wie kann ich eine IP-Range bestimmten MACs zuordnen, ohne dass sie etwas mit opsi zu tun haben?

Ich habe testweise mal

Code: Alles auswählen

pool {
    range 10.6.2.100 10.6.2.120;
    include "/etc/dhcp3/bbi-notebooks.conf";
}
mit in den Subnetbereich gepackt, dadurch erhalten die opsi Clients aber "falsche" DHCPOFFERs und PXE Boot geht dann nicht mehr. In der bbi-notebooks.conf sind alle Notebooks drin, die über DHCP ihre IP bekommen sollen, aber noch nicht in opsi integriert werden sollen. Alle Notebooks sind nach diesem Schema drin:

Code: Alles auswählen

host <Notebook Name zur Identifizierung> {
        hardware ethernet <MAC Adresse>;
}
Kann mir jemand dabei helfen?
Antworten