« Previous -
Version 12/15
(diff) -
Next » -
Current version
Pau Escrich, 10/04/2013 09:35 am
NetworkArchitecture¶
Objectives to achieve¶
- Scalability
- Network segmentation
- Layer 2 roaming inside certain areas
- Smart gateway selection with redundancy and possibility of user-choice
- Compatibility of most of the existing scenarios
- A single firmware for all the network (for ground level, for backbone, for companies, for quick deployments, etc.)
The basics¶
The network architecture designed for libre-mesh is based in two layers:- The cloud layer 2 which runs Batman-Adv
- The network layer 3 which runs BMX6
By default all nodes are runing BMX6 and BATADV at same time in the same WiFi devices but different VLANS.
The BMX6 VLAN is always the same, so all link-layer connected nodes will see each other.
The BATADV VLAN depends on the cloud identifier (CID) which is calculed (by default) from the AP SSID.
This configuration allows to isolate the layer 2 clouds.
For instance a neighborhood, a company complex or a street level hotsposts network can choose isolate their LAN from the rest of the network.
However at the same time, they will be able to reach the rest of the community network using the layer 3 routed network.
In case an entire network community wants to have a single cloud, they can just use the same CID.
The details¶
All WiFi Access Points from the same layer 2 cloud share the same SSID, a special anycast IPv4/IPv6 address and a special anycast MAC address.
It will allow real roaming inside the network, so the clients does not need to renew their IP configuration when they change from one AP to the other.
All mesh nodes have a DHCP/RA server to provide valid IPs from the cloud to the clients.
The DHCP leasses file is shared among the cloud to prevent colisions (using A.L.F.R.E.D).
As long as all nodes share the same anycast MAC/IP, from the client point of view it is fully transparent. Thus the gateway is always the same nonetheless the mesh node where they are attached is different.
When a client wants to reach the Internet or any other network which is not the one used in the layer 2 cloud, it sends the packet to the anycast gateway address.
An ebtables rule in the LAN/AP bridge prevents the layer 2 packets propagation in the cloud sent to the anycast address. So the mesh node where the client is associated gets the packet but not the others.
The packet is routed throw the BMX6 layer 3 network to the best Internet gateway (according to the BMX6 metrics). It may be a node from the same cloud or any other from another far away cloud.
In the way back the packet will arreive to some node in the cloud but it may not be the same, it will depend on the routing protocol metrics.
IP addressing¶
LibreMesh uses both IPv4 and IPv6. While the routed network layer is done only with IPv6, the IPv4 is tunneled using IPIP tunnels between the layer 2 clouds. Each cloud uses a /22 of IPv4 addresses (1024 ips), and /48 of IPv6 addresses (2^80 ips).