Manual:Network/WiFi/Mesh

From Compex Wiki
Jump to: navigation, search

New in 2017, we have a smartphone App to setup a Compex Mesh AP easily: Using the Compex Home Mesh App

Mesh

Requirements:
•At least 2 APs running CompexWRT firmware 
•1 AP as Gateway mode and another AP as Repeater mode

A mesh network can be set up using CompexWRT APs. Redundancy is achieved because if one AP dies, the other existing APs would automatically link up and calculate the most efficient path.

For the WDS described earlier, the topology is fixed, while for the mesh network, the topology is determined automatically in real-time.

A CompexWRT AP can be configured as one of the following three mesh modes:
•Mesh Gateway (RAP)
•Mesh Repeater (MAP)
•Mesh Wireless Gateway (RRC)

Mesh network.png

Mesh Gateway (RAP)

An RAP is connected to the Internet or main network by a wired LAN connection and broadcasts a wireless mesh signal.

Mesh Repeater (MAP)

MAPs connect wirelessly in a mesh configuration and at least one MAP connects to an RAP. This RAP functions like a gateway for the MAPs to connect to the Internet network. A mesh network can have multiple RAPs.

Mesh Wireless Gateway (RRC)

Suppose that you already have an existing wireless router without the mesh capability, and already broadcasting on the same channel that you would use for the mesh. An RAP just beside this router would introduce an unnecessary wireless network. In this case, you can use an RRC placed some distance away.

An RRC functions as a station associated with the wireless network of the existing router. It then broadcasts the wireless mesh signal just like an RAP.

A mesh network can be set up using the AP Controller (APc). Please refer to the APc user manual for the instructions. Otherwise, the steps to configure the mesh APs using the APs' LuCI web page are explained in the following sections.

Steps to Set Up a Mesh Network

In a mesh network, all the APs have to use the same wireless profile (e.g. 802.11a+n), channel (e.g. 149), spectrum width (e.g. 20/40 MHz), and encryption (e.g. WPA/WPA2-PSK).

RAP Configuration

The LAN/WAN Settings and the Wireless Settings are described in the following subsections.

LAN/WAN Settings

For this RAP to act as a router (NAT mode), add in a WAN interface. (Refer to Section 5.1.1 Common Configuration > Physical Settings). If this RAP is to act as a bridge to the network, just leave the network settings as it is.

Wireless Settings

Click on Network > Wifi and click the “Edit” button for the radio to be used for the mesh. Alternatively, click on the SSID name on the Status page to go straight to the wireless settings.

Network Wifi Edit button1.gif

In the Interface Configuration > General Setup tab, please select “Mesh” for the “Mode” option.

Please select "Mesh" for the "Mode" option.

You would be prompted with the “Really switch mode?” option. Please click “Switch mode”.

Please click "Switch mode".

Mesh” for the “Mode.gif

You would then see the following options.

Mesh ID: The default Mesh ID created is “Mesh_SSID”. Key in the Mesh ID that would identify this mesh. All the mesh APs would be linked by this common Mesh ID.

Mesh Mode: The default Mesh Mode is “Mesh AP”. The available options are

  • Mesh Repeater (MAP)
  • Mesh Gateway (RAP)
  • Mesh Wireless Gateway (RRC)


The default Mesh ID and Mesh Mode options.

For this AP, you would set it as an Mesh Gateway. Following that, please click “Save & Apply”.

Mesh Gateway.gif

Setting the Mesh ID and the Mesh Mode options.

Next, please go to the “Wireless Security” tab to set the wireless encryption (e.g. WPA/WPA2-PSK).

WPA2PSK.gif


After that, you may set up additional wireless networks to provide coverage.

You could create an additional wireless network on the same radio as the mesh network by adding a virtual AP (VAP).

VirtualAP.gif

You could also have a wireless network on the other radio to provide coverage for a different wireless profile (e.g. 802.11g+n).

VAP2.4.gif

The Status > Overview page of an RAP.

2016-03-31 16 19 54-MimoAP - Wifi.png

The Network > Wifi page of an RAP.

The RAP is now configured.

RRC Configuration

This mode is optional in Mesh network setup. The “Router Client” is to connect to another router that has wireless connectivity. Mesh networks can then expand the connectivity using wireless instead of using cables.

CpxWRT Network Mesh RRC Map.png

An existing AP is connected to an RRC which is in turn connected to 2 MAPs.

This AP should not have any WAN interfaces. That is, it is operating in bridge mode.

In the Network > Wifi > Interface Configuration > General Setup tab, please select “Mesh” for the “Mode” option.

You would be prompted with the “Really switch mode?” option. Please click “Switch mode”.

You should set the following options.

  • Mesh ID: The default Mesh ID created is “Mesh SSID”. Key in the Mesh ID that would identify this mesh. All the mesh APs would be linked by this common Mesh ID.
  • Mesh Mode: This should be Mesh Wireless Gateway (RRC).
  • Click “Save & Apply”.
  • Go to the “Wireless Security” tab to set the wireless encryption (e.g. WPA/WPA2-PSK).

After that, you may set up additional wireless networks to provide coverage.

The steps are the same as described in the previous section for the RAP.

This RRC is now configured.

MAP Configuration

Now, disconnect your PC's LAN cable from the RAP (or RRC) and connect it to an AP that would function as an MAP.

This AP should not have any WAN interfaces. That is, it is operating in bridge mode.

Based on the wireless profile, channel, and spectrum width you had decided earlier, apply these settings to the radio that you would use for the mesh.

(The steps are the same as for the RAP) In the Network > Wifi > Interface Configuration > General Setup tab, please select “Mesh” for the “Mode” option.

You would be prompted with the “Really switch mode?” option. Please click “Switch mode”.

You should set the following options.

  • Mesh SSID: Please use the same Mesh ID as the RAP.
  • Mesh Mode: This should be Mesh Repeater (MAP).
  • Click “Save & Apply”.
  • Go to the “Wireless Security” tab to set the wireless encryption (e.g. WPA/WPA2-PSK).

MAP.gif

After that, you may set up additional wireless networks to provide coverage. (The steps are the same as for the RAP)


The Status > Overview page of an MAP.

The VAPs can be seen in the Network > WiFi page.

2016-03-31 16 48 05-MimoAP - Wifi.png

The Network > Wifi page of an MAP.

This MAP is now configured.

You would then repeat the same process to configure all the MAPs.

Potential Network Looping and Solution

If there are network loops, you may see the error message on the serial console of the root AP:

br-lan: received packet on ath1 with own address as source address

Also, you would also not be able to ping to the RAP from your PC.

This could happen if the AP was connected by a LAN cable to the network and then the mesh was enabled on the AP.

Once you see this, please disconnect the MAPs from the wired LAN network.

Connecting to the Mesh Network

Once the RAP and MAPs have been configured, devices can now connect to the wireless networks that provide coverage. The APs in the mesh network can also be monitored and managed with an AP Controller (APc).

Problem

Minimize the hops on the network

In a mesh network, every link, or "hop", between routers will decrease the bandwidth by half. This happens because wireless links can only do one thing at a time - transmit or receive. In a long "chain" of mesh links, this results in a very slow connection from end to end.

This happens for two reasons: i) Every hop on the network takes one-half of the bandwidth away. The throughput will decrease rapidly because of this. This will be most apparent at the network "edges" - the area several hops away from the resource people are trying to access, such as the gateway to the Internet or a local server.

ii) Many hops increases the latency. Latency is the word used in networking for delays, and when this number rises, certain applications - such as streaming audio or video, and VoIP - will start to have serious issues such as dropouts and stuttering. This may render these applications completely unusable.

Solution

There are ways to keep the number of hops down on a networks. Extra planning and design before the network is built can help minimize the problem. Additional links can be added to "bridge" between distant parts of the network afterwards.

There are several ways to decrease the number of hops on a network:

Solution 1

Plan from the start for high-performance backbone links. Mesh nodes on key rooftops and towers should have excellent connections to each other to allow for a solid "core network". This keep network performance higher as it grows. This also requires that resources such as connections to the Internet, or the placement of servers hosting applications, be planned ahead of time and placed near the "center" of the network.

Solution 2

Create small network clusters. Groups of mesh routers can server nearby building, and have just a few hops between all neighbors. These clusters can be linked together with ptp, or ptmp links back to a central point. This may require one very tall building or tower to act as that central point.

Solution 3

Create shortcuts on the network. If there are some parts of the mesh that have grown distant from the resources people want to use, one or more ptp links could be used to bridge the distance. This requires dedicated links and some extra configuration, but can provide a quick "shortcut" on the network and improve performance.

Tradeoff

Using more equipment to bridge parts of the mesh together and shorten the number of hops adds expense and complexity. One of the advantages of a mesh is its dynamic nature - which extensive planning and ptp links can limit.