Serveur dhcp qui ne démarre pas

Bonjour,

Mon serveur dhcp ne démarre pas / plus !

[quote]# apt-cache policy isc-dhcp-server
isc-dhcp-server:
Installé : 4.3.5-3
Candidat : 4.3.5-3[/quote]

[quote]root@serveur-debian:/etc/dhcp# service isc-dhcp-server start
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.[/quote]

[quote]# journalctl -p err
– Logs begin at Sun 2017-09-24 09:11:53 CEST, end at Sun 2017-09-24 14:32:44 CEST. –
sept. 24 09:11:56 serveur-debian kernel: snd_hda_intel 0000:04:01.0: CORB reset timeout#1, CORBRP = 0
sept. 24 09:11:57 serveur-debian kernel: powernow_k8: [Firmware Bug]: No PSB or ACPI _PSS objects
sept. 24 09:11:57 serveur-debian kernel: powernow_k8: Make sure that your BIOS is up to date and Cool
sept. 24 09:12:04 serveur-debian ntpdate[688]: Can’t find host 0.fr.pool.ntp.org: Name or service not
sept. 24 09:12:04 serveur-debian ntpdate[688]: Can’t find host 1.fr.pool.ntp.org: Name or service not
sept. 24 09:12:04 serveur-debian ntpdate[688]: Can’t find host 2.fr.pool.ntp.org: Name or service not
sept. 24 09:12:04 serveur-debian ntpdate[688]: Can’t find host 3.fr.pool.ntp.org: Name or service not
sept. 24 09:12:04 serveur-debian ntpdate[688]: no servers can be used, exiting
sept. 24 09:12:16 serveur-debian systemd[1]: Failed to start LSB: Squid HTTP Proxy version 3.x.
sept. 24 09:12:18 serveur-debian dhcpd[1052]:
sept. 24 09:12:18 serveur-debian dhcpd[1052]: No subnet declaration for wlan0 (no IPv4 addresses).
sept. 24 09:12:18 serveur-debian dhcpd[1052]: ** Ignoring requests on wlan0. If this is not what
sept. 24 09:12:18 serveur-debian dhcpd[1052]: you want, please write a subnet declaration
sept. 24 09:12:18 serveur-debian dhcpd[1052]: in your dhcpd.conf file for the network segment
sept. 24 09:12:18 serveur-debian dhcpd[1052]: to which interface wlan0 is attached. **
sept. 24 09:12:18 serveur-debian dhcpd[1052]:
sept. 24 09:12:18 serveur-debian dhcpd[1052]:
sept. 24 09:12:18 serveur-debian dhcpd[1052]: No subnet declaration for eth0 (192.168.1.10).
sept. 24 09:12:18 serveur-debian dhcpd[1052]: ** Ignoring requests on eth0. If this is not what
sept. 24 09:12:18 serveur-debian dhcpd[1052]: you want, please write a subnet declaration
sept. 24 09:12:18 serveur-debian dhcpd[1052]: in your dhcpd.conf file for the network segment
sept. 24 09:12:18 serveur-debian dhcpd[1052]: to which interface eth0 is attached. **[/quote]
Voici le journal d’erreurs en .txt
journalctl240917.txt (69,7 Ko)

Quel est le contenu de dhcpd.conf ?

root@serveur-debian:/etc/dhcp# cat dhcpd.conf
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "monreseau";
option domain-name-servers 81.253.149.9, 80.10.246.1;
#option domain-name-servers 80.10.246.1, 80.10.246.2;

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 172.16.10.0 netmask 255.255.255.240 {
  range 172.16.10.2 172.16.10.14;
#  option domain-name-servers 172.16.10.1;
#  option domain-name "monreseau";
  option routers 172.16.10.1;
  option broadcast-address 172.16.10.15;
  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;
#  }
#}

J’ai migré mon serveur de wheezy vers stretch. Les règles iptables sont-elles conservées ?

Prière d’entourer avec des balises de code (texte préformaté, icône </> juste au dessus de la zone de saisie) pour que ce soit lisible. Je ne lirai pas en l’état actuel.
Merci.

Ça dépend comment elles sont mises en place. De toute façon tu peux vérifier avec iptables-save.

Et la sortie de ip addr tant qu’on y est.

comme çà ?!

# iptables-save
# Generated by iptables-save v1.6.0 on Sun Sep 24 14:59:10 2017
*nat
:PREROUTING ACCEPT [7010:938644]
:INPUT ACCEPT [1452:186770]
:OUTPUT ACCEPT [1100:83162]
:POSTROUTING ACCEPT [892:61352]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sun Sep 24 14:59:10 2017
# Generated by iptables-save v1.6.0 on Sun Sep 24 14:59:10 2017
*filter
:INPUT ACCEPT [18419:2084443]
:FORWARD ACCEPT [416352:317299845]
:OUTPUT ACCEPT [10319:1081797]
COMMIT

root@serveur-debian:/etc/dhcp# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UNKNOWN group default qlen 1000
    link/ether 00:08:a1:6d:be:ef brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 00:16:17:ba:be:68 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:17ff:feba:be68/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether e8:94:f6:ed:d2:0f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ea94:f6ff:feed:d20f/64 scope link 
       valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:08:a1:6d:be:ef brd ff:ff:ff:ff:ff:ff
    inet 172.16.10.1/28 brd 172.16.10.15 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::208:a1ff:fe6d:beef/64 scope link 
       valid_lft forever preferred_lft forever

Oui, comme ça. Edite ton message précédent pour faire pareil avec le contenu de dhcpd.conf (PAS dans un nouveau message !).

Voilà :wink:

t’es sur que ta carte réseau n’a pas été renommé de ethx a enp ou ens ?
il cherche eth0

dans ce fichier

/etc/default/isc-dhcp-server

et tu dois être en static dans celui la

/etc/network/interfaces

et tu dois avoir un block dans le dhcp.conf qui contient le range de eth0 et d’après les logs c’est pas le cas

Le seul réseau défini dans dhcpd.conf est

  subnet 172.16.10.0 netmask 255.255.255.240 {

Le pont br0 a bien une adresse IP 172.16.10.1/28 dans ce réseau.
Pas de message dans les logs disant qu’il n’y a pas de réseau configuré pour br0, contrairement aux autres interfaces. Pourtant à la fin ça dit que dhcpd n’est configuré pour aucune interface.
Je ne vois pas ce qui cloche.
Que contient /etc/default/isc-dhcp-server ?

# cat /etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPD_CONF=/etc/dhcp/dhcpd.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.pid

# Additional options to start dhcpd with.
#	Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#	Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""

Comment le savoir ?

c’est bon on le voit dans se que tu as fournis. Mais tu dois le retrouver dans /etc/default/isc-dhcp-server et être en static dans ta conf /etc/network/interfaces

Tu peux essayer de forcer INTERFACES=“br0”, mais ça m’étonnerait que ça change quelque chose.

Effectivement çà ne change rien.

oui br0 pas eth0 pardon, et c’est peut etre aussi parcequ’il start le dhcp avant que br0 soit monté

J’ai réinstallé ‘isc-dhcp-server’. Le message a changé :
# journalctl -p err
– Logs begin at Sun 2017-09-24 21:29:23 CEST, end at Sun 2017-09-24 21:31:56 CEST. –
sept. 24 21:29:27 serveur-debian kernel: snd_hda_intel 0000:04:01.0: CORB reset timeout#1, CORBRP
sept. 24 21:29:27 serveur-debian kernel: powernow_k8: [Firmware Bug]: No PSB or ACPI _PSS objects
sept. 24 21:29:27 serveur-debian kernel: powernow_k8: Make sure that your BIOS is up to date and C
sept. 24 21:29:34 serveur-debian ntpdate[653]: Can’t find host 0.fr.pool.ntp.org: Name or service
sept. 24 21:29:34 serveur-debian ntpdate[653]: Can’t find host 1.fr.pool.ntp.org: Name or service
sept. 24 21:29:34 serveur-debian ntpdate[653]: Can’t find host 2.fr.pool.ntp.org: Name or service
sept. 24 21:29:34 serveur-debian ntpdate[653]: Can’t find host 3.fr.pool.ntp.org: Name or service
sept. 24 21:29:34 serveur-debian ntpdate[653]: no servers can be used, exiting
sept. 24 21:29:47 serveur-debian systemd[1]: Failed to start LSB: Squid HTTP Proxy version 3.x.
sept. 24 21:29:51 serveur-debian systemd[1]: Failed to start Network UPS Tools - power device moni

# /etc/init.d/isc-dhcp-server restart
[ ok ] Restarting isc-dhcp-server (via systemctl): isc-dhcp-server.service.