|
Line 0
Link Here
|
|
|
1 |
-*- outline -*- |
| 2 |
* MADWIFI/wlanconfig & etcnet |
| 3 |
|
| 4 |
Starting from 0.9.6, etcnet contains another approach |
| 5 |
for handling atheros/madwifi cards, allowing more precise |
| 6 |
control over various operational modes, including master one, |
| 7 |
achieved by separate iface declarations for link/ieee802.11 |
| 8 |
and one or more enslaved link/ether (also called VAPs) layers. |
| 9 |
This approach can be selected by TYPE set to `wlan' for enslaved |
| 10 |
link/ether iface(s), other options in this mode could be: |
| 11 |
HOST=<link/ieee802.11 iface name, i.e wifi0> |
| 12 |
MODE=<adhoc|ap|monitor|sta|wds> |
| 13 |
|
| 14 |
See also wlanconfig(8) for more detailed discussion. |
| 15 |
|
| 16 |
Setup for bridged AP mode, ready for use with hostapd, follows: |
| 17 |
|
| 18 |
** disallow autocreate link/ether (mandatory) |
| 19 |
# grep ath_pci /etc/modprobe.d/options |
| 20 |
options ath_pci autocreate=none |
| 21 |
# |
| 22 |
|
| 23 |
** link/ieee802.11 iface (optional) |
| 24 |
# cat /etc/net/ifaces/wifi0/options |
| 25 |
TYPE=eth |
| 26 |
# |
| 27 |
|
| 28 |
** link/ether (VAP) iface(s): |
| 29 |
# cat /etc/net/ifaces/wlan/options |
| 30 |
TYPE=wlan |
| 31 |
HOST=wifi0 |
| 32 |
MODE=ap |
| 33 |
# |
| 34 |
|
| 35 |
** bridge iface, including wlan one: |
| 36 |
# cat /etc/net/ifaces/br0/options |
| 37 |
TYPE=bri |
| 38 |
HOST='wan lan wlan' |
| 39 |
# |
| 40 |
|
| 41 |
** sample hostapd configuration |
| 42 |
# grep -v '^\(#\|ssid\|wpa_pass\|$\)' /etc/hostapd/hostapd.conf |
| 43 |
interface=wlan |
| 44 |
bridge=br0 |
| 45 |
driver=madwifi |
| 46 |
logger_syslog=-1 |
| 47 |
logger_syslog_level=2 |
| 48 |
logger_stdout=-1 |
| 49 |
logger_stdout_level=2 |
| 50 |
debug=0 |
| 51 |
dump_file=/root/tmp/hostapd.dump |
| 52 |
ctrl_interface=/var/run/hostapd |
| 53 |
ctrl_interface_group=0 |
| 54 |
macaddr_acl=1 |
| 55 |
auth_algs=3 |
| 56 |
eapol_version=1 |
| 57 |
eapol_key_index_workaround=0 |
| 58 |
eap_server=0 |
| 59 |
wpa=3 |
| 60 |
wpa_key_mgmt=WPA-PSK |
| 61 |
wpa_pairwise=TKIP CCMP |