Changes between Initial Version and Version 1 of OpenWrt/wireless/wireless_bridge


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/wireless/wireless_bridge

    v1 v1  
     1[[PageOutline]]
     2[[Image(WirelessBridge.png)]]
     3
     4This information has been tested and created for use on the Gateworks Single Board Computers (SBCs)''', specifically the Ventana family that utilizes the Freescale i.MX6 processors.
     5
     6Gateworks SBCs can be viewed at the following link: [http://www.gateworks.com]
     7
     8[[Image(http://trac.gateworks.com/raw-attachment/wiki/OpenWrt/wireless/relayd/gw5100realsmall.png,200px)]]
     9
     10= Wireless Bridge using OpenWrt =
     11One of the most common applications of our products is to create a robust Wireless layer2 bridge to wirelessly bridge two LAN segments together.
     12
     13In order to bridge at layer2 you must use WDS (Wireless Distribution System).  Note that if you wish to bridge a LAN segment wirelessly to an existing AP that does not have WDS (or uses an incompatible form of WDS) you can use the relayd (relay daemon) configuration described [wiki:relayd here].  Quite simply all you need to do is configure one end to be an Access Point with WDS support, and the other end to be a Client with WDS support.  You can use encryption if you desire just make sure that all nodes are configured with the same SSID and encryption settings.  Note that you can have one or more Client nodes using this configuration.
     14
     15OpenWrt Default Configuration Notes:
     16 - by default eth0 and eth1 are in a bridge by the name of 'br-lan' (OpenWrt network interface 'lan')
     17 - by default wireless interfaces are disabled
     18 - by default br-lan is configured as static ip: 192.168.1.1/255.255.255.0
     19 - by default 1st radio is configured as an ap with SSID=OpenWrt no encyrption an part of the 'br-lan' interface
     20 - some of the UCI commands below set the same thing as the default but I've put them there for clarity
     21
     22== Wireless Bridge Configuration ==
     23
     24=== Via Luci Web-admin ===
     25You can use the Webadmin to make changes and 'Apply' them with the 'Apply' button, yet those changes are not saved to UCI until you hit the 'Save & Apply' button which will do a 'uci commit'.  Up until that point you can 'Revert' them with the 'Revert' button.  At any time you can view usaved uci changes by clicking on 'Unsaved Changes' at the top left of the admin GUI (admin/uci/changes)
     26
     27Access Point Node:
     28 * Set the Interface Configuration 'Mode' Under admin/network/wireless/radio0.network1/ Interface Configuration General Setup tab to ''''Acces Point (WDS)''''
     29 * Configure channel/SSID/encryption as desired
     30
     31Cient Node(s):
     32 * Set the Interface Configuration 'Mode' Under admin/network/wireless/radio0.network1/ Interface Configuration General Setup tab to ''''Client (WDS)'''' for the Client
     33 * Configure channel/SSID/encryption as desired
     34
     35=== Via UCI command-line ===
     36UCI commands via commandline require serial console or telnet/ssh access but make it simple to describe and cut-n-paste.
     37
     38The following example uses:
     39 * static IP 192.168.1.1 for AP
     40 * static IP 192.168.1.2 for Client
     41 * SSID=OpenWrt
     42 * No Encryption
     43
     44Access Point Node:
     45{{{
     46uci set system.@system[0].hostname=test_ap
     47uci set network.lan.ipaddr=192.168.1.1
     48uci set wireless.@wifi-iface[0].mode=ap
     49uci set wireless.@wifi-iface[0].ssid=OpenWrt
     50uci set wireless.@wifi-iface[0].encryption=none
     51uci set wireless.@wifi-iface[0].wds=1
     52uci set wireless.radio0.disabled=0
     53uci set wireless.radio0.macaddr=
     54uci set wireless.radio0.phy=phy0
     55uci commit
     56}}}
     57
     58Client Node(s):
     59{{{
     60uci set system.@system[0].hostname=test_sta
     61uci set network.lan.ipaddr=192.168.1.2
     62uci set wireless.@wifi-iface[0].mode=sta
     63uci set wireless.@wifi-iface[0].ssid=OpenWrt
     64uci set wireless.@wifi-iface[0].encryption=none
     65uci set wireless.@wifi-iface[0].wds=1
     66uci set wireless.radio0.disabled=0
     67uci set wireless.radio0.macaddr=
     68uci set wireless.radio0.phy=phy0
     69uci commit
     70}}}
     71
     72Notes:
     73 - the point of setting the macaddr= and phy=phy0 above is to allow the firmware to not be dependent on what radio you load on it.  By default OpenWrt tracks radio configuration by the macaddr of the radio which causes configuration differences if you swap radios later.  This is completely optional.
     74
     75=== Files ===
     76This is the same as the UCI, but just in file form:
     77
     78 * The AP (access point)
     79{{{
     80root@OpenWrt:/# cat /etc/config/wireless
     81config wifi-device  radio0
     82        option type     mac80211
     83        option channel  11
     84        option hwmode   11g
     85        option path     'soc0/soc.0/1ffc000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:05.0/0000:05:00.0'
     86        option htmode   HT20
     87
     88
     89config wifi-iface
     90        option device   radio0
     91        option network  lan
     92        option mode     ap
     93        option wds      1
     94        option ssid     OpenWrt
     95        option encryption none
     96
     97}}}
     98 * The client, AKA Station
     99{{{
     100root@OpenWrt:/# cat /etc/config/wireless
     101config wifi-device  radio0
     102        option type     mac80211
     103        option channel  11
     104        option hwmode   11g
     105        option path     'soc0/soc.0/1ffc000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:05.0/0000:05:00.0'
     106        option htmode   HT20
     107
     108
     109config wifi-iface
     110        option device   radio0
     111        option network  lan
     112        option mode     sta
     113        option wds      1
     114        option ssid     OpenWrt
     115        option encryption none
     116}}}