V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
bugmenott
V2EX  ›  问与答

请教设置 isc-dhcp-server 运行失败的问题

  •  
  •   bugmenott · 2015-01-08 23:28:38 +08:00 · 4123 次点击
    这是一个创建于 3611 天前的主题,其中的信息可能已经有所发展或是发生改变。
    系统 debian7.7 3.16.7-x86_64-linode49

    这是/etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp



    这是/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="eth0"


    这是 /etc/dhcp/dhcpd.conf
    default-lease-time 600;
    max-lease-time 7200;
    subnet 192.168.2.0 netmask 255.255.255.0 {
    range 192.168.2.10 192.168.2.20;
    option domain-name-servers 129.250.35.250, 129.250.35.251;
    option routers 192.168.2.1;
    option broadcast-address 192.168.2.255;
    default-lease-time 600;
    max-lease-time 7200;
    }



    然后 service isc-dhcp-server start 失败了
    [FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
    failed!



    这是 /var/log/syslog
    No subnet declaration for eth0 (106.187.*.*).
    ** If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface eth0 is attached. **

    我比较白,完全不知道该怎么搞了
    1 条回复    2015-02-08 14:26:31 +08:00
    majinjing3
        1
    majinjing3  
       2015-02-08 14:26:31 +08:00
    eth0 ip地址没配置好
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3329 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:55 · PVG 19:55 · LAX 03:55 · JFK 06:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.