OpenWrt Forum Archive

Topic: Set up a 802.11s-based mesh network via TP-Link TL-WR1043ND v2 routers

The content of this topic has been archived on 26 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi OpenWrt People,

I want to set up a 802.11s-based wireless mesh network given in the figure below via two TP-Link TL-WR1043ND v2 routers.

PunBB bbcode test

As given in the figure, the routers have their own LAN. Also, there is supposed to be a mesh network between the routers. Any device within a LAN is able to communicate to any device within the same network, but it is not possible to access to any device in the LAN of the other router. For example, router 1 is able to ping a tablet PC within 192.168.1.0/24 network, but not able to ping router 2, that is, 192.168.4.44. When the router 1 pings router 2 (192.168.4.44) the terminal stops and does not give any response.

Here is router 1's reply to "route" command

PunBB bbcode test

Here is router 2's reply to "route" command

PunBB bbcode test

As far as I understand the problem is at router 2. There should be a route from router 2 to router 1 over a mesh network. I am unable to add this route to the router. How can I add this route to router 2? Thanks in advance for any answer smile

Below is given /etc/config/network and /etc/config/wireless configuration files of both routers.

Router 1 :

/etc/config/network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd17:3dc5:e556::/48'

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.11'
    option netmask '255.255.255.0'
    
config route
    option interface 'mesh'
    option target '192.168.0.0'
    option gateway '10.1.1.44'
    option netmask '255.255.255.0'

config route
    option interface 'mesh'
    option target '192.168.4.0'
    option gateway '10.1.1.44'
    option netmask '255.255.255.0'
    
config interface 'mesh'
    option ifname 'wlan0'
    option type 'bridge'
    option proto 'static'
    option ipaddr '10.1.1.11'
    option netmask '255.255.255.0'
    option gateway '10.1.1.44'
    option dns '10.1.1.44'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0 1 2 3 4'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

/etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option channel '1'
    option macaddr 'C4:6E:1F:6B:B3:BA'
    option hwmode '11ng'
    option path 'platform/qca955x_wmac'
    option htmode 'HT20'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'DSSS_CCK-40'
    option txpower '30'
    option disabled '0'
    option noscan '1'

config wifi-iface
    option network 'mesh'
    option device 'radio0'
    option mode 'mesh'
    option mesh_id 'FIUMesh-1'
    option encryption 'psk2+aes'
    option key 'FIUPanther'

config wifi-device 'radio1'
    option type 'mac80211'
    option channel '11'
    option hwmode '11g'
    option path 'platform/qca955x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option noscan '1'

config wifi-iface
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option ssid 'OpenWRT1'
    option encryption 'psk2'
    option key 'open802.11s'    

Router 2:

/etc/config/network

config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
    option ula_prefix 'fd07:8049:ab3e::/48'

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.4.44'
    option netmask '255.255.255.0'

config interface 'wan'
    option proto 'static'
    option ipaddr '192.168.0.44'
    option netmask '255.255.255.0'
    option gateway '192.168.0.1'
    option dns '8.8.8.8 8.8.4.4'

config route
    option interface 'mesh'
    option target '192.168.1.0'
    option gateway '10.1.1.11'
    option netmask '255.255.255.0'
    
config interface 'mesh'
    option ifname 'wlan1'
    option proto 'static'
    option ipaddr '10.1.1.44'
    option netmask '255.255.255.0'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0 1 2 3 4'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

/etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option channel '1'
    option macaddr 'C4:6E:1F:4B:63:0E'
    option hwmode '11ng'
    option path 'platform/qca955x_wmac'
    option htmode 'HT20'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'DSSS_CCK-40'
    option txpower '30'
    option disabled '0'
    option noscan '1'

config wifi-iface
    option network 'mesh'
    option device 'radio0'
    option mode 'mesh'
    option mesh_id 'FIUMesh-4'
    option encryption 'psk2+aes'
    option key 'FIUPanther'

config wifi-device 'radio1'
    option type 'mac80211'
    option channel '11'
    option hwmode '11g'
    option path 'platform/qca955x_wmac'
    option htmode 'HT20'
    option disabled '0'
    option noscan '1'

config wifi-iface
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option ssid 'OpenWRT4'
    option encryption 'psk2'
    option key 'open802.11s'

(Last edited by samettonyali29 on 3 Sep 2015, 23:49)

Hi! I hope you don't mind me asking, but where did you get the documentation to set up your mesh? I can't even get two routers to ping in the same subnet. Whenever I run mpath dump, nothing is there, but when I run station dump, I can see all the nodes on the mesh. So, I am assuming that there is no route in between them. I think it is because I am missing "config route" (I can't test my network right now). I used this link (http://wiki.openwrt.org/doc/howto/mesh.80211s) to start, but is there something else you used to show how to add multiple nodes and their routes so you can ping in the same subnet?

You must set the same wifi channel on all mesh nodes.  Mesh nodes with the same channel and mesh_id will automatically find each other.  You do not need to register them by MAC address, etc. like with WDS.

Unencrypted mesh:

config wifi-iface
   option device 'radio0'
   option mode 'mesh'
   option network 'lan'
   option mesh_id 'meshname'

To encrypt your mesh, what the OP tried is wrong.  You use package authsae.  This package depends on libopenssl, which is big enough to cause a problem for routers with only 4M flash.  After authsae is installed, add this to the above on all mesh nodes:

   option encryption 'authsae'
   option key 'mysecretkey'

Thanks! Would you mind looking at my original post here (https://forum.openwrt.org/viewtopic.php?id=58551). I don't want to be rude and continue talking on someone else's thread, but I am still a bit confused (the nodes can see each other when I run station dump, but they just can't ping between each other).

The discussion might have continued from here.