설치 후 Isc-dhcp-server를 시작할 수 없는 이유는 무엇입니까?

설치 후 Isc-dhcp-server를 시작할 수 없는 이유는 무엇입니까?

나는 후속 조치를 취하고 있다이것 CD 리더기나 USB 부팅 기능이 없는 시스템에 Linux를 설치하기 위한 튜토리얼입니다. 결국 나는 그것을 설치해야 하는 지점에 도달했고 isc-dhcp-server, 그렇게 했습니다.

Apt부분적으로 설치된 패키지가 있다고 알려줍니다. 나는 실행 sudo apt-get install -f하고 다음을 얻습니다.

Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp server.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
dpkg: error processing package isc-dhcp-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
isc-dhcp-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

이렇게 하면 /etc/init.d/isc-dhcp-server start프롬프트에 동일한 메시지의 처음 두 줄이 포함됩니다.

출력 sudo systemctl status isc-dhcp-server:

● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server)
   Active: failed (Result: exit-code) since Fri 2014-12-12 13:19:25 CST; 2min 43s ago
  Process: 1677 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Dec 12 13:19:23 semplice dhcpd[1684]: you want, please write a subnet declaration
Dec 12 13:19:23 semplice dhcpd[1684]: in your dhcpd.conf file for the network segment
Dec 12 13:19:23 semplice dhcpd[1684]: to which interface eth0 is attached. **
Dec 12 13:19:23 semplice dhcpd[1684]: 
Dec 12 13:19:23 semplice dhcpd[1684]: 
Dec 12 13:19:25 semplice isc-dhcp-server[1677]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Dec 12 13:19:25 semplice isc-dhcp-server[1677]: failed!
Dec 12 13:19:25 semplice systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Dec 12 13:19:25 semplice systemd[1]: Failed to start LSB: DHCP server.
Dec 12 13:19:25 semplice systemd[1]: Unit isc-dhcp-server.service entered failed state.

출력 sudo journalctl -xn:

-- Logs begin at Fri 2014-12-12 12:57:16 CST, end at Fri 2014-12-12 13:32:01 CST. --
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   lease time 86400
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   domain name 'lan'
Dec 12 13:31:58 semplice dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.ser
Dec 12 13:31:58 semplice dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 13:31:58 semplice nm-dispatcher[2194]: Dispatching action 'dhcp4-change' for wlan0
Dec 12 13:31:58 semplice dhclient[616]: bound to 192.168.1.65 -- renewal in 45 seconds.
Dec 12 13:31:58 semplice NetworkManager[505]: bound to 192.168.1.65 -- renewal in 45 seconds.
Dec 12 13:32:01 semplice sudo[2197]: alejandro : TTY=pts/0 ; PWD=/home/alejandro ; USER=root ; COMMAND=/bin/journalctl -xn
Dec 12 13:32:01 semplice sudo[2197]: pam_unix(sudo:session): session opened for user root by alejandro(uid=0)

이것/etc/dhcp/dhcpd.config위 튜토리얼의 예제를 복사한 내 파일입니다 .

/var/log/syslog실행 후 즉시 출력 읽기apt-get install -f

Dec 12 16:42:40 localhost dhclient: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:42:40 localhost NetworkManager[505]: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:42:40 localhost dhclient: DHCPACK from 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: DHCPACK from 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info> (wlan0): DHCPv4 state changed renew -> renew
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   address 192.168.1.65
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   plen 24 (255.255.255.0)
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   gateway 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   server identifier 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   lease time 86400
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   domain name 'lan'
Dec 12 16:42:40 localhost dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Dec 12 16:42:40 localhost dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 16:42:40 localhost nm-dispatcher: Dispatching action 'dhcp4-change' for wlan0
Dec 12 16:42:41 localhost dhclient: bound to 192.168.1.65 -- renewal in 52 seconds.
Dec 12 16:42:41 localhost NetworkManager[505]: bound to 192.168.1.65 -- renewal in 52 seconds.
Dec 12 16:43:32 localhost dhclient: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:43:32 localhost NetworkManager[505]: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:43:32 localhost dhclient: DHCPACK from 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: DHCPACK from 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info> (wlan0): DHCPv4 state changed renew -> renew
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   address 192.168.1.65
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   plen 24 (255.255.255.0)
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   gateway 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   server identifier 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   lease time 86400
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   domain name 'lan'
Dec 12 16:43:32 localhost dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Dec 12 16:43:32 localhost dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 16:43:32 localhost nm-dispatcher: Dispatching action 'dhcp4-change' for wlan0
Dec 12 16:43:33 localhost dhclient: bound to 192.168.1.65 -- renewal in 54 seconds.
Dec 12 16:43:33 localhost NetworkManager[505]: bound to 192.168.1.65 -- renewal in 54 seconds.
Dec 12 16:43:40 localhost dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Dec 12 16:43:40 localhost dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Dec 12 16:43:40 localhost dhcpd: All rights reserved.
Dec 12 16:43:40 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 12 16:43:40 localhost dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Dec 12 16:43:40 localhost dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Dec 12 16:43:40 localhost dhcpd: All rights reserved.
Dec 12 16:43:40 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 12 16:43:40 localhost dhcpd: Wrote 0 deleted host decls to leases file.
Dec 12 16:43:40 localhost dhcpd: Wrote 0 new dynamic host decls to leases file.
Dec 12 16:43:40 localhost dhcpd: Wrote 0 leases to leases file.
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Dec 12 16:43:40 localhost dhcpd: ** Ignoring requests on eth0.  If this is not what
Dec 12 16:43:40 localhost dhcpd:    you want, please write a subnet declaration
Dec 12 16:43:40 localhost dhcpd:    in your dhcpd.conf file for the network segment
Dec 12 16:43:40 localhost dhcpd:    to which interface eth0 is attached. **
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: Not configured to listen on any interfaces!
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: If you think you have received this message due to a bug rather
Dec 12 16:43:40 localhost dhcpd: than a configuration issue please read the section on submitting
Dec 12 16:43:40 localhost dhcpd: bugs on either our web page at www.isc.org or in the README file
Dec 12 16:43:40 localhost dhcpd: before submitting a bug.  These pages explain the proper
Dec 12 16:43:40 localhost dhcpd: process and the information we find helpful for debugging..
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: exiting.
Dec 12 16:43:42 localhost isc-dhcp-server[5729]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Dec 12 16:43:42 localhost isc-dhcp-server[5729]: failed!
Dec 12 16:43:42 localhost systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Dec 12 16:43:42 localhost systemd[1]: Failed to start LSB: DHCP server.
Dec 12 16:43:42 localhost systemd[1]: Unit isc-dhcp-server.service entered failed state.

내 IP 주소를 숨겨야 합니까?

답변1

네트워크 구성이 dhcp.conf의 서브넷 선언과 일치하지 않는 것 같습니다. 10.10.1.0/24 서브넷의 IP 주소를 구성했는지 확인하세요. 다음을 사용하여 확인할 수 있습니다.

ip a

해당 IP 주소가 표시되지 않으면 eth0에 추가해 보세요.

ip a a 10.10.1.200/24 dev eth0

그런 다음 패키지를 다시 복구해 보십시오.

apt-get install -f

내 말이 맞다면 패키지를 설치하고 DHCP 데몬을 시작해야 하며 이 IP 주소를 /etc/network/interfaces에 유지하는 것이 좋습니다.

답변2

귀하의 질문은 여기에 있습니다:

Dec 12 16:43:40 localhost dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Dec 12 16:43:40 localhost dhcpd: ** Ignoring requests on eth0.  If this is not what
Dec 12 16:43:40 localhost dhcpd:    you want, please write a subnet declaration
Dec 12 16:43:40 localhost dhcpd:    in your dhcpd.conf file for the network segment
Dec 12 16:43:40 localhost dhcpd:    to which interface eth0 is attached. **
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: Not configured to listen on any interfaces!
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: If you think you have received this message due to a bug rather
Dec 12 16:43:40 localhost dhcpd: than a configuration issue please read the section on submitting
Dec 12 16:43:40 localhost dhcpd: bugs on either our web page at www.isc.org or in the README file
Dec 12 16:43:40 localhost dhcpd: before submitting a bug.  These pages explain the proper
Dec 12 16:43:40 localhost dhcpd: process and the information we find helpful for debugging..
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: exiting.

를 실행하면 오류 메시지를 재현할 수 있습니다 dhcpd -t -cf /etc/dhcp/dhcpd.conf.


아래 토폴로지 다이어그램에 표시된 것처럼 무선 인터넷 연결을 이더넷 네트워크의 다른 호스트와 공유하고 싶어하는 것 같습니다.


                            │ Uplink
               ┌────────────┴────────────┐
               │          wlan0          │
               │     192.168.1.65/24     │
               │                         │
               │        semplice         │
               │                         │
               │       10.10.1.1/24      │
               │          eth0           │
               └────────────┬────────────┘
     ┌──────────────┬───────┴────────┬──────────────┐
     │              │                │              │
   Host 1         Host 2           Host 3         Host 4
 10.10.1.21     10.10.1.22       10.10.1.23     10.10.1.24

귀하의 서버 주소는 eth010.10.1.1이라고 가정합니다. 를 실행하여 이를 확인하십시오 ip addr show dev eth0.

그런 다음 구성해야합니다 /etc/dhcp/dhcpd.conf인터페이스에 주소를 배포합니다 eth0. dhcpd실수로 실행된 악성 DHCP 서버는 주소가 필요한 모든 호스트에 주소를 전달하여 네트워크에 혼란을 초래할 수 있으므로 기본적 으로 아무것도 응답하지 않도록 구성됩니다.

/etc/dhcp/dhcpd.conf다음과 같은 섹션이 필요합니다 .

subnet 10.10.1.0 netmask 255.255.255.0 {
    option subnet-mask        255.255.255.0;
    option broadcast-address  10.10.1.255;
    option routers            10.10.1.1;
    pool {
        range 10.10.1.21 10.10.1.254;
    }
}

authoritative... , domain-name, domain-name-servers및 와 같은 문은 제외됩니다 default-lease-time. (필요에 따라 조정하세요. 원하는 네트워크 설정은 본인만이 알고 있습니다.)

/etc/default/isc-dhcp-server또한 Debian의 경우 설정하려면 편집해야 합니다.

INTERFACES="eth0"

이렇게 하면 서버가 이더넷 포트에서 수신 대기하게 됩니다. (당신은 듣고 싶지 않습니다 wlan0. 무선 액세스 포인트는 무선 클라이언트에 주소를 전달하는 역할을 담당합니다.)

관련 정보