Commit 94c124d4 authored by JackV's avatar JackV

Part 4 and 5 done

parent f82f8273
......@@ -103,10 +103,10 @@
<section data-external-replace="./slides/intro.html"></section>
<section data-charset="utf-8"
data-markdown="./slides/content.md"
data-separator="^\r?\n---\r?\n$"
data-separator="^\r?\n----\r?\n$"
data-separator-notes="^Notes:"
data-separator-vertical="^\r?\n----\r?\n$">
data-separator-vertical="^\r?\n---\r?\n$">
</section>
<section data-external-replace="./slides/outro.html"></section>
</div>
</div>
\ No newline at end of file
</div>
# Intro e outro dentro l'HTML
### Programme
Il markdown contiene solo il contenuto.
* NFtables basics
* How to debug network problems
* Wireguard: easy to setup vpn
* Ansible: how to manange many computers
* Why have servers running at home
* Internet connections technologies
* How to build a linux home router
Di base si possono fare le slide anche in HTML se si vogliono animazioni buffe.
---
## Expected end result
![](assets/talosiannn.jpg)
---
## Enough joking
A lot of what we are going to
cover today has been done in depth
in previous Linux courses
(links in the relevant sections)
This talk focuses more on how
all these topics can come together
----
This is a long dash -- made of two little dashes (`--`).
# NFtables
---
## NFtables vs IPtables vs firewalld vs others
This dash is even longer --- and it is made of three little dashes (`---`).
"Quoting" is fun and easy. `"`Plain quoting`"` is ugly.
----
# Heading level 1
# Debug network problems
## Heading level 2
---
### Heading level 3
----
#### Heading level 4
# Wireguard
[Link to Slides](https://slides.poul.org/2019/corsi-linux/3c_wireguard.pdf)
[Link to Video](https://example.org)
There are **no** more heading levels.
---
----
<x-section-title>This is a section title</x-section-title>
# Ansible
[Link to Slide](https://slides.poul.org/2019/corsi-linux/4b_ansible/)
[Link to Video](https://example.org)
If you want the section title in the top-right cornet
you can add **&lt;x-section-title&gt;title&lt;/x-section-title&gt;** in the slide
---
----
```python
import sys
# Beyond the cloud
----
x = 1 + 2
## Why have a server at home?
if x > 2:
pass
---
try:
with open('/dev/null') as f:
pass
except IOError:
raise Exception('Error!')
finally:
sys.exit()
```
### Server@Home
* We have full control on the hardware
* Advanced setups possible
* Is better suited in some scenarios (eg. backup)
* Usually cheaper than a server __*__
(eg. storage)
---
### Server
* Usually have better uptime (much closer to 100%)
* Storage has magic underneath
* Usually have higher network bandwidth
---
### What to consider to do cost/benefit
* On cloud servers the entire infrastructure
is redundant, and if a component breaks the
cloud provider replaces it free of charge,
at home you have to pay for replacements
* Magic ratio `kWh/Wy` -> `8.76`
* High power consumption can lead to an
expensive bill
----
- Do you remember bullet list?
```python
bullet_list = ["Do you remember bullet list?"]
```
- You can also allign code to bullet lists!
```python
bullet_list.append("You can also allign code to bullet lists!")
```
- It's not too hard!
```python
if not hard:
bullet_list.append("It's not too hard!")
```
\ No newline at end of file
# How to pick the hardware
---
### Storage technologies summary
| | €/GB | Velocita R/W | Longevità |
| - |:---- |:------------ |:--------- |
| HDD | Low | Medium | Medium<br>(3-5 anni) |
| SSD | Medium | High | High<br>(20+ anni) |
| SD/eMMC | High | Medium-Low | Short<br>(1-2 anni)|
| Cloud | - | Internet Speed | Infinite |
---
## SBC ARM/Router
<img src="assets/rpi4.jpg" style="max-height: 30%">
* Cost: 20-100€
* Computing power: Medium-Low
* Storage: scarce (eccetto usb 3)
* Power consumption: > 10W
---
## Things to consider before buying
* Ethernet maximum speed (100 vs 1000)
* How the ethernet chip is connected to the SoC
* How the USB ports are connected to the SoC
* CPU computing power
* RAM quantity
* Bootable storage (SD/eMMC vs USB 3/SATA)
* Mainline linux support
---
## Why you shouldn't buy a RPi
* 1-3 have usb ports behind an hub
* 1-3 have ethernet behind an usb adapter<br>(guess where it is attached?)
* Wifi tends to be very crappy without
an u.FL connector and a proper antenna
* Computing power is generally poorer than
competitors for the same price point
* RPi linux distributions tend to come with
a lot of propietary broadcom blobs
---
## Laptop/Entry-level desktop
*foto portatile nizzo*
*foto router antisgamo*
* Cost: 50-200€
* Computing power: Medium-High
* Storage: sufficent
* Power consumption: 10-50W
---
## High-End Desktop/Server
*Foto server ribis here*
* Cost: 100-2000€
* Computing power: High
* Storage: sufficent-plenty (SAN)
* Power Consuption: 200-2000W
* Pros: no house heating costs
---
## I need to crunch numbers, what should I do?
* Use a low-power device to trigger [Wake on LAN](https://en.wikipedia.org/wiki/Wake-on-LAN) for a more powerful device
* Use a combination of Home+Cloud
* Use spot/preemptible cloud VMs<br>(this depends on the workload)
----
# Internet connection technologies
---
How do we connect to the internet?
3 main technologies:
* *DSL
* GPON (fiber)
* Ethernet
---
## *DSL
< Foto doppino telefonico >
* Encompasses various technologies (ADSL/VDSL/VDSL2)
* All of them use a copper medium (telephone line) to transmit data
* Phone line length and EMF interference *matter* on transmission speed
---
## Router options for *DSL
* Lantiq-based routers ( [list](https://openwrt.org/docs/techref/targets/lantiq) )
* No one else since the DSL chipset is usually custom-made and manufacturers don't relase the source code
* Some routers allow enough configuration to be ISP-neutral, but that comes at a
cost of old software
* In theory _Modem Libero_ should allow the use of old ISP routers, but I wouldn't hold my breath on that
---
## GPON (fiber)
< foto filo fibra >
* New technology used for FTTH (1 GB/s internet)
* There is a direct optical link between the end user and the ISP
* Since the transmission is optical, no interference!
* Optic fiber crimping has some tooling costs (~200€)
---
## ONTs
< foto ONT padella >
< foto ONT stick >
A ONT is a device that bridges a fiber link to ethernet
(allowing us to use any device we want as a router)
AFAIK there is no ONT with OpenWRT support
---
## Raw Ethernet
< foto cavo eth >
Some provides (eg. Eolo) use alternative transmission mediums,
usually these will have an ordinary ethernet cable attached
to a mundane wifi router
----
\ No newline at end of file
<section class="intro">
<h1>Corsi Punto Croce 2018</h1>
<h2>Come fare gli orli</h2>
<h1>Network e Dintorni</h1>
<h2></h2>
<img src="./poul/img/logo-text-white.svg"/>
<p>Autore &lt;email@email.com&gt;</p>
</section>
\ No newline at end of file
<p>Giacomo Vercesi &lt;jackv@poul.org&gt;</p>
</section>
......@@ -7,5 +7,5 @@
<img class="cc" src="./poul/img/creativecommons-by-nc-sa.svg"/>
<p>Autore &lt;email@email.com&gt;</p>
</section>
\ No newline at end of file
<p>Giacomo Vercesi &lt;jackv@poul.org&gt;</p>
</section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment