Network Architecture
Version 12 (Pau Escrich, 10/04/2013 09:35 am)
1 | 1 | Pau Escrich | h1. NetworkArchitecture |
---|---|---|---|
2 | 1 | Pau Escrich | |
3 | 9 | Pau Escrich | h2. Objectives to achieve |
4 | 9 | Pau Escrich | |
5 | 9 | Pau Escrich | * Scalability |
6 | 9 | Pau Escrich | * Network segmentation |
7 | 9 | Pau Escrich | * Layer 2 roaming inside certain areas |
8 | 9 | Pau Escrich | * Smart gateway selection with redundancy and possibility of user-choice |
9 | 9 | Pau Escrich | * Compatibility of most of the existing scenarios |
10 | 9 | Pau Escrich | * A single firmware for all the network (for ground level, for backbone, for companies, for quick deployments, etc.) |
11 | 9 | Pau Escrich | |
12 | 5 | Pau Escrich | h2. The basics |
13 | 5 | Pau Escrich | |
14 | 2 | Pau Escrich | The network architecture designed for libre-mesh is based in two layers: |
15 | 2 | Pau Escrich | * The cloud layer 2 which runs Batman-Adv |
16 | 2 | Pau Escrich | * The network layer 3 which runs BMX6 |
17 | 2 | Pau Escrich | |
18 | 1 | Pau Escrich | !network1.png! |
19 | 3 | Pau Escrich | |
20 | 12 | Pau Escrich | By default all nodes are runing BMX6 and BATADV at same time in the same WiFi devices but different VLANS. |
21 | 4 | Pau Escrich | The BMX6 VLAN is always the same, so all link-layer connected nodes will see each other. |
22 | 4 | Pau Escrich | The BATADV VLAN depends on the cloud identifier (CID) which is calculed (by default) from the AP SSID. |
23 | 4 | Pau Escrich | |
24 | 3 | Pau Escrich | !network2.png! |
25 | 4 | Pau Escrich | |
26 | 4 | Pau Escrich | This configuration allows to isolate the layer 2 clouds. |
27 | 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. |
28 | 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. |
29 | 4 | Pau Escrich | |
30 | 4 | Pau Escrich | In case an entire network community wants to have a single cloud, they can just use the same CID. |
31 | 5 | Pau Escrich | |
32 | 5 | Pau Escrich | h2. The details |
33 | 5 | Pau Escrich | |
34 | 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. |
35 | 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. |
36 | 7 | Pau Escrich | |
37 | 5 | Pau Escrich | !network3.png! |
38 | 6 | Pau Escrich | |
39 | 7 | Pau Escrich | All mesh nodes have a DHCP/RA server to provide valid IPs from the cloud to the clients. |
40 | 7 | Pau Escrich | The DHCP leasses file is shared among the cloud to prevent colisions (using A.L.F.R.E.D). |
41 | 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. |
42 | 7 | Pau Escrich | |
43 | 6 | Pau Escrich | !network4.png! |
44 | 7 | Pau Escrich | |
45 | 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. |
46 | 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. |
47 | 1 | Pau Escrich | |
48 | 1 | Pau Escrich | !network5.png! |
49 | 8 | Pau Escrich | |
50 | 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. |
51 | 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. |
52 | 8 | Pau Escrich | |
53 | 8 | Pau Escrich | !network6.png! |
54 | 10 | Pau Escrich | |
55 | 10 | Pau Escrich | h2. IP addressing |
56 | 10 | Pau Escrich | |
57 | 11 | Pau Escrich | 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). |
58 | 10 | Pau Escrich | |
59 | 10 | Pau Escrich | !ip1.png! |