index.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Introduzione alle reti</title>
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  9. <link rel="stylesheet" href="../reveal-js/css/reset.css">
  10. <link rel="stylesheet" href="../reveal-js/css/reveal.css"><link rel="stylesheet" href="../reveal-js/css/theme/black.css" id="theme">
  11. <link rel="stylesheet" href="../highlight-js/solarized-dark.min.css"><link rel="stylesheet" href="../style.css" id="custom_css">
  12. </head>
  13. <body>
  14. <div class="reveal">
  15. <div class="slides">
  16. <section><h3 id="intro-sulle-reti">intro sulle reti</h3>
  17. </section><section>
  18. <h3 id="come-funziona-linternet">Come funziona l&rsquo;internet?</h3>
  19. </section><section>
  20. <ul>
  21. <li>via radio</li>
  22. <li>con le antenne telefoniche</li>
  23. <li>con cavi sottomarini</li>
  24. <li>con connessioni satellitari</li>
  25. </ul>
  26. </section><section>
  27. <h5 id="heading"></h5>
  28. <p><img src="../images/cable_map.png" alt="/images/cable_map.png"></p>
  29. </section><section>
  30. <!--
  31. ![/images/datacenter1.jpeg](/images/datacenter1.jpeg)
  32. ---
  33. ![/images/datacenter2.jpeg](/images/datacenter2.jpeg)
  34. --- -->
  35. <h3 id="un-po-di-sigle">Un po di sigle</h3>
  36. <p>Tanto per confonderci meglio, cerchiamo di capire cosa fanno questi diversi
  37. elementi</p>
  38. </section><section>
  39. <ul>
  40. <li>ISP</li>
  41. <li>Router</li>
  42. <li>WAN</li>
  43. <li>LAN</li>
  44. <li>Host(s)</li>
  45. <li>WLAN</li>
  46. </ul>
  47. </section><section>
  48. <h3 id="stack-isoosi">Stack ISO/OSI</h3>
  49. <p>Possiamo dividere la rete internet, per come viene vista da un pacchetto,
  50. si puo&rsquo; suddividere in sette &ldquo;strati&rdquo;.</p>
  51. </section><section>
  52. <img src='../images/iso.png' style='height: 600px;'/>
  53. </section><section>
  54. <h3 id="dallalto-verso-il-basso">Dall&rsquo;alto verso il basso</h3>
  55. <p><strong>Application Layer</strong></p>
  56. <ul>
  57. <li>HTTP (Hypertext Transfer Protocol)</li>
  58. <li>SMTP (Simple Mail Transfer Protocol)</li>
  59. </ul>
  60. <p>ce ne sono un sacco, ma chi decide? <a href="https://datatracker.ietf.org/doc/html/rfc2616">RFC</a>, IETF</p>
  61. </section><section>
  62. <h3 id="transport-layer">Transport Layer</h3>
  63. <p>Come i dati vengono mandati, se controllando o meno gli errori durante la
  64. connessione.</p>
  65. <ul>
  66. <li>TCP (Transmission Control Protocol) - reliable data delivery</li>
  67. <li>UDP (User Datagram Protocol) - unreliable data delivery</li>
  68. </ul>
  69. </section><section>
  70. <h3 id="network-layer">Network Layer</h3>
  71. <p>Qui per permettere agli host, più propriamente al sistema operativo,</p>
  72. <p>Questo layer usa:</p>
  73. <ul>
  74. <li>IP (Internet Protocol) - Permette di instradare pacchetti da una host
  75. all&rsquo;altro</li>
  76. <li>ICMP (Internet Control Message Protocol) - Errori, debug, che succede.</li>
  77. </ul>
  78. </section><section>
  79. <h3 id="link-layer">Link Layer</h3>
  80. <p>Come vengono mandati fisicamente i dati nella ferraglia</p>
  81. <ul>
  82. <li>quanti modi vi vengono in mente?</li>
  83. </ul>
  84. </section><section>
  85. <h3 id="paccheti-che-si-instradano">Paccheti che si instradano?</h3>
  86. <p>Abbiamo trovato un modo molto criptico di dire &ldquo;dati che si muovono&rdquo;, ma
  87. avviene cio'?</p>
  88. <ul>
  89. <li>MAC: 8 byte OUI (Organizational unique identifier) 8 univoci per scheda
  90. fisica</li>
  91. <li>IP</li>
  92. <li>Hostname</li>
  93. </ul>
  94. </section><section>
  95. <h3 id="quindi-se-visito-un-sito-che-giro-faccio">Quindi, se visito un sito, che giro faccio?</h3>
  96. </section><section>
  97. <h3 id="layer-applicativo">Layer Applicativo</h3>
  98. <pre><code>* Protocollo HTTP
  99. * Metodi: GET, POST, vari ed eventuali
  100. &gt; GET / HTTP/1.1
  101. &gt; Host: google.com
  102. </code></pre>
  103. </section><section>
  104. <h3 id="layer-di-trasporto">Layer di trasporto</h3>
  105. <pre><code>- Porte
  106. - UDP
  107. - TCP
  108. </code></pre>
  109. </section><section>
  110. <h3 id="layer-di-rete">Layer di Rete</h3>
  111. <pre><code>- IP: destinazione e sorgente
  112. </code></pre>
  113. </section><section>
  114. <h3 id="layer-fisico">Layer Fisico</h3>
  115. <pre><code>- Incapsula il pacchetto TCP/IP dentro un frame
  116. - ARP (Address Resolution Protocol)
  117. </code></pre>
  118. </section><section>
  119. <h3 id="quindi-se-vado-su-un-sito-che-giro-faccio">Quindi se vado su un sito che giro faccio?</h3>
  120. <p><img src="../images/stackiso.png" alt="Esempio stack ISO/OSI"></p>
  121. </section><section>
  122. <h3 id="route-netmask-e-altre-cose-orribili">ROUTE, NETMASK, E ALTRE COSE ORRIBILI</h3>
  123. <ul>
  124. <li>Ovvero, di cosa ha bisogno il mio computer per attaccarsi al router?</li>
  125. <li>IP, lo abbiamo visto</li>
  126. <li>GATEWAY, &ldquo;da dove passare&rdquo;, quindi l&rsquo;IP del gateway</li>
  127. <li>NETMASK, il mio PC sa di essere in una sottorete, ma quanto e'
  128. grande?</li>
  129. </ul>
  130. <p>Con questi ingredienti posso collegarmi al router!</p>
  131. </section><section>
  132. <h3 id="dhcp">DHCP</h3>
  133. <p>E&rsquo; interessante cercare di capire come fa il router a farci collegare
  134. in automatico.</p>
  135. <ul>
  136. <li>DHCP</li>
  137. <li>DHCP DISCOVER</li>
  138. <li>DHCP OFFER</li>
  139. <li>DHCP REQUEST</li>
  140. <li>DHCP ACK</li>
  141. <li>Riusciamo a vederlo con wireshark?</li>
  142. </ul>
  143. </section><section>
  144. <h3 id="http">HTTP</h3>
  145. <p>Proviamo! Posso usare internet da terminale?</p>
  146. <p><code>curl https://www.wttr.in/turin </code></p>
  147. </section><section>
  148. <h3 id="developer-tools">Developer Tools</h3>
  149. <p>Ovvero, avevate mai provato a premere <strong>F12</strong> sul browser?</p>
  150. </section><section>
  151. <h3 id="get">GET</h3>
  152. <ul>
  153. <li>parametri</li>
  154. <li>escaping</li>
  155. <li>content-type</li>
  156. </ul>
  157. <p>eg. autocompletamento di startpage.com</p>
  158. </section><section>
  159. <h3 id="post">POST</h3>
  160. <ul>
  161. <li>parametri</li>
  162. <li>dati</li>
  163. </ul>
  164. </section><section>
  165. <h3 id="live---ws">Live - WS</h3>
  166. <p>pad.</p>
  167. </section>
  168. </div>
  169. </div>
  170. <script type="text/javascript" src=../reveal-hugo/object-assign.js></script>
  171. <a href="../reveal-js/css/print/" id="print-location" style="display: none;"></a>
  172. <script type="text/javascript">
  173. var printLocationElement = document.getElementById('print-location');
  174. var link = document.createElement('link');
  175. link.rel = 'stylesheet';
  176. link.type = 'text/css';
  177. link.href = printLocationElement.href + (window.location.search.match(/print-pdf/gi) ? 'pdf.css' : 'paper.css');
  178. document.getElementsByTagName('head')[0].appendChild(link);
  179. </script>
  180. <script type="application/json" id="reveal-hugo-site-params">{"custom_css":"style.css","highlight_theme":"solarized-dark"}</script>
  181. <script type="application/json" id="reveal-hugo-page-params">null</script>
  182. <script src="../reveal-js/js/reveal.js"></script>
  183. <script type="text/javascript">
  184. function camelize(map) {
  185. if (map) {
  186. Object.keys(map).forEach(function(k) {
  187. newK = k.replace(/(\_\w)/g, function(m) { return m[1].toUpperCase() });
  188. if (newK != k) {
  189. map[newK] = map[k];
  190. delete map[k];
  191. }
  192. });
  193. }
  194. return map;
  195. }
  196. var revealHugoDefaults = { center: true, controls: true, history: true, progress: true, transition: "slide" };
  197. var revealHugoSiteParams = JSON.parse(document.getElementById('reveal-hugo-site-params').innerHTML);
  198. var revealHugoPageParams = JSON.parse(document.getElementById('reveal-hugo-page-params').innerHTML);
  199. var options = Object.assign({},
  200. camelize(revealHugoDefaults),
  201. camelize(revealHugoSiteParams),
  202. camelize(revealHugoPageParams));
  203. Reveal.initialize(options);
  204. </script>
  205. <script type="text/javascript" src="../reveal-js/plugin/markdown/marked.js"></script>
  206. <script type="text/javascript" src="../reveal-js/plugin/markdown/markdown.js"></script>
  207. <script type="text/javascript" src="../reveal-js/plugin/highlight/highlight.js"></script>
  208. <script type="text/javascript" src="../reveal-js/plugin/zoom-js/zoom.js"></script>
  209. <script type="text/javascript" src="../reveal-js/plugin/notes/notes.js"></script>
  210. </body>
  211. </html>