Bonjour,
Je rencontre un problèmes pour la mise en service d'un serveur DHCP après le redémarrage du serveur, il est down.
IP Link
Interfaces:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether e2:85:c1:26:d9:af brd ff:ff:ff:ff:ff:ff altname enp0s18
Procédure d'installation du DHCP
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 ######################################### source /etc/network/interfaces.d/* ########################################## # Adresse de bouclage auto lo iface lo inet loopback ########################################## # Interface principale en Statique auto ens18 allow-hotplug ens18 iface ens18 inet static address 192.168.10.5 netmask 255.255.255.0 gateway 192.168.10.1 dns-nameservers 192.168.10.1
Erreur Après installation
Code : Sélectionner tout - Visualiser dans une fenêtre à part apt install -y isc-dhcp-server;
/etc/default/isc-dhcp-server
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Job for isc-dhcp-server.service failed because the control process exited with error code. See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details. invoke-rc.d: initscript isc-dhcp-server, action "start" failed. ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated) Active: failed (Result: exit-code) since Sun 2023-10-01 07:27:44 CEST; 3ms ago Docs: man:systemd-sysv-generator(8) Process: 611 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE) CPU: 16ms oct. 01 07:27:42 sldebian dhcpd[626]: before submitting a bug. These pages explain the proper oct. 01 07:27:42 sldebian dhcpd[626]: process and the information we find helpful for debugging. oct. 01 07:27:42 sldebian dhcpd[626]: oct. 01 07:27:42 sldebian dhcpd[626]: exiting. oct. 01 07:27:44 sldebian isc-dhcp-server[611]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... oct. 01 07:27:44 sldebian isc-dhcp-server[631]: failed! oct. 01 07:27:44 sldebian isc-dhcp-server[632]: failed! oct. 01 07:27:44 sldebian systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE oct. 01 07:27:44 sldebian systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'. oct. 01 07:27:44 sldebian systemd[1]: Failed to start LSB: DHCP server. Traitement des actions différées («*triggers*») pour libc-bin (2.31-13+deb11u6)*... Traitement des actions différées («*triggers*») pour man-db (2.9.4-2)*...
/etc/dhcp/dhcpd.conf
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 echo 'DHCPDv4_CONF=/etc/dhcp/dhcpd.conf DHCPDv4_PID=/var/run/dhcpd.pid INTERFACESv4="ens18" ' > /etc/default/isc-dhcp-server;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.20 192.168.10.30; default-lease-time 86400; max-lease-time 676800; # option domain-name-servers 192.168.10.1; # option domain-name lan.local; option netbios-name-servers 192.168.10.1; option routers 192.168.10.1; option subnet-mask 255.255.255.0; option broadcast-address 192.168.10.255; }
Démarrage manuel du service.
Etat du service
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 root@sldebian:~# systemctl status isc-dhcp-server; ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated) Active: active (running) since Sun 2023-10-01 07:25:51 CEST; 3min 45s ago Docs: man:systemd-sysv-generator(8) Process: 1630 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=0/SUCCESS) Tasks: 4 (limit: 2322) Memory: 4.7M CPU: 15ms CGroup: /system.slice/isc-dhcp-server.service └─1642 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens18 oct. 01 07:25:49 sldebian systemd[1]: Starting LSB: DHCP server... oct. 01 07:25:49 sldebian isc-dhcp-server[1630]: Launching IPv4 server only. oct. 01 07:25:49 sldebian dhcpd[1642]: Wrote 0 leases to leases file. oct. 01 07:25:49 sldebian dhcpd[1642]: Server starting service. oct. 01 07:25:51 sldebian isc-dhcp-server[1630]: Starting ISC DHCPv4 server: dhcpd. oct. 01 07:25:51 sldebian systemd[1]: Started LSB: DHCP server.
Relance de la machine
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 root@sldebian:~# systemctl --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● isc-dhcp-server.service loaded failed failed LSB: DHCP server root@sldebian:~# journalctl -xe -u isc-dhcp-server.service ░░ Support: https://www.debian.org/support ░░ ░░ The unit isc-dhcp-server.service has successfully entered the 'dead' state. oct. 01 07:30:19 sldebian systemd[1]: Stopped LSB: DHCP server. ░░ Subject: L'unité (unit) isc-dhcp-server.service a terminé son arrêt ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ L'unité (unit) isc-dhcp-server.service a terminé son arrêt. -- Boot 1d5b3020b5e74037ac2b10a11eb2ffa9 -- oct. 01 09:14:14 sldebian systemd[1]: Starting LSB: DHCP server... ░░ Subject: L'unité (unit) isc-dhcp-server.service a commencé à démarrer ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ L'unité (unit) isc-dhcp-server.service a commencé à démarrer. oct. 01 09:14:14 sldebian isc-dhcp-server[298]: Launching IPv4 server only. oct. 01 09:14:14 sldebian dhcpd[361]: Wrote 0 leases to leases file. oct. 01 09:14:14 sldebian dhcpd[361]: oct. 01 09:14:14 sldebian dhcpd[361]: No subnet declaration for ens18 (no IPv4 addresses). oct. 01 09:14:14 sldebian dhcpd[361]: ** Ignoring requests on ens18. If this is not what oct. 01 09:14:14 sldebian dhcpd[361]: you want, please write a subnet declaration oct. 01 09:14:14 sldebian dhcpd[361]: in your dhcpd.conf file for the network segment oct. 01 09:14:14 sldebian dhcpd[361]: to which interface ens18 is attached. ** oct. 01 09:14:14 sldebian dhcpd[361]: oct. 01 09:14:14 sldebian dhcpd[361]: oct. 01 09:14:14 sldebian dhcpd[361]: Not configured to listen on any interfaces! oct. 01 09:14:14 sldebian dhcpd[361]: oct. 01 09:14:14 sldebian dhcpd[361]: If you think you have received this message due to a bug rather oct. 01 09:14:14 sldebian dhcpd[361]: than a configuration issue please read the section on submitting oct. 01 09:14:14 sldebian dhcpd[361]: bugs on either our web page at www.isc.org or in the README file oct. 01 09:14:14 sldebian dhcpd[361]: before submitting a bug. These pages explain the proper oct. 01 09:14:14 sldebian dhcpd[361]: process and the information we find helpful for debugging. oct. 01 09:14:14 sldebian dhcpd[361]: oct. 01 09:14:14 sldebian dhcpd[361]: exiting. oct. 01 09:14:16 sldebian isc-dhcp-server[298]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... oct. 01 09:14:16 sldebian isc-dhcp-server[473]: failed! oct. 01 09:14:16 sldebian isc-dhcp-server[474]: failed! oct. 01 09:14:16 sldebian systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ An ExecStart= process belonging to unit isc-dhcp-server.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. oct. 01 09:14:16 sldebian systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ The unit isc-dhcp-server.service has entered the 'failed' state with result 'exit-code'. oct. 01 09:14:16 sldebian systemd[1]: Failed to start LSB: DHCP server. ░░ Subject: L'unité (unit) isc-dhcp-server.service a échoué ░░ Defined-By: systemd ░░ Support: https://www.debian.org/support ░░ ░░ L'unité (unit) isc-dhcp-server.service a échoué, avec le résultat failed.
Partager