내 DHCP 서버가 실행되지 않는 이유는 무엇입니까?

내 DHCP 서버가 실행되지 않는 이유는 무엇입니까?

나는 설정 /etc/default/isc-dhcp-server하고 eth0을 설정했습니다./etc/dhcp/dhcpd.conf

isc-dhcp 서버가 실행되지 않는 이유는 무엇입니까? 내가 실행 sudo service isc-dhcp-server status하고 이것을 얻었을 때 :

root@ubuntu:~# service isc-dhcp-server status
● isc-dhcp-server.service - ISC DHCP IPv4 server
   Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Di 2015-11-03 15:27:57 CET; 15s ago
     Docs: man:dhcpd(8)
  Process: 6982 ExecStart=/bin/sh -ec      CONFIG_FILE=/etc/dhcp/dhcpd.conf;      if [ -f /etc/ltsp/dhcpd.conf ]; then CONFIG_FILE=/etc/ltsp/dhcpd.conf; fi;      [ -e /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases;      chown root:root /var/lib/dhcp /var/lib/dhcp/dhcpd.leases*;      exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf $CONFIG_FILE $INTERFACES (code=exited, status=1/FAILURE)
  Process: 6979 ExecStartPre=/bin/chown dhcpd:dhcpd /run/dhcp-server (code=exited, status=0/SUCCESS)
 Main PID: 6982 (code=exited, status=1/FAILURE)

Nov 03 15:27:57 ubuntu systemd[1]: isc-dhcp-server.service: Main process exited, code=exited, status=1/FAILURE
Nov 03 15:27:57 ubuntu systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Nov 03 15:27:57 ubuntu systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Nov 03 15:27:57 ubuntu sh[6982]: Configuration file errors encountered -- exiting

내 dhcp.config는 다음과 같습니다.

    timeout 300;
authoritative; #keine Rogue-DHCP-Server
one-lease-per-client true; #nur ein lease pro client
get-lease-hostnames true; # Tell the server to look up the host name in DNS
#option domain-name "psa-team06.informatik.tu-muenchen.de"; 
#option domain-name-servers 192.168.6.1;
#option subnet-mask 255.255.255.0;

default-lease-time 3600;
max-lease-time 86400;
#log-facility local0;

interface eth1;

#ping-check true; #evtl noch auskommentieren



# Unser Subnetz
subnet 192.168.6.0 netmask 255.255.255.0 {
        range 192.168.6.100 192.168.6.250;
        option routers 192.168.6.3;
        }

host VM1{
        hardware ethernet 08:00:27:24:41:79;
        fixed-adress 192.168.6.3;
        option host-name "VM1";
        }

나의 /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="eth1"

내 IP는 다음과 같습니다.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:5a:70:a3 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe5a:70a3/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:79:73:5d brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.3/24 brd 192.168.6.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.61.1/24 brd 192.168.61.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.62.1/24 brd 192.168.62.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.63.1/24 brd 192.168.63.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.65.1/24 brd 192.168.65.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.76.2/24 brd 192.168.76.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.86.2/24 brd 192.168.86.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.106.2/24 brd 192.168.106.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.116.2/24 brd 192.168.116.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.126.2/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe79:735d/64 scope link
       valid_lft forever preferred_lft forever
root@ubuntu:~#

답변1

이상해 이상해 이상해...

기본 구성 파일을 복사하고 네트워크를 편집한 후에 작동하게 됩니다.

디버깅에 도움이 되는 것은 /usr/sbin/dhcpd -t 및 -f입니다.

지금 내 구성은 다음과 같습니다.

default-lease-time 60;                                                                                                                                         
max-lease-time 240;                                                                                                                                            
authoriative;                                                                                                                                             
option domain-name "psa-team06.informatik.tu-muenchen.de";                                                                                                      
option domain-name-servers router.psa-team1.informatik.tu-muenchen.de;                                                                                       
authoriative;

subnet 192.168.6.0 netmask 255.255.255.0 {                                                                                              
  option broadcast-address 192.168.6.255;                                                                                                                       
  option routers 192.168.6.3;    
    range 192.168.6.100 192.168.6.200;
} 

host VM1 {                                                                                                                                                      
  hardware ethernet 08:00:27:24:41:79;                                                                                                                          
  fixed-address 192.168.6.3;                                                                                                                                    
}

답변2

이것은 정의된 구성 단어가 아닙니다.

interface eth1;

man dhcpd.conf적어도 에서는 찾을 수 없었 습니다 isc-dhcp-server. VBox 16.04 서버에서 시도했는데 dhcpd가 실패했습니다.

어디서 얻었는지는 확실하지 않지만 서비스 에 대한 구성 INTERFACES="eth1"과 . 확인하다 ./etc/default/isc-dhcp-serverinitdhcpdpgrep -a dhcpd

관련 정보