DHCP funktioniert nach Upgrade nicht mehr

Hallo zusammen,

ich wollte in einer Virtuellen Maschine (vSphere) einen Client mit PXE-Boot konfigurieren - so dass ich an dem das neue Image immer weiter entwickeln kann. Leider funktionierte die Tastatur und Maus in LINBO nur für die Aufnahme der MAC-Adresse. Beim nächsten Booten erkannte LINBO dann weder Tastatur noch Maus. Hab vieles probiert und dachte dann, ein Upgrade hilft vielleicht (auch bei für unsere neuen Lenovo 13w-Convertibles).

Also nach Anleitung von 18.04 auf 22.04 und v7.2 geupgraded. Leider geht seit dem der DHCP-Dienst nicht mehr. Habe ich beim Upgrade eine Config-Datei überschreiben lassen?

Er findet die /etc/dhcp/devices.conf nicht - welche es auch nicht gibt :wink:

less /var/log/syslog |grep  dhcpd
Apr 30 09:50:01 linuxmuster dhcpd[782]: Internet Systems Consortium DHCP Server 4.4.1
Apr 30 09:50:01 linuxmuster dhcpd[782]: Copyright 2004-2018 Internet Systems Consortium.
Apr 30 09:50:01 linuxmuster dhcpd[782]: All rights reserved.
Apr 30 09:50:01 linuxmuster dhcpd[782]: For info, please visit https://www.isc.org/software/dhcp/
Apr 30 09:50:01 linuxmuster dhcpd[783]: Internet Systems Consortium DHCP Server 4.4.1
Apr 30 09:50:01 linuxmuster dhcpd[783]: Copyright 2004-2018 Internet Systems Consortium.
Apr 30 09:50:01 linuxmuster dhcpd[783]: All rights reserved.
Apr 30 09:50:01 linuxmuster dhcpd[783]: For info, please visit https://www.isc.org/software/dhcp/
Apr 30 09:50:01 linuxmuster dhcpd[783]: Config file: /etc/dhcp/dhcpd6.conf
Apr 30 09:50:01 linuxmuster sh[783]: Config file: /etc/dhcp/dhcpd6.conf
Apr 30 09:50:01 linuxmuster dhcpd[783]: Database file: /var/lib/dhcp/dhcpd6.leases
Apr 30 09:50:01 linuxmuster sh[783]: Database file: /var/lib/dhcp/dhcpd6.leases
Apr 30 09:50:01 linuxmuster dhcpd[783]: PID file: /run/dhcp-server/dhcpd6.pid
Apr 30 09:50:01 linuxmuster sh[783]: PID file: /run/dhcp-server/dhcpd6.pid
Apr 30 09:50:01 linuxmuster dhcpd[783]: Wrote 0 NA, 0 TA, 0 PD leases to lease file.
Apr 30 09:50:01 linuxmuster dhcpd[783]: 
Apr 30 09:50:01 linuxmuster dhcpd[783]: No subnet6 declaration for eth0 (fe80::250:56ff:feac:8598).
Apr 30 09:50:01 linuxmuster dhcpd[783]: ** Ignoring requests on eth0.  If this is not what
Apr 30 09:50:01 linuxmuster dhcpd[783]:    you want, please write a subnet6 declaration
Apr 30 09:50:01 linuxmuster dhcpd[783]:    in your dhcpd.conf file for the network segment
Apr 30 09:50:01 linuxmuster sh[783]:    in your dhcpd.conf file for the network segment
Apr 30 09:50:01 linuxmuster dhcpd[783]:    to which interface eth0 is attached. **
Apr 30 09:50:01 linuxmuster dhcpd[783]: 
Apr 30 09:50:01 linuxmuster dhcpd[783]: 
Apr 30 09:50:01 linuxmuster dhcpd[783]: Not configured to listen on any interfaces!
Apr 30 09:50:01 linuxmuster dhcpd[783]: 
Apr 30 09:50:01 linuxmuster dhcpd[783]: If you think you have received this message due to a bug rather
Apr 30 09:50:01 linuxmuster dhcpd[783]: than a configuration issue please read the section on submitting
Apr 30 09:50:01 linuxmuster dhcpd[783]: bugs on either our web page at www.isc.org or in the README file
Apr 30 09:50:01 linuxmuster dhcpd[783]: before submitting a bug.  These pages explain the proper
Apr 30 09:50:01 linuxmuster dhcpd[783]: process and the information we find helpful for debugging.
Apr 30 09:50:01 linuxmuster dhcpd[783]: 
Apr 30 09:50:01 linuxmuster dhcpd[783]: exiting.
Apr 30 09:50:01 linuxmuster dhcpd[782]: Can't open /etc/dhcp/devices.conf: No such file or directory
Apr 30 09:50:01 linuxmuster dhcpd[782]: 
Apr 30 09:50:01 linuxmuster dhcpd[782]: If you think you have received this message due to a bug rather
Apr 30 09:50:01 linuxmuster dhcpd[782]: than a configuration issue please read the section on submitting
Apr 30 09:50:01 linuxmuster dhcpd[782]: bugs on either our web page at www.isc.org or in the README file
Apr 30 09:50:01 linuxmuster dhcpd[782]: before submitting a bug.  These pages explain the proper
Apr 30 09:50:01 linuxmuster dhcpd[782]: process and the information we find helpful for debugging.
Apr 30 09:50:01 linuxmuster dhcpd[782]: 
Apr 30 09:50:01 linuxmuster dhcpd[782]: exiting.

Habt ihr eine Idee?

DANKE und liebe Grüße
Leo

Hallo,

Wen du es nicht weißt, solltest du den aktuellen Inhalt der DHCP-Konfiguration vielleicht hier einfügen, damit dir andere Teilnehmer das sagen können oder die Chance haben Abweichungen deiner Konfiguration mit ihrer funktionierenden Version zu vergleichen.

MfG
Buster

Gerne…
Also in der /etc/default/isc-dhcp-server steht nur

INTERFACESv4=""
INTERFACESv6=""

In der /etc/dhcp/dhcpd.confsteht

  GNU nano 6.2                                                                                  /etc/dhcp/dhcpd.conf                                                                                            
# /etc/dhcp/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#
# thomas@linuxmuster.net
# 20200414
#

# 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.)
server-identifier linuxmuster;
update-static-leases true;
ddns-update-style none;

# option definitions common to all supported networks...
server-name "linuxmuster.aesettlingen.de";
option domain-name "aesettlingen.de";
option domain-name-servers 10.0.0.1;
option netbios-name-servers 10.0.0.1;
option ntp-servers 10.0.0.1;
option font-servers 10.0.0.1;
use-host-decl-names on;

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;

allow booting;
allow bootp;

# Define option 150 for the grub menu
option grubmenu code 150 = text;
option arch code 93 = unsigned integer 16; #RFC4578

# arch specific boot images
if option arch = 00:06 {
 filename "boot/grub/i386-efi/core.efi";
} else if option arch = 00:07 {
 filename "boot/grub/x86_64-efi/core.efi";
} else {
 filename "boot/grub/i386-pc/core.0";
}

next-server 10.0.0.1;

# subnet definitions
include "/etc/dhcp/subnets.conf";

# dhcp events
include "/etc/dhcp/events.conf";

group {

 # groessere lease time fuer feste ips
 default-lease-time 172800;
 max-lease-time 172800;

 # dynamically created stuff by linuxmuster-import-devices is included
 include "/etc/dhcp/devices.conf";

 # put your custom stuff in this included file
 include "/etc/dhcp/custom.conf";
}

Dann zu den vier einzubindenen Config-Dateien:

  1. /etc/dhcp/events.conf
# Subnet 10.0.0.0/16 server network
subnet 10.0.0.0 netmask 255.255.0.0 {
  option routers 10.0.0.254;
  option subnet-mask 255.255.0.0;
  option broadcast-address 10.0.255.255;
  option netbios-name-servers 10.0.0.1;
  range 10.0.255.1 10.0.255.254;
  option host-name pxeclient;
}


  1. /etc/dhcp/events.conf
# thomas@linuxmuster.net
# 20220119

if not static {
  on commit {
    set clip = binary-to-ascii(10, 8, ".", leased-address);
    execute("/usr/lib/linuxmuster/dhcpd-update-samba-dns.py", "add", clip, host-decl-name, "yes");
  }
  on release {
    set clip = binary-to-ascii(10, 8, ".", leased-address);
    execute("/usr/lib/linuxmuster/dhcpd-update-samba-dns.py", "delete", clip, host-decl-name, "yes");
  }
  on expiry {
    set clip = binary-to-ascii(10, 8, ".", leased-address);
    execute("/usr/lib/linuxmuster/dhcpd-update-samba-dns.py", "delete", clip, host-decl-name, "yes");
  }
}
  1. Die /etc/dhcp/devices.conf, welche eingebunden werden soll gibt es wirklich nicht…
  2. Die /etc/dhcp/custom.conf ist leer (außer ein paar Kommentare)

Hoffe das hilft…

Ich habe jetzt mal eine leere /etc/dhcp/devices.conf angelegt und damit scheint er sich zufrieden zu geben… sorry fürs stören…
Die beiden anderen Probleme kommen im neuen Thread… :wink:

Hallo Leo,

ich denke nicht, dass das schon die Lösung war.
In meiner /etc/dhcp/devices.conf
steht die Zeile:

include „/etc/dhcp/devices/default-school.conf“;

und in der referenzierten default-school.conf stehen meine devices drin.
Ich nehme stark an, dass linuxmuster-import-devices diese Datei befüllt.

Nach änderungen an den Dateien solltest du den dhcp neustarten.

LG

Holger

Hallo Holger,
du hast leider recht. Habe die Datei angelegt und deinen Inhalt eingetragen… Nach dem leeren anlegen der /etc/dhcp/devices.conf kann ich zwar den DHCP wieder starten systemctl start isc-dhcp-server aber der linuxmuster-import-devices läuft fast 35 Minuten, wobei er lange nach der Ausgabe #### sophomorix-device finished OK! ### hängt:

root@linuxmuster:~# linuxmuster-import-devices
------------------------------------------------------------------------------
#### linuxmuster-import-devices startet at 2024-04-30 13:52:26            ####
------------------------------------------------------------------------------
#### Starting sophomorix-device syntax check:                             ####
#### sophomorix-device finished  OK!                                      ####
------------------------------------------------------------------------------
#### Working on dhcp configuration for devices                            ####
#### * in subnet 10.0.0.0/16:                                             ####
####   linuxmuster     | 10.0.0.1        | addc            | 0 |          ####
####   eth8            | 10.0.2.8        | classroom-stude | 1 | efi64    ####
####   eth10           | 10.0.1.10       | classroom-stude | 1 | efi64    ####
####   eth2            | 10.0.1.2        | classroom-stude | 1 | efi64    ####
####   eth7            | 10.0.1.7        | classroom-stude | 1 | efi64    ####
####   eth21           | 10.0.1.21       | classroom-stude | 1 | efi64    ####
####   sda1            | 10.0.2.1        | classroom-stude | 1 | efi64    ####
####   Yoga-LRA050158  | 10.0.3.2        | classroom-stude | 1 | efi64    ####
####   eth19           | 10.0.1.19       | classroom-stude | 1 usb-eth-1 | efi64  ####
invalid literal for int() with base 10: '1 usb-eth-1'
------------------------------------------------------------------------------
#### Working on linbo/grub configuration for devices:                     ####
####   eth8            | vcn                                              ####
####   eth10           | vcn                                              ####
####   eth2            | vcn                                              ####
####   eth7            | vcn                                              ####
####   eth21           | vcn                                              ####
####   sda1            | vcn                                              ####
####   Yoga-LRA050158  | vcn                                              ####
####   Lenovo-U-1      | lmn50                                            ####
------------------------------------------------------------------------------
#### Working on linbo/grub configuration for groups:                      ####
####                   | linbo start.conf     | grub cfg                  ####
####   ----------------+----------------------+---------------------      ####
####   vcn             | present              | replaced                  ####
####   lmn50           | present              | replaced                  ####
------------------------------------------------------------------------------
#### Finally restarting dhcp service.                                     ####
------------------------------------------------------------------------------
#### linuxmuster-import-devices finished at 2024-04-30 14:25:54           ####
------------------------------------------------------------------------------

Aus einem sophomorix-device --dry-run kann ich keine Probleme erkennen:

root@linuxmuster:~# 
Command line::
Option json is a modifier option
Hmmh. do not know what to do with option info
Option verbose is a modifier option
* forcing info mode
Option combinations successfully checked
OK: SophomorixSchemaVersion 1 matches required Version 1
#### Reading /usr/share/sophomorix/devel/sophomorix.ini                       ####
#### Distro-check: Ubuntu 22.04 is OK                                         ####
#### Reading /etc/samba/smb.conf                                              ####
#### Reading /usr/lib/linuxmuster-webui/etc/default-ui-permissions.ini        ####
#### Parsing: net conf list                                                   ####
#### Asking domain passwordsettings from samba                                ####
#### Reading /etc/linuxmuster/sophomorix/sophomorix.conf                      ####
#### Reading /etc/linuxmuster/sophomorix/default-school/school.conf           ####
#### Query AD for device (start)                                              ####
#### 13 Computers found in AD                                                 ####
#### 9 sophomorix rooms/devicegroupes found in AD                             ####
#### 9 dnsZones found                                                         ####
#### 65 sophomorix dnsNodes found                                             ####
#### Sorting lists ...                                                        ####
#### Query AD for device (end)                                                ####
#### Reading /etc/linuxmuster/sophomorix/default-school/devices.csv           ####
#### /usr/sbin/sophomorix-device started ...                                  ####
#### /usr/sbin/sophomorix-device terminated regularly                         ####
Calling console printout
LOG       : Reading /etc/linuxmuster/sophomorix/default-school/devices.csv    
LOG       : All *.devices.csv files without syntax error                      
LOG       : /usr/sbin/sophomorix-device terminated regularly   

Ich habe nochmal ein linuxmuster-import-devices ausgeführt und dabei die /var/log/syslog angeschaut… Hier stand um 14:400 Uhr „nur“ folgende Einträge. Interessant ist die fünf-minütige Pause:

Apr 30 14:31:32 linuxmuster systemd[1]: Started ISC DHCP IPv4 server.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Internet Systems Consortium DHCP Server 4.4.1
Apr 30 14:31:32 linuxmuster sh[3351]: Internet Systems Consortium DHCP Server 4.4.1
Apr 30 14:31:32 linuxmuster sh[3351]: Copyright 2004-2018 Internet Systems Consortium.
Apr 30 14:31:32 linuxmuster sh[3351]: All rights reserved.
Apr 30 14:31:32 linuxmuster sh[3351]: For info, please visit https://www.isc.org/software/dhcp/
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Copyright 2004-2018 Internet Systems Consortium.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: All rights reserved.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: For info, please visit https://www.isc.org/software/dhcp/
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Config file: /etc/dhcp/dhcpd.conf
Apr 30 14:31:32 linuxmuster sh[3351]: Config file: /etc/dhcp/dhcpd.conf
Apr 30 14:31:32 linuxmuster sh[3351]: Database file: /var/lib/dhcp/dhcpd.leases
Apr 30 14:31:32 linuxmuster sh[3351]: PID file: /run/dhcp-server/dhcpd.pid
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Database file: /var/lib/dhcp/dhcpd.leases
Apr 30 14:31:32 linuxmuster dhcpd[3351]: PID file: /run/dhcp-server/dhcpd.pid
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Internet Systems Consortium DHCP Server 4.4.1
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Copyright 2004-2018 Internet Systems Consortium.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: All rights reserved.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: For info, please visit https://www.isc.org/software/dhcp/
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Wrote 0 deleted host decls to leases file.
Apr 30 14:31:32 linuxmuster sh[3351]: Wrote 0 deleted host decls to leases file.
Apr 30 14:31:32 linuxmuster sh[3351]: Wrote 0 new dynamic host decls to leases file.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Wrote 0 new dynamic host decls to leases file.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Wrote 177 leases to leases file.
Apr 30 14:31:32 linuxmuster sh[3351]: Wrote 177 leases to leases file.
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Listening on LPF/eth0/00:50:56:ac:85:98/10.0.0.0/16
Apr 30 14:31:32 linuxmuster sh[3351]: Listening on LPF/eth0/00:50:56:ac:85:98/10.0.0.0/16
Apr 30 14:31:32 linuxmuster sh[3351]: Sending on   LPF/eth0/00:50:56:ac:85:98/10.0.0.0/16
Apr 30 14:31:32 linuxmuster sh[3351]: Sending on   Socket/fallback/fallback-net
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Sending on   LPF/eth0/00:50:56:ac:85:98/10.0.0.0/16
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Sending on   Socket/fallback/fallback-net
Apr 30 14:31:32 linuxmuster dhcpd[3351]: Server starting service.
Apr 30 14:31:59 linuxmuster dhcpd[3351]: execute_statement argv[0] = /usr/lib/linuxmuster/dhcpd-update-samba-dns.py
Apr 30 14:31:59 linuxmuster dhcpd[3351]: execute_statement argv[1] = add
Apr 30 14:31:59 linuxmuster dhcpd[3351]: execute_statement argv[2] = 10.0.255.234
Apr 30 14:31:59 linuxmuster dhcpd[3351]: data: host_decl_name: not available
Apr 30 14:31:59 linuxmuster dhcpd[3351]: execute: bad arg 3
Apr 30 14:31:59 linuxmuster dhcpd[3351]: DHCPREQUEST for 10.0.255.234 from 60:6d:3c:e0:82:6c via eth0
Apr 30 14:31:59 linuxmuster dhcpd[3351]: DHCPACK on 10.0.255.234 to 60:6d:3c:e0:82:6c via eth0
Apr 30 14:36:59 linuxmuster dhcpd[3351]: execute_statement argv[0] = /usr/lib/linuxmuster/dhcpd-update-samba-dns.py
Apr 30 14:36:59 linuxmuster dhcpd[3351]: execute_statement argv[1] = add
Apr 30 14:36:59 linuxmuster dhcpd[3351]: execute_statement argv[2] = 10.0.255.234
Apr 30 14:36:59 linuxmuster dhcpd[3351]: data: host_decl_name: not available
Apr 30 14:36:59 linuxmuster dhcpd[3351]: execute: bad arg 3
Apr 30 14:36:59 linuxmuster dhcpd[3351]: DHCPREQUEST for 10.0.255.234 from 60:6d:3c:e0:82:6c via eth0
Apr 30 14:36:59 linuxmuster dhcpd[3351]: DHCPACK on 10.0.255.234 to 60:6d:3c:e0:82:6c via eth0

Auffällig finde ich den Eintrag dhcpd[3351]: data: host_decl_name: not available.
Kann damit aber nichts anfangen…
Hast du mal wieder eine Idee? Oder soll ich das Upgrade nochmal durchführen? Hab ja nen Snapshot davon…

VIELEN DANK mal wieder!
Liebe Grüße
Leo

Hallo Leo,

nun kann es sein, das wir den Fehler ganz schnell finden: dann wäre das bequemer als snapshot zurück holen und nochmal machen, aber wir wissen ja nicht, wo das Problem her kam.
Das Upgrade sollte ohne Probleme laufen: wir wüßten ja dann nicht, wo das Problem lag und ob da nicht noch andere Leichen im Keller sind.
Insofern würde ich, wenn die Zeit dazu da ist, lieber nochmal zurück gehen und das Upgrade ganz genau nach Anleitung durchführen und genau hinschauen, ob da irgend wo eine Fehlermeldung kommt.

LG

Holger

Hi,

Also in der unteren Zeile fehlt ein „|“ vor dem usb-eth-1, so dass da die Spaltenanzahl nicht mit den restlichen Zeilen übereinstimmt.

Korrektur: Prüfe bitte, ob „1 usb-eth-1“ einge gültige Angabe für die Spalte ist. Die nachfolgende Fehlermeldung lässt den Schluss zu, dass dem nicht der Fall ist und dort nur eine Zahl erwartet wird, die mit int() versucht wird auf Integer zu konvertieren.

VG
Buster