OpenWrt - tryby pracy sterownika ath9k
wariacje na temat konfiguracji sieci w OpenWrtOstatnia zmiana: 2011-03-05 16:04
1. Tryb AP
1.1. /etc/config/network
1.2. /etc/config/wireless
2. Tryb APClient (WISP)
2.1. /etc/config/network
2.2. /etc/config/wireless
3. Tryb AP + APClient
3.1. /etc/config/network
3.2. /etc/config/wireless
4. Tryb AP + VAP
4.1. /etc/config/network
4.2. /etc/config/wireless
5. Tryb WDS
5.1. AP
5.2. Klient
6. Bridged Client
W przedstawionych konfiguracjach brakuje sekcji lo, switch oraz kompletnej zawartości sekcji wifi-device. Należy je uzupełnić stosowanie do posiadanego sprzętu. Bridged mode nie działa sterowniku ath9k.
Założenia:
- lan: eth1
- wan: eth0
- wlan: kanał 5, kodowanie wpa2/aes
dla trybu AP: hasło 1234567890, ssid: eko_one_pl
dla trybu APClient: hasło 0987654321, ssid: ISP
Tryb AP
/etc/config/network
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
/etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid eko_one_pl
option encryption psk2
option key 1234567890
list ht_capab HT40+
list ht_capab HT40-
Tryb APClient (WISP)
/etc/config/network
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
/etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network wan
option mode sta
option ssid ISP
option encryption psk2
option key 0987654321
Tryb AP + APClient
/etc/config/network
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
/etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid eko_one_pl
option encryption psk2
option key 1234567890
config wifi-iface
option device radio0
option network wan
option mode sta
option ssid ISP
option encryption psk2
option key 0987654321
Tryb AP + VAP
Dodatkowy wirtualny AP z innym kodowaniem./etc/config/network
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
/etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid eko_one_pl_z_wpa2
option encryption psk2
option key 1234567890
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid eko_one_pl_z_wep
option encryption wep
option key 1
option key1 2345678901
Tryb WDS
Jest to inny tryb niż spotykany w Broadcomach WET, tutaj występuje jako AP+STA-WDS (4-address frame). AP
/etc/config/network
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid test_wds
option encryption psk2
option key 1234567890
option wds 1
Klient
Należy wyłączyć dhcp:
# /etc/init.d/dnsmasq disable
# /etc/init.d/dnsmasq stop
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.2.1
option netmask 255.255.255.0
config wifi-device radio0
option type mac80211
option channel 5
option macaddr xx:xx:xx:xx:xx:xx
option hwmode 11ng
option htmode HT20
config wifi-iface
option device radio0
option network lan
option mode sta
option ssid test_wds
option encryption psk2
option key 1234567890
option wds 1
Bridged Client
Bridged Client