つまり、LSBを起動できません:DHCPサーバー

つまり、LSBを起動できません:DHCPサーバー

ラズベリーでこんなものを作りたいです。


                        │ Uplink
           ┌────────────┴────────────┐
           │          wlan0          │
           │     192.168.1.65/24     │
           │                         │
           │        semplice         │
           │                         │
           │       10.10.1.1/24      │
           │          eth0           │
           └────────────┬────────────┘
 ┌──────────────┬───────┴────────┬──────────────┐
 │              │                │              │

ホスト 1 ホスト 2 ホスト 3 ホスト 4 10.10.1.21 10.10.1.22 10.10.1.23 10.10.1.24

インストールしました

sudo apt-get install isc-dhcp-server

マイ/etc/ネットワーク/インターフェース

    auto lo
    iface lo inet loopback

    iface eth0 inet static #// We want a static address
    address 172.16.20.21
    gateway 172.16.20.62 #//My router as this points to the internet
    netmask 255.255.255.0

                 
    # Include files from /etc/network/interfaces.d:
    source-directory /etc/network/interfaces.d

私の/etc/default/isc-dhcp-server

INTERFACES="eth0"

最後に私の "/etc/dhcp/dhcpd.conf"

  subnet 172.16.20.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  range 172.16.20.10 172.16.20.19;
  range 172.16.20.30 172.16.20.49;
  option domain-name-servers 172.16.20.62;
  option domain-name "home";
  option routers 172.16.20.62;
  option broadcast-address 172.16.20.255;
  option domain-name "home";
  default-lease-time 600;
  max-lease-time 7200;
}

ddns-update-style none;

サーバーを起動したいとき

sudo 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.

Journalctl -xeが私に与えた

    -- 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.
Nov 26 17:59:26 raspberrypi systemd[1]: isc-dhcp-server.service: Failed with res
-- 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 '
Nov 26 17:59:26 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: A start job for unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit isc-dhcp-server.service has finished with a failure.
-- 
-- The job identifier is 1873 and the job result is failed.
Nov 26 17:59:26 raspberrypi sudo[3694]: pam_unix(sudo:session): session closed f
Nov 26 17:59:29 raspberrypi sudo[3736]:       pi : TTY=pts/0 ; PWD=/home/pi ; US
Nov 26 17:59:29 raspberrypi sudo[3736]: pam_unix(sudo:session): session opened f
Nov 26 18:00:06 raspberrypi sudo[3736]: pam_unix(sudo:session): session closed f
lines 1478-1500/1500 (END)
-- 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.
Nov 26 17:59:26 raspberrypi 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'.
Nov 26 17:59:26 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: A start job for unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit isc-dhcp-server.service has finished with a failure.
-- 
-- The job identifier is 1873 and the job result is failed.
Nov 26 17:59:26 raspberrypi sudo[3694]: pam_unix(sudo:session): session closed for user root
Nov 26 17:59:29 raspberrypi sudo[3736]:       pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/nano /etc/dhcp/dhcpd.conf
Nov 26 17:59:29 raspberrypi sudo[3736]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 26 18:00:06 raspberrypi sudo[3736]: pam_unix(sudo:session): session closed for user root

systemctl 状態 isc-dhcp-server.service

   ● isc-dhcp-server.service - LSB: DHCP server
       Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
       Active: failed (Result: exit-code) since Thu 2020-11-26 17:59:26 CET; 45s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 3718 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status
    
    Nov 26 17:59:23 raspberrypi dhcpd[3732]: bugs on either our web page at www.isc.
    Nov 26 17:59:23 raspberrypi dhcpd[3732]: before submitting a bug.  These pages e
    Nov 26 17:59:23 raspberrypi dhcpd[3732]: process and the information we find hel
    Nov 26 17:59:23 raspberrypi dhcpd[3732]: 
    Nov 26 17:59:23 raspberrypi dhcpd[3732]: exiting.
    Nov 26 17:59:25 raspberrypi isc-dhcp-server[3718]: Starting ISC DHCPv4 server: d
    Nov 26 17:59:26 raspberrypi isc-dhcp-server[3718]:  failed!
    Nov 26 17:59:26 raspberrypi systemd[1]: isc-dhcp-server.service: Control process
    Nov 26 17:59:26 raspberrypi systemd[1]: isc-dhcp-server.service: Failed with res
    Nov 26 17:59:26 raspberrypi systemd[1]: Failed to start LSB: DHCP server.

何が問題なのか調べてください。

ご協力ありがとうございます

ベストアンサー1

解決策が見つかりました。私はフォローしています誤った指示。彼らは固定IPを作成します/etc/network/interfaces。ただし、文書には次のように記載されています。

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

同じ問題を抱えている人は注意してくださいこのガイドライン

私は固定IPを提供しましたwlan0(忘れないでくださいwpa-conf)。

おすすめ記事