RETI.docx
Document Details
Uploaded by TriumphalPipa
Università degli Studi di Trento
Related
- PCSII Depression/Anxiety/Strong Emotions 2024 Document
- A Concise History of the World: A New World of Connections (1500-1800)
- Human Bio Test PDF
- University of Santo Tomas Pre-Laboratory Discussion of LA No. 1 PDF
- Vertebrate Pest Management PDF
- Lg 5 International Environmental Laws, Treaties, Protocols, and Conventions
Full Transcript
**1. What Is the Internet?** - - - - - - - - - - - - - - - - - - - - *[A Nuts-and-Bolts Description]* - - - we can describe the Internet in terms of a [networking infrastructure] that provides services to distributed applications:...
**1. What Is the Internet?** - - - - - - - - - - - - - - - - - - - - *[A Nuts-and-Bolts Description]* - - - we can describe the Internet in terms of a [networking infrastructure] that provides services to distributed applications: - - - - es: in many ways, **packets** are analogous to trucks, **communication links** are analogous to highways and roads, **packet switches** are analogous to intersections, and **end systems** are analogous to buildings. Just as a truck takes a path through the transportation network, a **packet takes a path through a computer network.** - - - - [a services description] - - - - **What Is a Protocol?** Un protocollo definisce il formato e l'ordine dei messaggi scambiati tra due o più entità in comunicazione, così come le azioni intraprese in fase di trasmissione e/o ricezione di un messaggio o di un altro evento End systems, packet switches, and other pieces of the Internet run protocols that control the sending and receiving of information within the Internet. The Transmission Control Protocol (TCP) and the Internet Protocol (IP) are two of the most important protocols in the Internet. The IP protocol specifies the format of the packets that are sent and received among routers and end systems. The Internet's principal protocols are collectively known as TCP/IP. We'll begin looking into protocols in this introductory chapter. - - There are specific messages we send, and specific actions we take in response to the received reply messages or other events (such as no reply within some given amount of time)- it takes two (or more) communicating entities running the same protocol in order to accomplish a task. *[Network Portocols]* All activity in the Internet that involves two or more communicating remote entities is governed by a protocol *A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.* **The Network Edge** - - - - - - - - - - - - - - - *DSL: digital subscriber line v Installazione:* - - *Fiber-to-the-home (FTTH)* - - - - - - - - - - - - - - - - - - - - - - - - - - - - **Denominazione sintetica dei cavi** - - - - - - - - - **Mezzi trasmissivi: cavo coassiale e fibra ottica** [Cavo coassiale:] - - - - - - - - [Fibra ottica:] - - - - - **Mezzi trasmissivi: canali radio** - - - - - - - [Tipi di canale radio] - - - - - - - - - - - ![](media/image81.png) host = end system. Hosts are sometimes further divided into two categories: clients and servers **Access Networks** \- when DSL is used, a customer's telco is also its ISP. Each customer's DSL modem uses the existing telephone line to exchange data with a *digital subscriber line access multiplexer* (DSLAM) located in the telco's local *central office* (CO). The home's DSL modem takes digital data and translates it to high-frequency tones for transmission over telephone wires to the CO; the analog signals from many such houses are translated back into digital format at the DSLAM. The residential telephone line carries both data and traditional telephone signals simultaneously, which are encoded at different frequencies: - - - This approach makes the single DSL link appear as if there were three separate links, so that a telephone call and an Internet connection can share the DSL link at the same time. The DSL standards define multiple transmission rates, including 12 Mbps downstream and 1.8 Mbps upstream, and 55 Mbps downstream and 15 Mbps upstream. Because the downstream and upstream rates are different, the access is said to be asymmetric. The maximum rate is also limited by the distance between the home and the CO, the gauge of the twisted-pair line and the degree of electrical interference While DSL makes use of the telco's existing local telephone infrastructure, cable Internet access makes use of the cable television company's existing cable television infrastructure ( A residence obtains cable Internet access from the same company that provides its cable television)![](media/image64.png) One important characteristic of cable Internet access is that it is a shared broadcast medium. In particular, every packet sent by the head end travels downstream on every link to every home and every packet sent by a home travels on the upstream channel to the head end. For this reason, if several users are simultaneously downloading a video file e on the downstream channel, the actual rate at which each user receives its video file will be significantly lower than the aggregate cable downstream rate. Because the upstream channel is also shared, a distributed multiple access protocol is needed to coordinate transmissions and avoid collisions. An up-and-coming technology that provides even higher speeds is fiber to the home (FTTH) as the name suggests, the FTTH concept is simple---provide an optical fiber path from the CO directly to the home. The simplest optical distribution network is called **direct fiber,** *with one fiber leaving the CO for each home.* More commonly, each fiber leaving the central office is actually shared by many homes; it is not until the fiber gets relatively close to the homes that it is split into individual customer-specific fibers. There are two competing optical-distribution network architectures that perform this splitting: **active optical networks (AONs)** and **passive optical networks (PONs).** AON is essentially switched Ethernet PON: - The average downstream speed of US FTTH customers was approximately 20 Mbps in 2011. Two other access network technologies are also used to provide Internet access to the home. In locations where DSL, cable, and FTTH are not available (e.g., in some rural settings), **a satellite link** can be used to connect a residence to the Internet at speeds of more than 1 Mbps; StarBand and HughesNet are two such satellite access providers. Dial-up access over traditional phone lines is based on the same model as DSL---a home modem connects over a phone line to a modem in the ISP. - - [Physical Media] Thus our bit, when traveling from source to destination, passes through a series of transmitter-receiver pairs. For each transmitter receiver pair, the bit is sent by propagating electromagnetic waves or optical pulses across a physical medium. The physical medium can take many shapes and forms and does not have to be of the same type for each transmitter-receiver pair along the path. Examples of physical media include *twisted-pair copper wire*, *coaxial cable, multimode fiber-optic cable, terrestrial radio spectrum, and satellite radio spectrum.* Physical media fall into two categories: **guided media and unguided media**. - - - - - - - - - **The Network Core** il nucleo della rete: - - - - [commutazione di circuito] - - - - - - - - - - - - COMMUTAZIONE DI CIRCUITO - CIRCUIT SWITCHING - - **ES:** **Quanto tempo occorre per inviare un file di 640.000 bit dall'host A all'host B su una rete a commutazione di circuito?** - - - **Ttot**=500ms (attesa x setup connessione) + Ttrasm **Ttrasm**= L (640.000 bit) / R (frequenza in bit x connessione) **R =** Ctot (1,536 Mbit/s) / 24 = 0,064 Mbps = 64kbps **Ttrasm= 640.000bit/64kbps = 10sec** **Ttot=500ms+10sec=10,5 sec.** - - - - - - - - - ![](media/image45.png) **Confronto tra commutazione di pacchetto e commutazione di circuito** **commutazione a pacchetto** - - - **Struttura di Internet: la rete delle reti** ![](media/image43.png) ![](media/image66.png) - - **Packet Switching** To send a message from a source end system to a destination end system, the source breaks long messages into smaller chunks of data known as packets. Between source and destination, each packet travels through communication links and packet switches (for which there are two predominant types, routers and link-layer switches). Packets are transmitted over each communication link at a rate equal to the full transmission rate of the link. If a source end system or a **packet switch is sending a packet of L bits over a link** with **transmission rate R bits/sec**, then **the time to transmit the packet is [L /R seconds.]** - - - - - In contrast, consider what happens when one host wants to send a packet to another host over a packet-switched network, such as the Internet. As with circuit switching, the packet is transmitted over a series of communication links. But different from circuit switching, the packet is sent into the network without reserving any link resources whatsoever. If one of the links is congested because other packets need to be transmitted over the link at the same time, then the packet will have to wait in a buffer at the sending side of the transmission link and suffer a delay - Proponents of packet switching have always argued that circuit switching is wasteful because the dedicated circuits are idle during silent periods. Proponents of packet switching also enjoy pointing out that establishing end-to-end circuits and reserving end-to-end transmission capacity is complicated and requires complex signaling software to coordinate the operation of the switches along the end-to-end path. (es numerico) - packet switching is more efficient, when a user generates data at a constant rate of 100 kbps, and periods of inactivity, when a user generates no data. Suppose further that a user is active only 10 percent of the time. With circuit switching, 100 kbps must be reserved for each user at all times. For example, with circuit-switched TDM, if a one-second frame is divided into 10 time slots of 100 ms each, then each user would be allocated one time slot per frame. Thus, the circuit-switched link can support only 10 (=1 Mbps/100 kbps) simultaneous users. With packet switching, the probability that a specific user is active is 0.1 (that is, 10 percent). If there are 35 users, the probability that there are 11 or more simultaneously active users is approximately 0.0004. (esempi pag 57) Circuit switching pre-allocates use of the transmission link regardless of demand, with allocated but unneeded link time going unused. Packet switching on the other hand allocates link use on demand. Link transmission capacity will be shared on a packet-by-packet basis only among those users who have packets that need to be transmitted over the link. - - - - - - **Delay, Loss, and Throughput in Packet-Switched Networks** **Ritardo di nodo** **d**(node) = **de + da + dt + dp + dr** - - - - - **-** *A tasso medio arrivo dei pacchetti* intensità del traffico = L\*A / R =1 → ritardo consistente \>1 → il lavoro da fare è maggiore di quello sostenuto **Ritardi e percorsi internet:** - **Perdita di pacchetti** - **Throughput** - - - **Livelli di protocollo** - Computer networks necessarily constrain throughput (the amount of data per second that can be transferred) between end systems, introduce delays between end systems, and can actually lose packets. [1.4 Overview of Delay in Packet-Switched Networks] As a packet travels from one node (host or router) to the subsequent node (host or router) along this path, the packet suffers from several types of delays at each node along the path The most important of these delays are the nodal processing delay, queuing delay, transmission delay, and propagation delay; together, these delays accumulate to give a total nodal delay. - - - - - - **the total nodal delay is given by dnodal=dproc+dqueue+dtrans+dprop** - - - Typically, the arrival process to a queue is random; that is, the arrivals do not follow any pattern and the packets are spaced apart by random amounts of time. - - - - - *In the trace above there are nine routers between the source and the destination. Most of these routers have a name, and all of them have addresses. For example, the name of Router 3 is **border4-rt-gi1-3.gw.umass.edu** and its address is **128.119.2.194**. Looking at the data provided for this same router, we see that in the first of the three trials the round-trip delay between the source and the router was **1.03 msec**. The round-trip delays for the subsequent two trials were 0.48 and 0.45 msec. These round-trip delays include all of the delays just discussed, including transmission delays, propagation delays, router processing delays, and queuing delays. Because the queuing delay is varying with time, the round-trip delay of packet n sent to a router n can sometimes be longer than the round-trip delay of packet n+1 sent to router n+1. Indeed, we observe this phenomenon in the above example: the delays to Router 6 are larger than the delays to Router 7!* - - *es: Clearly, the server cannot pump bits through its link at a rate faster than R bps; and the router cannot forward bits at a rate faster than R bps. If then the bits pumped by the server will "flow" right through the router and arrive at the client at a rate of R bps, giving a throughput of R bps. If, on the other hand, then the router will not be able to forward bits as quickly as it receives them. In this case, bits will only leave the router at rate R , giving an end-to-end throughput of R.* The throughput is min{Rc, Rs }, that is, it is the transmission rate of the **bottleneck link.** Having determined the throughput, we can now approximate the time it takes to transfer a large file of F bits from server to client as F/min{Rs , Rc } *a network with N links between the server and the client, with the transmission rates of the N links being Applying the same analysis as for the two-link network, we find that the throughput for a file transfer from server to client is min{R1,R2,\....RN} which is once again the transmission rate of the bottleneck link along the path between server and client.* *The examples show that throughput depends on the transmission rates of the links over which the data flows. We saw that when there is no other intervening traffic, the throughput can simply be approximated as the minimum transmission rate along the path between source and destination. The 3th example shows that more generally the throughput depends not only on the transmission rates of the links along the path, but also on the intervening traffic.In particular, a link with a high transmission rate may nonetheless be the bottleneck link for a file transfer if many other data flows are also passing through that link.* [1.5 Protocol Layers and Their Service Models] it is apparent that the Internet is an extremely complicated system, but it is organized in a network architecture. - - - - - - - - - - It's up to the application developer to decide if a service is important, and if the service is important, it's up to the application developer to build that functionality into the application. ![](media/image22.png) - [NETWORK UNDER ATTACK] The field of network security is about how the bad guys can attack computer networks and about how we can defend networks against those attacks, or better yet, design new architectures that are immune to such attacks in the first place - - - - - - - - - - - - - - - - - - **1972-1980: Internetworking e reti proprietarie** - - - - - - - - - - - *definiscono l'attuale architettura di Internet* **1980-1990: nuovi protocolli, proliferazione delle reti** - - - - - - - - - - - - - - - - - - - **2008:** - - - - - **2012:** - - - - - - - - - **2. APPLICATION LAYER** **Principles of Network Applications** **Network Application Architectures** The application architecture (different from the network architecture), is designed by the application developer and dictates how the application is structured over the various end systems. In choosing the application architecture, an application developer will likely draw on one of the two predominant architectural paradigms used in modern network applications: the client-server architecture or the peer-to-peer (P2P) architecture. - - - - Client - - - - - - - - - - ![](media/image12.png) **Processes Communicating** Processes on two different end systems communicate with each other by exchanging messages across the computer network. A sending process creates and sends messages into the network; a receiving process receives these messages and possibly responds by sending messages back - - A socket is the interface between the application layer and the transport layer within a host. It is also referred to as the Application Programming Interface (API) between the application and the network, since the socket is the programming interface with which network applications are built. The application developer has control of everything on the application-layer side of the socket but has little control of the transport-layer side of the socket. The only control that the application developer has on the transport-layer side is: 1. 2. - - - - - - - - - - TCP also includes a congestion-control mechanism, a service for the general welfare of the Internet rather than for the direct benefit of the communicating processes. The TCP congestion-control mechanism throttles a sending process (client or server) when the network is congested between sender and receiver. - ![](media/image47.png) For non-real-time applications, lower delay is always preferable to higher delay, but no tight constraint is placed on the end-to-end delays. - - - - - TCP also includes a congestion-control mechanism, a service for the general welfare of the Internet rather than for the direct benefit of the communicating processes. The TCP congestion-control mechanism throttles a sending process (client or server) when the network is congested between sender and receiver. - - - - - - - - - - - - - - Persistent connections, the server leaves the TCP connection open after sending a - - - - - - - - Codici di stato della risposta HTTP: - 1. 2. 3. 4. They are controversial because they can also be considered as an invasion of privacy. As we just saw, using a combination of cookies and user-supplied account information, a Web site can learn a lot about a user and potentially sell this information to a third party. - 1. 2. 3. 4. Note that a cache is both a server and a client at the same time. When it receives requests from and sends responses to a browser, it is a server. When it sends requests to and receives responses from an origin server, it is a client. Typically a Web cache is purchased and installed by an ISP. (uni) Web caching has seen deployment in the Internet for two reasons: 1. 2. Web caches can substantially reduce Web traffic in the Internet as a whole, thereby improving performance for all applications. ![](media/image57.png) 100 Thus, this second solution provides an even lower response time than the first solution, and it doesn't require the institution to upgrade its link to the Internet. The institution does, of course, have to purchase and install a Web cache. But this cost is low---many caches use public-domain software that runs on inexpensive PCs. - - - **HTTP 2.0** - - - - - - - ![](media/image13.png) - - - - - - - - - - - - - - - - - - - - - - - - - ![](media/image51.png) - - - - - - - - - - - - - - - - - - - **FTP (file transport protocol)**![](media/image85.png) - una connessione per trasmettere i messaggi - connessione TCP porta 20 condizione logica separata tra dati e programmi (contrario di http) comandi del client http: **Electronic Mail in the Internet** three major components: - - - ![](media/image54.png) A typical message starts its journey in the sender's user agent, travels to the sender's mail server, and travels to the recipient's mail server, where it is deposited in the recipient's mailbox. Each recipient, has a mailbox located in one of the mail servers.(where he can access and read the mail) If Alice's server cannot deliver mail to Bob's server, Alice's server holds the message in a message queue and attempts to transfer the message later. **SMTP** is the principal application-layer protocol for Internet electronic mail, it uses the reliable data transfer service of TCP to transfer mail from the sender's mail server to the recipient's mail server. it has two sides: (both run on every mail server) - - characteristic: - - - 1. 2. 3. 4. 5. 6. **Comparison with HTTP** Let's now briefly compare SMTP with HTTP. Both protocols are used to transfer files from one host to another: HTTP transfers files (also called objects) from a Web server to a Web client (typically a browser); SMTP transfers files (that is, e-mail messages) from one mail server to another mail server. - - **Mail Message Formats** Peripheral information is contained in a series of header lines, which are defined in RFC 5322. RFC 5322 specifies the exact format for mail header lines as well as their semantic interpretations. the header lines examined in this section are part of the mail message itself. **Mail Access Protocols** At some point along the path the e-mail message needs to be deposited in Bob's mail server. This could be done simply by having Alice's user agent send the message directly to Bob's mail server. And this could be done with SMTP---indeed, SMTP has been designed for pushing e-mail from one host to another. ![](media/image20.png) SMTP is used to transfer mail from the sender's mail server to the recipient's mail server; SMTP is also used to transfer mail from the sender's user agent to the sender's mail server. A mail access protocol, such as **POP3**(Post Office Protocol), **IMAP**((POP3), Internet Mail Access Protocol) or **HTTP** is used to transfer mail from the recipient's mail server to the recipient's user agent. **POP3** - - 1. 2. 3. - **IMAP** - - - - - - - **SMTP e Transport Layer Security (TLS)** - - - **STARTTLS (passa in modalità criptata** - - - **Web-Based E-Mail** With this service, the user agent is an ordinary Web browser, and the user communicates with its remote mailbox via HTTP. **2.4 DNS---The Internet's Directory Service** One identifier for a host is its hostname. Hostnames---such as www.facebook.com, www.google.com hostnames can consist of variable-length alphanumeric characters, hosts are also identified by so-called IP addresses. (An IP address consists of four bytes and has a rigid hierarchical structure. An IP address looks like 121.7.106.83 , where each period separates one of the bytes expressed in decimal notation from 0 to 255.- specific information about where the host is located in the Internet) **Services Provided by DNS** the main task of the Internet's domain name system (DNS) is a directory service that translates hostnames to IP addresses. - - DNS is commonly employed by other application-layer protocols---including HTTP and SMTP to translate user-supplied hostnames to IP addresses. The desired IP address is often cached in a "nearby" DNS server, which helps to reduce DNS network traffic as well as the average DNS delay. important services: - - - **Overview of How DNS Works** A simple design for DNS would have one DNS server that contains all the mappings. In this centralized design, clients simply direct all queries to the single DNS server, and the DNS server responds directly to the querying clients. Although the simplicity of this design is attractive, it is inappropriate for today's Internet, with its vast (and growing) number of hosts. The problems with a centralized design include: - - - - In summary, a centralized database in a single DNS server simply doesn't scale. **A Distributed, Hierarchical Database** the mappings are distributed across the DNS servers. To a first approximation, there are three classes of DNS server - - - - - - - **Server DNS locale** - - - - ![](media/image42.png) **DNS Caching** Una volta che un server DNS impara la mappatura, la mette nella cache - - I meccanismi di aggiornamento/notifica sono progettati da IETF - **E se i DNS radice falliscono?** - - - **DNS Records and Messages** The DNS servers that together implement the DNS distributed database store resource records (RRs), including RRs that provide hostname-to-IP address mappings. Each DNS reply message carries one or more resource records. A resource record is a four-tuple that contains the following fields: (Name, Value, Type, TTL) TTL is the time to live of the resource record; it determines when a resource should be removed from a cache. es:(relay1.bar.foo.com, 145.37.93.126, A) es:(foo.com,dns.foo.com, NS) → that knows how to obtain the IP addresses for hosts in the domain. ![](media/image8.png) This record can provide querying hosts the canonical name for a hostname. es:(foo.com, relay1.bar.foo.com, CNAME) es:(foo.com, mail.bar.foo.com, MX) To obtain the canonical name for the mail server, a DNS client would query for an MX record; to obtain the canonical name for the other server, the DNS client would query for the CNAME record. **MESSAGGI DNS** ![](media/image5.png) **Inserting Records into the DNS Database** Esempio: abbiamo appena avviato la nuova società "Network Utopia" - - - **se un utente accede al link:** Es. un utente in Australia vuol vedere www.networkutopia.com 1. 2. 3. 4. 5. 6. 7. **Peer-to-Peer File Distribution** In P2P architecture, there is minimal (or no) reliance on always-on infrastructure servers. Instead, pairs of intermittently connected hosts, called peers, communicate directly with each other. The peers are not owned by a service provider, but are instead desktops and laptops controlled by users. **Scalability of P2P Architectures** To compare client-server architectures with peer-to-peer architectures, and illustrate the inherent self-scalability of P2P es: the server and the peers are connected to the Internet with access links. - - - - - The distribution time is the time it takes to get a copy of the file to all N peers. **client-server** assume: of their upload and download access bandwidth can be fully devoted to distributing this file (all of the bottlenecks are in access networks. - Internet core has abundant bandwidth) - - This provides a lower bound on the minimum distribution time for the client-server architecture. - **the P2P architecture** - - - 1. 2. 3. **BitTorrent:** all peers participating in the distribution of a particular file is called a torrent. ![](media/image30.png) - - - - - - - - - - Con un'elevata frequenza di upload, è possibile trovare i partner migliori e ottenere il file più velocemente es: Alice diventa uno dei quattro fornitori preferiti di Bob → Bob ricambia - - **QUERY FLOODING** - - - - - - - - ![](media/image17.png) **COPERTURA GERARCHICA** **ESEMPIO SISTEMA IBRIDO - SKYPE** ![](media/image75.png) **CLOUD COMPUTING** Il cloud computing prevede uno o più server reali, generalmente organizzati in un'architettura ad alta affidabilità e fisicamente collocati presso il data center del fornitore del servizio - - - - Criticità: - - - -