hostapd和dhcpd

hostapd和dhcpdhostapd.conf#####hostapdconfigurationfile##############################################interface=wlan0ctrl_interface=/var/run/hostapdssid=rtwapchannel=6wpa=2wpa_passphrase=87654321#bridge=br0

大家好,又见面了,我是你们的朋友全栈君。

hostapd.conf

##### hostapd configuration file ##############################################

interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=rtwap
channel=6
wpa=2
wpa_passphrase=87654321
#bridge=br0



##### Wi-Fi Protected Setup (WPS) #############################################

eap_server=1

# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2

uuid=12345678-9abc-def0-1234-56789abcdef0

# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU

# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek

# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP

# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU

# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345

# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=6-0050F204-1

# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300

# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad


##### default configuration #######################################

driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400

初次编译的官方下载的文件编译缺文件,采用利尔达发送过来的程序
存在网盘(20171128 3018-AP.rar)

dhcpd.conf

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

option subnet-mask 255.255.254.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}

# 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;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 { 
   
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 { 
   
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia { 
   
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";
# server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia { 
   
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" { 
   
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 { 
   
# subnet 10.17.224.0 netmask 255.255.255.0 { 
   
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 { 
   
# option routers rtr-29.example.org;
# }
# pool { 
   
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool { 
   
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}
# 

编译完成之后一开始无法使用
需要将wlan0的netmask设置一下和配置文件中的netmask同步参数才能生效。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/143287.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 微信小程序获取表单数据_小程序表单提交数据到哪里

    微信小程序获取表单数据_小程序表单提交数据到哪里微信小程序使用模板消息需要使用支付prepay_id或表单提交formId,要获得formId需要在form标签中声明属性report-submit="true"&#1

    2022年8月1日
    39
  • ant design vue上传文件_antd vue 表单

    ant design vue上传文件_antd vue 表单antdvue文件上传实例说明该实例是后端进行文件上传至minio服务器这里仅仅是展示前端antdvue得代码限制文件类型配置查看这里<template><a-upload:headers=”headers”:action=”url”:fileList=”fileList”@change=”handleChang…

    2022年8月15日
    7
  • linux下tomcat安装及配置教程

    linux下tomcat安装及配置教程tomcat是一款java语言servlet规范的服务器软件,如下的经验讲述如何使用linux环境下tomcat的安装和配置。工具/原料Linuxtomcat方法/步骤1下载tomcat压缩包如第一张图如果你是服务器linux,可以通过软件本地上传文件导linux服务器如图二也可也通过下面linux命令下载:2新建目录,并解压Tomcat软件的压缩包命令:tar…

    2022年5月31日
    357
  • JavaScript基础大总结

    JavaScript基础大总结✍初始JavaScirptJavaScript是世界上最流行的语言之一,是一种运行在客户端的脚本语言(Script是脚本的意思)脚本语言:不需要编译,运行过程中由js解释器(js引擎)逐行来进行解释并执行现在也可以基于Node.js技术进行服务器端编程????浏览器执行JS简介浏览器分成两部分:渲染引擎和JS引擎渲染引擎:用来解析HTML与CSS,俗称内核,比如chrome浏览器的blink,老版本的webkitJS引擎:也称为JS解释器。用来读

    2022年7月17日
    15
  • Python爬虫必备技能,使用 动态代理ip 爬取 Youtube游戏模块主页 示例,不翻墙无版权

    Python爬虫必备技能,使用 动态代理ip 爬取 Youtube游戏模块主页 示例,不翻墙无版权动态ip相信大家肯定都听说过,或者已经使用过。使用动态ip有很多好处,比如保护你的网络免受外部攻击、屏蔽你的IP地址等。那本篇文章就来研究一下这个动态ip,对这方面不了解的小伙伴正好可以一起学习一下。

    2022年6月3日
    36
  • mac全选文字的快捷键_关于mac文本的快捷键你知道多少?[通俗易懂]

    mac全选文字的快捷键_关于mac文本的快捷键你知道多少?[通俗易懂]用惯了windows系统的小伙伴,对于苹果的快捷键一定很不习惯。所以贴心的小编为大家准备了关于mac打字的快捷键你知道多少?用习惯了苹果的快捷键也是非常好用的哦!在电脑的操作过程中,快捷键是非常主要的,为您节省了很多不必要的时间,提高了工作的效率,下面就和小编一起来看一看有哪些好用的快捷键吧!关于mac的快捷键你知道多少?:cmd+c。复制cmd+v。粘贴cmd+a。全选cmd+tab。切换程序s…

    2022年5月26日
    103

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号