index.html 7.7 KB

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