openwrt 的/etc/config/wireless 文件解析

摘要:
默认情况下,“optionnetworklan”被注释掉。TheWiFisettings在/etc/config/wireless文件中配置。为Whenboottherouter启动路由器时,第一次启动时,应检测您的卡并创建一个简单的配置文件。默认情况下,“可选网络计划”被禁用。这防止了通过无线接口不安全地共享网络。每个无线驱动程序都有自己的配置脚本/lib/wifi/driver_name。Sh,处理驱动程序选项和配置。该脚本还调用特殊的二进制文件,例如Broadcom的w1c,或Atheros_supplicant的hostapd和wpa每个无线驱动程序都有其自己的配置脚本,如/lib/wifi/driver-name。本脚本还称为特定的二进制文件,如Broadcom或主机和网络供应商。由于驱动程序配置不同,因此使用不同的体系结构配置。存在上述架构的原因,请参阅驱动程序配置表。标准Broadcom无线配置:GenericBroadcom wireless-config:configwifi device“wl0”optiontype“Broadcom”optionchannel“5”configwifi ifaceoptiondevice“wla0”#optionnetworklanoptionmode“ap”optionssid“OpenWrt”optionhidden“0”optionencryption“none”标准Atheros无线配置optionchannel“5”optionhwmode“11g”Configwifi ifaceoptiondevice“wifi 0”#optionnetworklanoptionmode“ap”optionssid“OpenWrt”optionhidden“0”optionencryption“none”标准mac80211无线配置:Genericmac80211wirelessconfig:Configwifi device“Wifi 0”optiontype“mac80211”optionchannel”5“Configwifi ifceoptiondevice”wlan0“#optionnetworkplanoptionmode“ap”optionssi“OpenWr”optionhidden“0”optionencryption无标准多播Atheros无线配置:GenericmultiradioAtheros wirelessconfig:configwifi devicewifi 0 optiontypeAtheros optionchannel1配置wifi ifceoptiondevicewifi 0#optionnetworklanoptionmodeapotions ssidOpenWrt_privateoptionhidden0optionencryptionnoneconfigwifi devicewifi optiontypeatheroptionchannel11configwifi ifaceoptiondevicewifi 1#optionnetworklanoptionmodeapotions sidOpenWrt_文件publicoptionhiden1 optionencryption none中有两种类型的配置段。Wifi设备用于物理Wifi接口,并且Wifi接口配置有Wifi设备上方的虚拟接口。

原文:http://blog.csdn.net/hui523hui523hui523/article/details/38493725

1.2.2 无线网络Wireless

WiFi设置储存在/etc/config/wireless中(目前支持Broadcom, Atheros 和mac80211)。当第一次启动路由器时,将会自动检测你的卡并且创建简单的配置文件。默认情况下 'option network lan' 是被注释掉的。它提供了一个非安全的无线网络共享。

The WiFi settings are configured in the file /etc/config/wireless(currently supported on Broadcom, Atheros and mac80211). When booting the router for the first time it should detect your card and create a sample configuration file. By default 'option network lan' is commented. This prevents unsecured sharing of the network over the wireless interface.

每一个无线驱动都有自己的配置脚本/lib/wifi/driver_name.sh ,用来处理驱动选项和配置。这个脚本也调用特殊二进制,例如Broadcom的w1c,或者atheros的hostapd 和wpa_supplicant 。

Each wireless driver has its own configuration script in /lib/wifi/driver_name.sh which handles driver specific options and configurations. This script is also calling driver specific binaries like wlc for Broadcom, or hostapd and wpa_supplicant for atheros.

使用不同的架构配置是因为不同的驱动配置。

The reason for using such architecture, is that it abstracts the driver configuration.

标准的Broadcom无线配置: Generic Broadcom wireless config:

config wifi-device "wl0" 
option type "broadcom" 
option channel "5" 

config wifi-iface 
option device "wl0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的Atheros无线配置: Generic Atheros wireless config:

config wifi-device "wifi0" 
option type "atheros" 
option channel "5" 
option hwmode "11g" 

config wifi-iface 
option device "wifi0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的mac80211无线配置: Generic mac80211 wireless config:

config wifi-device "wifi0" 
option type "mac80211" 
option channel "5" 

config wifi-iface 
option device "wlan0" 
option network lan 
option mode "ap" 
option ssid "OpenWrt" 
option hidden "0" 
option encryption "none"

标准的多播Atheros无线配置: Generic multi-radio Atheros wireless config:

config wifi-device wifi0 
option type atheros 
option channel 

config wifi-iface 
option device wifi0 
option network lan 
option mode ap 
option ssid OpenWrt_private 
option hidden 
option encryption none 

config wifi-device wifi1 
option type atheros 
option channel 11 

config wifi-iface 
option device wifi1 
option network lan 
option mode ap 
option ssid OpenWrt_public 
option hidden 
option encryption none

这个文件里有两个类型的配置段。wifi-device针对物理wifi接口,wifi-iface配置了一个在wifi-device之上的虚拟接口(需要被驱动支持)。

There are two types of config sections in this file. The 'wifi-device' refers to the physical wifi interface and 'wifi-iface' configures a virtual interface on top of that (if supported by the driver).

无线配置全概括:A full outline of the wireless configuration file with description of each field:

config wifi-device wifi device name 
option type broadcom, atheros, mac80211 
option country us, uk, fr, de, etc. 
option channel 1-14 
option maxassoc 1-128 (broadcom only) 
option distance 1-n 
option hwmode 11b, 11g, 11a, 11bg (atheros, mac80211) 
option rxantenna 0,1,2 (atheros, broadcom) 
option txantenna 0,1,2 (atheros, broadcom) 
option txpower transmission power in dBm 

config wifi-iface 
option network the interface you want wifi to bridge with 
option device wifi0, wifi1, wifi2, wifiN 
option mode ap, sta, adhoc, monitor, or wds 
option txpower (deprecated) transmission power in dBm 
option ssid ssid name 
option bssid bssid address 
option encryption none, wep, psk, psk2, wpa, wpa2 
option key encryption key 
option key1 key 
option key2 key 
option key3 key 
option key4 key 
option server ip address 
option port port 
option hidden 0,1 
option isolate 0,1

wifi-device的配置项: Options for the wifi-device :

  • type 
    该接口使用的驱动。The driver to use for this interface.
  • country 
    国家代码用来指名规定设置。The country code used to determine the regulatory settings.
  • channel 
    wifi频道(例如1-14,取决于country设置)The wifi channel (e.g. 1-14, depending on your country setting).
  • maxassoc 
    可选:最大的可连接客户端。这个特性只在broadcom芯片组上可选。可选的: Maximum number of associated clients. This feature is supported only on the broadcom chipset.
  • distance 
    可选的: Distance between the ap and the furthest client in meters. This feature is supported only on the atheros chipset.
  • mode 
    The frequency band (b, g, bg, a). This feature is only supported on the atheros chipset.
  • diversity 
    可选的: Enable diversity for the Wi-Fi device. This feature is supported only on the atheros chipset.
  • rxantenna 
    可选的: Antenna identifier (0, 1 or 2) for reception. This feature is supported by atheros and some broadcom chipsets.
  • txantenna 
    可选的: Antenna identifier (0, 1 or 2) for emission. This feature is supported by atheros and some broadcom chipsets.
  • txpowerSet the transmission power to be used. The amount is specified in dBm.

wifi-iface的配置: Options for the wifi-iface :

    • network 
      选择/etc/config/network中的接口段 Selects the interface section from /etc/config/networkto be used with this interface
    • device 
      设置设备名称Set the wifi device name.
    • mode 
      可选模式:Operating mode:
      • ap 
        接入点模式Access point mode
      • sta 
        客户端模式Client mode
      • adhoc 
        Ad-Hoc mode
      • monitor 
        监控模式Monitor mode
      • wds 
        WDS点对点连接 WDS point-to-point link
    • ssid 设置wifi设备使用的SSID Set the SSID to be used on the wifi device.
    • bssid设置BSSID 地址用来设置wds的mac地址。Set the BSSID address to be used for wds to set the mac address of the other wds unit.
    • txpower(Deprecated, set in wifi-device) Set the transmission power to be used. The amount is specified in dBm.
    • encryption 
      加密设置。可设置为以下值:Encryption setting. Accepts the following values:
      • none
      • wep
      • psk, psk2 
        WPA(2) Pre-shared Key
      • wpa, wpa2 
        WPA(2) RADIUS
    • key, key1, key2, key3, key4(wep, wpa and psk) 
      WEP key, WPA key (PSK mode) or the RADIUS shared secret (WPA RADIUS mode)
    • server(wpa) 
      The RADIUS server ip address
    • port(wpa) 
      The RADIUS server port (defaults to 1812)
    • hidden 
      0 broadcasts the ssid; 1 disables broadcasting of the ssid
    • isolate 
      可选的: Isolation is a mode usually set on hotspots that limits the clients to communicate only with the AP and not with other wireless clients. 0 disables ap isolation (default); 1 enables ap isolation.

免责声明:文章转载自《openwrt 的/etc/config/wireless 文件解析》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇利用post请求发送内容进行爬虫oc之NSSortDescriptor(描述器排序)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Vue.JS入门下

使用npm创建项目,系统会自动生成一些列文件。 以慕课网上的Travel项目来说,在生成的项目文件中存在src文件夹,这个文件夹也是平时在做项目的时候用的比较多的,其他的一些配置信息更改的频率较低。 在src文件夹中存在App.vue文件,该文件叫做单文件组件,模板放在template标签内,行为放在script标签内,样式放在style标签内。 me...

openwrt下安装nohup

wget http://d.wrtnode.com/packages/coreutils_8.16-1_ramips_24kec. ipk opkg install coreutils_8.16-1_ramips_24kec.ipk wget http://d.wrtnode.com/packages/coreutils-nohup_8.16-1_ra...

[WCF]将WCF程序部署在IIS上

WCF 机制确实不错,虽然谈不上对它有多了解,但仅从应用的角度看,有两个显著:封装通信,契约编程。下面演练一个Demo 来看看如何将 WCF 部署在IIS里头。这个 Demo 服务器提供一个运算服务,客户端根据服务器契约调用该服务,得到结果。 1,新建一个目录(IIS具有访问权限的,所以别在系统目录中创建) IISHostedCalcService,然后在...

Nacos快速开始

Nacos是一个服务发现、配置管理和服务管理的组件。 说到服务注册与发现,我想到Eureka、Zookeeper 说到服务治理,我想到Dubbo 说到配置管理,我想到Apollo 作为后起之秀的Nacos更强大更简洁 Nacos的文档很详细,都是中文,不再详述,此处只摘抄几点比较重要的内容,算是对自己看了一下午的一个总结 1. 什么是Nacos Naco...

怎样修复“Windows/System32/Config/System中文件丢失或损坏”故障

怎样修复“Windows/System32/Config/System中文件丢失或损坏”故障 英文原文引自 http://xphelpandsupport.mvps.org/how_do_i_repair_a_missing_or_cor1.htm 此类错误通常说明计算机由于注冊表的原因不能启动,下列操作应该可以修正以上错误。然而,须要特别注意的是,你须...

babel.config.js 和 .babelrc 对比

Babel 有两种并行的配置文件格式,可以一起使用,也可以分开使用。 项目范围的配置 babel.config.js 文件,具有不同的拓展名(json、js、html)babel.config.js 是按照 commonjs 导出对象,可以写js的逻辑。 相对文件的配置 .babelrc 文件,具有不同的拓展名 总结:baberc 的加载规则是按目录加载的...