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)
上一篇 2022年5月21日 下午11:20
下一篇 2022年5月21日 下午11:20


相关推荐

  • java链表listnode是线程安全的吗_两个升序链表合并为一个升序链表

    java链表listnode是线程安全的吗_两个升序链表合并为一个升序链表/***描述:删除链表中等于给定值val的所有节点。样例:给出链表1->2->3->3->4->5->3,和val=3,你需要返回删除3之后的链表:1->2->4->5。分析:1.首先判断head是不是空,为空就直接返回null2.然后从head.next开始循环遍历,删除相等于val的元素3.最后判断head是否和val相等,若相等,head=head.next

    2022年4月19日
    55
  • MFC进度条控件(六)

    MFC进度条控件(六)程序功能:点击按键进度条前进到满格。(一)初始化//TODO:在此添加额外的初始化代码 m_progress.SetRange32(0,100);//设置进度条最小和最大值按键函数入口双击按键(二)按键函数voidCMFCday5ADlg::OnBnClickedButton1(){ //TODO:在此添加控件通知处理程序代码 SetTimer(1,100,NULL);//设置定时器1,每次计时100毫秒就定时到 GetDlgItem(IDC_BUTTON1)-&g

    2022年7月27日
    9
  • StringBuilder的使用方法

    StringBuilder的使用方法1 StringBuilde 使用 StringBuilde newStringBui 2 长度的求取 sb length 3 StringBuilde 的添加和反转方法 publicString 任意类型 添加数据 并返回对象本身 eg sb append hello append world 链式调用 publicString 返回相反的字符序列 4 StringBu

    2026年3月26日
    3
  • Pycharm乱码解决大全

    Pycharm乱码解决大全运行时控制台乱码在 Settings 的 Editor 里点击 FileEncoding 在下图中三个位置修改编码一致即可 一般为 UTF 8 或者 GBK

    2026年3月26日
    2
  • 查看linux防火墙状态的命令,Linux 查看防火墙状态及开启关闭命令

    查看linux防火墙状态的命令,Linux 查看防火墙状态及开启关闭命令Centos6 x 版本 iptables 查看防火墙状态 root centos6 serviceiptab Firewallisno 说明防火墙没有开启 开启防火墙 root centos6 serviceiptab 关闭防火墙 root centos6 serviceiptab

    2026年3月18日
    1
  • LintCode 链表排序[通俗易懂]

    LintCode 链表排序[通俗易懂]题目描述:在O(nlogn)时间复杂度和常数级的空间复杂度下给链表排序。样例给出1->3->2->null,给它排序变成1->2->3->null.思路分析:sort扫一遍~ac代码:/***DefinitionofListNode*classListNode{*public:*intval;*ListNode*next;

    2022年10月9日
    5

发表回复

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

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