|
This page is currently under construction. You can edit the article to help completing it. |
|
This page is currently under construction. You can edit the article to help completing it. |
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.
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
With both uci and 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.
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 /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.
Connect using a wire to the router that will server as station. If you haven't already done so, install openwrt and setup the password. SSH into the station.
The first step is preparing the network for the bridging. To do so, edit the /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 /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 /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 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.
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.
TODO
Relevant configuration files:
Multiple WDS Stations can connect to a single WDS Access Point.
option wds 1 to the existing wifi-iface section and proceed with configuring SSID, channel, encryption etc.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.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
doc/recipes/atheroswds.txt · Last modified: 2013/05/16 20:47 by xav0989