Differences

This shows you the differences between two versions of the page.

doc:recipes:atheroswds [2012/11/07 04:55]
uvray313
doc:recipes:atheroswds [2013/05/16 20:47] (current)
xav0989 +additional_config
Line 1: Line 1:
{{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} {{page>meta:infobox:construction&noheader&nofooter&noeditbtn}}
-====== Atheros and MAC80211 WDS (Kernel 2.6) ======+====== Atheros and MAC80211 WDS ======
-Most OpenWrt supported wireless drivers on Kernel 2.6 support AP-to-Sta WDS to connect two or more devices wirelessly to form one common broadcast domain. +Most OpenWrt supported wireless drivers support since kernel 2.6 the AP-to-STA WDS mode to connect two or more devices wirelessly to form one common broadcast domain. 
-WEP and WPA-PSK or WPA2-PSK encryption is possible.+ 
 +With this configuration you will be able to connect a remote router (the station) to a local router (the access point) and the devices connected on both ends will be on the same network. Multiple stations can connect to the same
===== Configuration ===== ===== Configuration =====
 +
 +With both [[doc:uci|uci]] and [[doc:howto:luci.essentials|luci]] the configuration of the network is split in two sections: the AP section and the STA section. It is important to follow the order of the steps as failure to do so could render the routers inopperable.
 +
 +==== Using UCI ====
 +
 +=== The Access Point ===
 +
 +Connect to the router that will serve as access point over ssh (using wires or wifi). It is most likely the one that connects to the internet. Once logged in, edit the [[doc:uci:wireless|/etc/config/wireless]] file. In the existing ''wifi-iface'' section that will be used, add a line with ''option wds 1''. If you haven't already done so, configure the SSID, channel, encryption, etc.
 +
 +Once that is done, save the file and run ''uci commit wireless'' to save your changes. Reboot the device. Disconnect from the access point.
 +
 +=== The Station ===
 +
 +Connect using a wire to the router that will server as station. If you haven't already done so, [[doc:howto:generic.flashing|install openwrt]] and [[doc:howto:firstlogin|setup the password]]. SSH into the station.
 +
 +The first step is preparing the network for the bridging. To do so, edit the [[doc:uci:dhcp|/etc/config/dhcp]] file. Find the ''lan'' section and add the ''option ignore 1'' line. This will disable the dhcp server (there would already be one on the access point). Following that, we must make sure that we can manage the station later on. To do so, we'll edit the [[doc:uci:network|/etc/config/network]] file. This assumes that you are using DHCP to give out addresses. In the ''lan'' section, two lines must be added:
 +    option proto 'dhcp'
 +    option hostname 'mystation'
 +where ''mystation'' is the name you want to give to your station. Make sure it's unique in your network.
 +
 +Once those steps are completed, we can setup the actual wireless link. Edit the [[doc:uci:wireless|/etc/config/wireless]] file. In the ''radio0'' section, make sure that the ''type'', ''channel'' and ''country'' matches the values in the access point. You should edit the ''channel'' and ''country'' to match.
 +
 +Further down in the same file, modify the ''wifi-iface'' section like so:
 +    option device 'radio0'
 +    option network 'lan'
 +    option mode 'sta'
 +    option wds 1
 +    option ssid 'NAME_OF_WIRElESS_NETWORK'
 +where ''NAME_OF_WIRELESS_NETWORK'' is the name of the wifi network you setup in the access point. See the [[doc:uci:wireless#common.options1|configuration options]] for pointer on how to specify encryption and keys.
 +
 +Reboot your station and you should be connected onto the LAN as soon as the station associates with the access point.
 +
 +=== Additional Station Configuration ===
 +
 +It is recommended to disable and uninstall dhcp and the firewall on the station. Since they are only necessary on the access point, removing them on the station will reduce the load and help reduce the possible problem sources. If the station should be re-purposed into a full fledged router, it is recommended that a clean install of openwrt (sysupgrade should suffice) be made.
 +
 +To remove dhcp (dnsmasq) and the firewall, issue the following commands in the shell:
 +    opkg update
 +    opkg --force-removal-of-dependent-packages dnsmasq iptables firewall kmod-ppp luci-proto-ppp
 +    rm /etc/config/dhcp
 +
 +Reboot and you are set.
 +
 +==== LuCI ====
 +
 +TODO
 +
 +
 +===== Old Stuff =====
Relevant configuration files: Relevant configuration files:
Line 18: Line 68:
  * On the Access Point, add ''option wds 1'' to the existing ''wifi-iface'' section and proceed with configuring SSID, channel, encryption etc.   * On the Access Point, add ''option wds 1'' to the existing ''wifi-iface'' section and proceed with configuring SSID, channel, encryption etc.
-  * On the Client, set ''option mode'' to ''sta'' and add ''option wds 1'' to the ''wifi-iface'' section. Disable the DHCP server.+  * On the Client, set ''option mode'' to ''sta'' and add ''option wds 1'' to the ''wifi-iface'' section. Disable the DHCP server, e.g. by adding ''option ignore 1'' for LAN interface in /etc/config/dhcp.
  *To create a repeater, add a WDS Access Point along with the WDS Station on the client,(with the same ssid and key, or not). Don't forget to add the newly created AP to the LAN firewall Zone.    *To create a repeater, add a WDS Access Point along with the WDS Station on the client,(with the same ssid and key, or not). Don't forget to add the newly created AP to the LAN firewall Zone. 
On MAC80211 OpenWRT use 4 address (option wds 1) (with ap or sta mode) and not repeater mode. See also [[http://linuxwireless.org/en/users/Documentation/iw#Setting_up_a_WDS_peer]] On MAC80211 OpenWRT use 4 address (option wds 1) (with ap or sta mode) and not repeater mode. See also [[http://linuxwireless.org/en/users/Documentation/iw#Setting_up_a_WDS_peer]]

Back to top

doc/recipes/atheroswds.1352260515.txt.bz2 · Last modified: 2012/11/07 04:55 by uvray313