Skip to content

Commit

Permalink
Copy edit content and address remaining issues on technical content
Browse files Browse the repository at this point in the history
  • Loading branch information
benhylau committed Jan 7, 2020
1 parent dad673f commit 0c4501a
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 50 deletions.
10 changes: 5 additions & 5 deletions docs/2.0-network-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ The central router of each node is an ESPRESSObin single-board computer (SBC). I

![node-mesh-hall](images/node-mesh-hall.jpg)

Another important feature is modularity, which allows us to easily construct different mesh nodes according to the network topology. For example, switching a pair of MikroTik Wireless Wire for an ethernet cable requires no software configuration, neither does switching between different types of Access Points or Network Switches. We also discovered an unanticipated consequence of having modular devices; it allowed us to hold a device and describe its single purpose in a mesh node, allowing new network participants to visualize the different components necessary to form a mesh node and build a mental picture of a network exchanging information over different wireless frequencies across the venue. This allowed us to form small teams of [Network Stewards](3.2-network-stewards.html) that go around the site rapidly extending, altering, and repairing the network, while on-boarding new participants in the process.
Another important feature is modularity, which allows us to easily construct different mesh nodes according to the network topology. For example, switching a pair of MikroTik Wireless Wire for an ethernet cable requires no software configuration, neither does switching between different types of Access Points or Network Switches. We also discovered an unanticipated consequence of having modular devices; it allowed us to hold a device and describe its single purpose in a mesh node, allowing new network participants to visualize the different components necessary to form a mesh node and build a mental picture of a network exchanging information over different wireless frequencies across the venue. This ability to teach many aspects of the network allowed us to recruit and form small teams of [Network Stewards](3.2-network-stewards.html) that go around the site rapidly extending, altering, and repairing the network, while on-boarding new participants in the process.

The diagram below illustrates how the router in **Node 1** uses two `lan` ports connect its Local Area Network (LAN) and one `wan` port to connect a mesh radio to access the Wide Area Network (WAN). In this example, Camp participants would connect their wireless devices (e.g. phones and laptops) to an Access Point attached to `lan0` and wired devices (e.g. Raspberry Pi and servers) to a Network Switch attached to `lan1`. In another node, both `lan` ports can each be attached to an Access Point in order to cover a large hall, for example, and no software changes would be necessary as explained above.

![network-diagram](images/network-diagram.jpg)

Since we only have one `wan` port, in cases where we use more than one mesh radio (i.e. not an edge node), we connect a VLAN-tagging switch to the `wan` port and then the mesh radios to the switch ports. This way, the router sees `wan.1`, `wan.2`, ..., `wan.N` network interfaces, for `N` mesh radios connected, and Babel can route traffic between them. The above diagram shows an example edge node, **Node 1**, that is connected to a relay node, **Node 2**, that utilizes a VLAN-tagging switch to connect three mesh radios.
Since we only have one `wan` port, in cases where we use more than one mesh radio (i.e. not an edge node), we connect a VLAN-tagging switch to the `wan` port and then the mesh radios to the switch ports. This way, the router sees `wan.1`, `wan.2`, ..., `wan.N` network interfaces, for `N` mesh radios connected, and Babel can route traffic between them based on the dynamic network topology and route metrics. The above diagram shows an example edge node, **Node 1**, that is connected to a relay node, **Node 2**, that utilizes a VLAN-tagging switch to connect three mesh radios.

We ended up deploying 6 nodes throughout Camp, and a 7th node as an activity. All our nodes have different components and some of them evolved throughout the days of Camp. You can see a [list of hardware](5.2-hardware-inventory.html) that make up these mesh nodes. Participants have no expectation of roaming across different building zones, and they can check their IP address to see exactly which node they are connected to.
We ended up deploying 6 nodes throughout Camp, and then a 7th node as an activity. All our nodes have different components and some of them evolved throughout the days of Camp. You can see a [list of hardware](5.2-hardware-inventory.html) that make up these mesh nodes. Participants have no expectation of roaming across different building zones, and they can check their IP address to see exactly which node they are connected to.

### IP Assignments

![model-mesh-hall](images/model-mesh-hall.jpg)

The network assigns each connected device an IP address from the `10.X.0.0/16` subnet that is unique across Camp, where `X` corresponds to the building number on the physical map. For example, the `Mesh Hall` node has IP address `10.8.0.1` and assigns from `10.8.0.0/16` because it building number is `8`.
The network assigns each connected device an IP address from the `10.X.0.0/16` subnet that is unique across Camp, where `X` corresponds to the building number on the physical map. For example, the `Mesh Hall` node has IP address `10.8.0.1` and assigns from `10.8.0.0/16` because its building number is `8`.

![network-physical-map](images/network-physical-map.png)

The lack of Network Address Translation (NAT) allows for any device to work as a server, having a stable IP address that other devices can reach. This eliminates the need for intermediary nodes with public IP addresses, making it easy for peer-to-peer protocols to bootstrap with anyone during Camp.

When a device moves from one building to another, and it decides to associate with another mesh node's Access Point, it will be assigned a new IP address meanwhile the last two octets will generally be the same as before. If one is running a server, this will change its IP address, so most service-hosting devices are connected via ethernet cable at a building.
When a device moves from one building to another, and it decides to associate with another mesh node's Access Point, it will be assigned a new IP address meanwhile the last two octets will generally be the same as before. If one is running a server, this will change its IP address, so most service-hosting devices are connected via ethernet cable at a fixed building.

### Credits

Expand Down
13 changes: 7 additions & 6 deletions docs/2.1-espressobin-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ We will configure the ESPRESSObin board so `wan` is used to connect point-to-poi
+---+ +---+ +---+
```

1. Flash SD card with [Armbian for ESPRESSObin](https://www.armbian.com/espressobin/), then insert it into the ESPRESSObin with Internet access through one of its ethernet ports, then power on (never connect two ESPRESSObin devices to the same network until after you run this install script, the ethernet interface on all devices have the same MAC address and it will packet storm your network, nobody wants that)

1. [Connect via serial interface](http://wiki.espressobin.net/tiki-index.php?page=Serial+connection+-+Linux) to the ESPRESSObin's micro-USB port and run something like `minicom` on your computer to update the boot script (you probably need to paste a few lines at a time and make sure there are no spaces before and after each line):
1. Using your computer, [connect via serial interface](http://wiki.espressobin.net/tiki-index.php?page=Serial+connection+-+Linux) to the ESPRESSObin's micro-USB port and run something like `minicom` on your computer to update the boot script (you probably need to paste a few lines at a time and make sure there are no spaces before and after each line):

```
env default -a
Expand All @@ -56,8 +54,11 @@ We will configure the ESPRESSObin board so `wan` is used to connect point-to-poi
setenv boot_a_script 'ext4load ${boot_interface} ${devnum}:1 ${scriptaddr} ${prefix}boot.scr;source ${scriptaddr};'
saveenv
```
then run `boot` to boot into the SD card
then power off the board by disconnecting both the power and the mirco-USB port
1. Using your computer, flash SD card with [Armbian for ESPRESSObin](https://www.armbian.com/espressobin/), then insert it into the ESPRESSObin with Internet access through one of its ethernet ports, then power on (never connect two ESPRESSObin devices to the same network until after you run this install script, the ethernet interface on all devices have the same MAC address and it will packet storm your network, nobody wants that)
1. Login as `root` / `1234` then run [espressobin/install](https://github.com/dweb-camp-2019/meshnet/blob/master/prodnet/espressobin/install) and go through the first-run menus.
Expand All @@ -77,4 +78,4 @@ We will configure the ESPRESSObin board so `wan` is used to connect point-to-poi
# ./install TYPE NODE_ID
```
_The ESPRESSObin V5 has been discontinued and became unavailable weeks before DWeb Camp 2019. The ESPRESSObin V7 can be used in place of the V5._
_The ESPRESSObin V5 has been discontinued and became unavailable weeks before DWeb Camp 2019. The ESPRESSObin V7 can be used in place of the V5._
6 changes: 3 additions & 3 deletions docs/2.2-vlan-managed-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ navigation: 22

This device is only necessary for `relay` and `gateway` nodes.

We configured the ESPRESSObin to have only one `wan` port. Babel needs to distinguish different network interfaces in order to compute route metrics between the different links and make routing decisions accordingly. So we will make virtual interfaces by tagged each mesh radio with a different VLAN ID, essentially multiplexing differently tagged packets into `wan` which then seperates them out on `wan.1` `wan.2` `wan.3` and `wan.4` on the ESPRESSObin, and what Babel sees are seperate network interfaces as if the ESPRESSObin has 4 `wan` ports.
We configured the ESPRESSObin to have only one `wan` port. Babel needs to distinguish different network interfaces in order to create the intended network topology and compute route metrics between the different links, then make routing decisions accordingly. So we will make virtual interfaces by tagged each mesh radio with a different VLAN ID, essentially multiplexing differently tagged packets into `wan` which then seperates them out on `wan.1` `wan.2` `wan.3` and `wan.4` on the ESPRESSObin, and what Babel sees are seperate network interfaces as if the ESPRESSObin has 4 `wan` ports.

![vlan-switch](images/vlan-switch.jpg)

Expand All @@ -24,6 +24,6 @@ We configured the ESPRESSObin to have only one `wan` port. Babel needs to distin

1. Apply the configurations, then wait 30 seconds to ensure the changes are saved

1. Connect `port 5` to the ESPRESSObin `wan` port, and use the VLAN tagged ports for point-to-point radios or ethernet cables that are connect mesh nodes
1. Connect `port 5` to the ESPRESSObin `wan` port, and use the VLAN tagged ports for point-to-point radios or ethernet cables that connect mesh nodes

1. If this is an Internet Gatway node, connect your Internet backhaul to `port 4` (since we have `wan.4` configured to be the Internet route for Internet Gateway ESPRESSObins)
1. If this is an Internet Gatway node, connect your Internet backhaul to `port 4` (since we have `wan.4` configured to be the Internet route for Internet Gateway ESPRESSObins)
5 changes: 3 additions & 2 deletions docs/2.3-point-to-point-mesh-radios.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ Directional radios that make a point-to-point link are put into bridge mode to s

### MikroTik Wireless Wire (60 GHz)

These are pre-configured devices that operate at 60 GHz to form a gigabit wireless link at distances ~100 m. They between 700-900 Mbps even when alignment is a little off and have LEDs to indicate link quality. The pair has management IP addresses of `192.168.88.2` and `192.168.88.3`, when can be accessed via the ESPRESSObin via SSH as `admin` user, but this usually isn't necessary as they should "just work" as if it is an actual ethernet cable.
These are pre-configured devices that operate at 60 GHz to form a gigabit wireless link at distances ~100 m. They send and receive between 700-900 Mbps even when alignment is a little off and have LEDs to indicate link quality. The pair has management IP addresses of `192.168.88.2` and `192.168.88.3`, when can be accessed via the ESPRESSObin via SSH as `admin` user, but this usually isn't necessary as they should "just work" as if it is an actual ethernet cable.

### Ethernet Cable

Yes. If distances allow, you can just use an ethernet cable to link two nodes. Remember the maximum distance for ethernet cables to work reliably is 100 m. I have run into trouble at smaller distances when also doing PoE.
If distances allow, you can just use an ethernet cable to link two nodes. Remember the maximum distance for ethernet cables to work reliably is 100 m. Make sure to use reliable cables, as a lot of issues have been due to faulty cables of unknown origin or poorly crimped connectors. These issues are often not picked up by ethernet cable testers.

14 changes: 7 additions & 7 deletions docs/2.4-access-point-radios.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ There will be two users: `admin` with `ADMIN_PASSWORD`, and `me` with no passwor

1. Connect the MikroTik device to a router with a DHCP server

1. Connect your computer directly to the MikroTik device using wireless (not ethernet). There should be 2 new SSIDs for it.
1. Connect your computer directly to the MikroTik device using WiFi at one of its two SSIDs

1. Scan for the IP address of the MikroTik device with a tool like `nmap` or `arp-scan`

1. SSH into the device with `ssh admin@IP_ADDRESS`

1. Run the commands in [wap/wap-ap.rsc](https://github.com/dweb-camp-2019/meshnet/blob/master/prodnet/wap/wap-ap.rsc) in stages:
1. Run the first command after replacing the `ADMIN_PASSWORD`.
1. Run the next commands upto and including line 54, this will change the password and break your admin connection.
1. Reconnect with the wAP using the new password from line 54
1. Run `nmap` again to get device's new IP
1. SSH into the device again with it's new IP. (`ssh admin@IP_ADDRESS`)
1. Continue running the rest of the commands in [wap/wap-ap.rsc](https://github.com/dweb-camp-2019/meshnet/blob/master/prodnet/wap/wap-ap.rsc). depending on whether you connected to the 5GHz or 2.4GHz SSID you might break the admin connection one more time, or you will complete the last command and then it will break the connection. (Commands 56-67 are for 2.4GHz, 69-80 are for 5GHz). Keep reconnecting until you've run all of the commands.
1. Run the first command after replacing the `ADMIN_PASSWORD`
1. Run the next commands up to and including [Line 56](https://github.com/dweb-camp-2019/meshnet/blob/master/prodnet/wap/wap-ap.rsc#L56), this will change the WiFi password and break your WiFi and SSH connection
1. Reconnect with the wAP using the new password on Line 56
1. Run `nmap` again to get the device's new IP address
1. SSH into the device again with it's new IP address `ssh admin@IP_ADDRESS`
1. Run the next two blocks one by one, and reconnect as needed if the connection breaks
Loading

0 comments on commit 0c4501a

Please sign in to comment.