Network Architecture

Version 8 (Pau Escrich, 10/04/2013 08:38 am)

1 1 Pau Escrich
h1. NetworkArchitecture
2 1 Pau Escrich
3 5 Pau Escrich
h2. The basics
4 5 Pau Escrich
5 2 Pau Escrich
The network architecture designed for libre-mesh is based in two layers:
6 2 Pau Escrich
* The cloud layer 2 which runs Batman-Adv
7 2 Pau Escrich
* The network layer 3 which runs BMX6
8 2 Pau Escrich
9 1 Pau Escrich
!network1.png!
10 3 Pau Escrich
11 4 Pau Escrich
All nodes are runing BMX6 and BATADV at same time in the same WiFi devices but different VLANS. 
12 4 Pau Escrich
The BMX6 VLAN is always the same, so all link-layer connected nodes will see each other.
13 4 Pau Escrich
The BATADV VLAN depends on the cloud identifier (CID) which is calculed (by default) from the AP SSID.
14 4 Pau Escrich
15 3 Pau Escrich
!network2.png!
16 4 Pau Escrich
17 4 Pau Escrich
This configuration allows to isolate the layer 2 clouds. 
18 4 Pau Escrich
For instance a neighborhood, a company complex or a street level hotsposts network can choose isolate their LAN from the rest of the network. 
19 4 Pau Escrich
However at the same time, they will be able to reach the rest of the community network using the layer 3 routed network.
20 4 Pau Escrich
21 4 Pau Escrich
In case an entire network community wants to have a single cloud, they can just use the same CID.
22 5 Pau Escrich
23 5 Pau Escrich
h2. The details
24 5 Pau Escrich
25 7 Pau Escrich
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.
26 7 Pau Escrich
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.
27 7 Pau Escrich
28 5 Pau Escrich
!network3.png!
29 6 Pau Escrich
30 7 Pau Escrich
All mesh nodes have a DHCP/RA server to provide valid IPs from the cloud to the clients.
31 7 Pau Escrich
The DHCP leasses file is shared among the cloud to prevent colisions (using A.L.F.R.E.D).
32 7 Pau Escrich
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.
33 7 Pau Escrich
34 6 Pau Escrich
!network4.png!
35 7 Pau Escrich
36 7 Pau Escrich
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.
37 7 Pau Escrich
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.
38 1 Pau Escrich
39 1 Pau Escrich
!network5.png!
40 8 Pau Escrich
41 8 Pau Escrich
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.
42 8 Pau Escrich
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. 
43 8 Pau Escrich
44 8 Pau Escrich
!network6.png!