# Module 5: Measuring networks 1. Recap from last week 2. Measuring and monitoring 3. Streaming and monitoring 4. Profiling users 5. Wrap-up & homework --- # Recap from last week **First Week** We formed a .highlight[wireless mesh network] using Raspberry Pis **Second week** We configured a .highlight[wired network] using Raspberry Pis **Third Week** We configured a .highlight[wireless mesh network] using Raspberry Pis **Fourth Week** We planned out a .highlight[wireless mesh network] in our community **This Week** We will *measure* our network --- class: center, middle # Measuring & Monitoring --- # Net neutrality *According to [Wikipedia](https://en.wikipedia.org/wiki/Net_neutrality)* > Net neutrality is the principle that Internet service providers treat all data on the Internet the same, and not discriminate or charge differently by user, content, website, platform, application, type of attached equipment, or method of communication. --- class: center, middle # Measuring Networks Measuring a network provides a single point-in-time calculation of an attribute of a network. --- **Measuring networks** # Why do we measure networks? - What is expected of our network and what is the reality? - How can we improve the network? - Is the user experience acceptable? --- **Measuring networks** # Monitoring as long-term measuring - Monitoring networks provides a constant measurement - Most monitoring suites provide: - Means of collecting measurement results, *push* or *poll* - Means of storing this data for a long period of time - Means of querying or viewing the data collected --- **Measuring networks** # Push vs. poll **Push** - Provides event-driven information - Requires nodes to be operational - Usually only one node provides access to the information **Poll** - Monitoring node requests information from each reporting device - Monitoring node knows when a node is non-responsive - Allows possibility for any node to be monitor - Provides more consistent information but uses more bandwidth --- class: center, middle # Bits & bytes --- **Bits & Bytes** ## Bit - A bit holds only 1 or 0 (_on_ or _off_) - Denoted by a **lower case b** (e.g. b, b/s, bps) | Unit | Definition | |:-------------|:-------------------| | b | bit | | b/s or bps | bit per second | | kb/s or kbps | kilobit per second | | Mb/s or Mbps | megabit per second | | Gb/s or Gbps | gigabit per second | --- **Bits & Bytes** ## Byte - Contains 8 bits - Denoted by an **upper case B** (e.g. B, B/s, Bps) | Unit | Definition | |:-------------|:--------------------| | B | byte | | B/s or Bps | byte per second | | kB/s or kBps | kilobyte per second | | MB/s or MBps | megabyte per second | | GB/s or GBps | gigabyte per second | --- **Bits & Bytes** ## Prefixes | Prefix | Name | Multiplier | |:-------|:-------|:-----------------| | k | kilo | 1000
1
| | M | mega | 1000
2
| | G | giga | 1000
3
| | Ki | kibi | 1024
1
| | Mi | mebi | 1024
2
| | Gi | gibi | 1024
3
| --- class: center, middle # Network metrics --- **Network metrics** ## Volume _(bits or bytes)_ - Collected over time - Sum of all bits/bytes sent and received - Common tool to keep track of this is `MRTG` (Multi Router Traffic Grapher) --- **Network metrics** ## Speed _(bps or Bps)_ - Also called "bandwidth" sometimes - How much data over a period of time - Common to test between two points using `iperf3` --- **Network metrics** ## Round trip time _(seconds)_ - Commonly called "RTT" - Time for a packet to reach the destination and back - Common tool to test this is `ping` or `noping` --- **Network metrics** ## Jitter _(seconds)_ - Difference between time packets take to reach the destination - Usually measured with UDP packets - Common tool to test this is `iperf3` using UDP packets --- **Network metrics** ## Packet loss - The number of packets that do not reach the destination - Packets are sometimes re-transmitted, other times ignored - Common tool to test this is `ping` and `noping` --- # Speed test Using [speedtest.net](https://www.speedtest.net), run a speed test with available public WiFi: - Run speed test from a single device - Run speed test from two devices simultaneously - Run speed test from several devices simultaneously If the speed test is using the full internet connection, each additional user running a speed test should cut the speed for everyone. If it does not, it could indicate: - Wireless bottleneck - Server bottleneck - Per device bandwidth limit --- class: center, middle # Streaming and monitoring --- **Streaming and monitoring** ## Cellphone usage - Identify your apps' data usage - Record a few of the top apps that used up the most data - Was this data transmitted over WiFi or cellular network? **Discuss** - Is cell data worth "more" than WiFi? Why? - Were you surprised about some of your apps' data usage? --- **Streaming and monitoring** ## Streaming over WiFi We will monitor a video stream using `bwm-ng` (Bandwidth Monitor - Next Generation). After that, we will use `tc` (Traffic Control) to limit the bandwidth available to the stream and observe the effects. --- class: center, middle # Profiling users --- # User profiles In a group, discuss one of the following user profiles: - Gamer - Streamer (YouTube, Netflix, etc.) - Web user with occasional video conferencing calls (web, email, instant messaging, Skype, Hangout, etc.) --- # User profile considerations Consider the following in your discussion: - What are the most used services by the user? - How would the user be affected if internet access becomes unavailable? - What would the user consider as "internet went down"? - What is the threshold for the user? - Packet loss / poor link quality - Latency / ping - Bandwidth speed - Bandwidth allotment - Does network traffic trend change throughout the day for the user's connection? - Look at your local internet provider (Bell, Rogers, etc.), which plan would you suggest for them and why? - Does wired vs. wireless affect the experience? --- # Next week Long-range low-power radio networks using **LoRa technology**