LINUX.ORG.RU
ФорумAdmin

Настройка dhcp-сервера

 , ,


0

0

При попытке рестарта dhcp-сервера следующим образом

sudo service isc-dhcp-server restart
выдаёт выхлоп «Job for isc-dhcp-server.service failed because the control process exited with error code. See „systemcl status isc-dhcp-server.service“ and „journalctl -xe“ for details». Выхлоп
 systemctl status isc-dhcp-server.service
isc-dhcp-server.service-LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset; enabled)
Active:failed (Result: exit -code)
Docs: man (systemd-sysv-generator(8)
Process: 921 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
Конфиг dhcpd.conf
option domain-name-servers 8.8.8.8, 8.8.4.4;
option ip-forwarding on;
default-lease-time 60;
min-lease-time 120;
max-lease-time 300;
authoritative;
ddns-update-style interim;
log-facility local7;
shared-network PXE-Netwotk {
  subnet 10.0.10.0 netmask 255.255.255.0 {
  range 10.0.10.10 10.0.10.254;
  option routers 10.0.10.1;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 8.8.8.8, 8.8.4.4;
  filename "pxelinux.0";
  next-server 10.0.10.1;
  option root-path "10.0.10.1:/srv/tftp/";
  }
}
«Внутрянка» /interfaces/
auto lo
iface lo inet loopback

ОС-Debian 9.

Ответ на: комментарий от madcore

Зис

Nov 12 09:42:54 user systemd[746]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:54 user systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:54 user systemd[1]: apt-daily-upgrade.timer: Adding 1min 34.26003
Nov 12 09:42:54 user systemd[1]: anacron.timer: Adding 4min 26.058017s random
Nov 12 09:42:54 user systemd[1]: apt-daily.timer: Adding 6h 5min 21.283674s ra
Nov 12 09:42:54 user systemd[624]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:56 user sudo[2547]:   user : TTY=pts/0 ; PWD=/home/user/Deskt
Nov 12 09:42:56 user sudo[2547]: pam_unix(sudo:session): session opened for us
lines 3136-3158/3158 (END)
Nov 12 09:42:54 user systemd[746]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:54 user systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:54 user systemd[1]: apt-daily-upgrade.timer: Adding 1min 34.260033
Nov 12 09:42:54 user systemd[1]: anacron.timer: Adding 4min 26.058017s random t
Nov 12 09:42:54 user systemd[1]: apt-daily.timer: Adding 6h 5min 21.283674s ran
Nov 12 09:42:54 user systemd[624]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st,
Nov 12 09:42:56 user sudo[2547]:   user : TTY=pts/0 ; PWD=/home/user/Deskto
Nov 12 09:42:56 user sudo[2547]: pam_unix(sudo:session): session opened for use
lines 3136-3158/3158 (END)
Nov 12 09:42:54 user systemd[746]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1
Nov 12 09:42:54 user systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1
Nov 12 09:42:54 user systemd[1]: apt-daily-upgrade.timer: Adding 1min 34.260033s
Nov 12 09:42:54 user systemd[1]: anacron.timer: Adding 4min 26.058017s random ti
Nov 12 09:42:54 user systemd[1]: apt-daily.timer: Adding 6h 5min 21.283674s rand
Nov 12 09:42:54 user systemd[624]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1
Nov 12 09:42:56 user sudo[2547]:   user : TTY=pts/0 ; PWD=/home/user/Desktop
Nov 12 09:42:56 user sudo[2547]: pam_unix(sudo:session): session opened for user
lines 3136-3158/3158 (END)
Nov 12 09:42:54 user systemd[746]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Nov 12 09:42:54 user systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Nov 12 09:42:54 user systemd[1]: apt-daily-upgrade.timer: Adding 1min 34.260033s random time.
Nov 12 09:42:54 user systemd[1]: anacron.timer: Adding 4min 26.058017s random time.
Nov 12 09:42:54 user systemd[1]: apt-daily.timer: Adding 6h 5min 21.283674s random time.
Nov 12 09:42:54 user systemd[624]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Nov 12 09:42:56 user sudo[2547]:   user : TTY=pts/0 ; PWD=/home/user/Desktop ; USER=root ; COMMAND=/bin/jou
Nov 12 09:42:56 user sudo[2547]: pam_unix(sudo:session): session opened for user root by (uid=0)

subatomicshifter ()
Ответ на: комментарий от FireFighter
cat /etc/default/isc-dhcp-server

выдаёт следующее

#DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.pid
#Path to dhcpd's PID file (default: /var/run/dhcpd.pid)
#DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPD_v6=PID=/var/run/dhcpd6.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".
INTERFACESv4="eth0"
#INTERFACESv6=""
Что касается статики
ip addr
выдаёт
 inet 10.10.1.100/24 brd 10.10.1.255 scope global eth0

cat /etc/network/interfaces

выдаёт вот такой выхлоп

 #the loopback network interface
auto lo
iface lo inet loopback
#iface eth0 inet dhcp
auto eth0 
iface eth0 inet static
address 10.10.1.100
netmask 255.255.255.0
gateway 10.10.1.1

subatomicshifter ()

Конфиг dhcp-сервера на 23.11

option domain-name-servers 8.8.8.8, 8.8.4.4;
option ip-forwarding on;
default-lease-time 60;
min-lease-time 120;
max-lease-time 300;
authoritative;
ddns-update-style interim;
log-facility local7;
shared-network PXE-Netwotk {
  subnet 10.0.10.0 netmask 255.255.255.0 {
  range 10.0.10.10 10.0.10.254;
  option routers 10.0.10.1;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 8.8.8.8, 8.8.4.4;
  filename "pxelinux.0";
  next-server 10.0.10.1;
  option root-path "10.0.10.1:/srv/tftp/";
address=10.0.10.0/24;
gateway=10.0.10.1; 
dns-server=8.8.8.8, 8.8.4.4;
wins-server="";
ntp-server=212.20.50.208;
caps-manager="";
domain="domain.local";
next-server=10.0.10.1;
boot-file-name="pxelinux.0";
dhcp-option="";
  }
}
source /etc/network/interfaces.d/*
#the loopback network interface
auto lo
iface io inet loopback
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 10.0.10.100
netmask 255.255.255.0
gateway 10.0.10

subatomicshifter ()