Salta al contenuto
Note per Studenti Internet Structure, Packet Switching and the TCP-IP Stack Report

Internet Structure, Packet Switching and the TCP-IP Stack

In questa pagina 3

Module A of the laboratory starts from the structure of the Internet and builds the tools needed to measure and program a network. This note only frames the topics and says where each one is developed, so nothing is repeated here.

Where each topic lives

Program topic Note
Overview of the Internet: ISPs, autonomous systems (AS) History and Structure of the InternetThe Internet grew from ARPANET (1969), a packet-switched network; TCP/IP (1972-77) moved error control from the network nodes to the end hosts, which is what makes it scalable; today it is a network of networks made of local, regional and national ISPs that exchange traffic by peering at IXPs, with IANA, IETF, IRTF, IAB and ISOC coordinating addresses and standards.History and Structure of the Internet →
Packet switching (and the circuit-switching alternative) Circuit Switching and Packet SwitchingA switching node can connect input to output in three ways. Circuit switching sets up a dedicated physical connection first (telephone network), delivery time T = 3N t_p + N t_s + M/R. Datagram packet switching splits the message into K packets with a header, each routed independently with store-and-forward, T = N t_p + (N+K-1)(M/K+H)/R, with optimal K = sqrt((N-1)M/H). Virtual circuit has three phases (setup, data, teardown): a dedicated logical connection without dedicated resources, with a local identifier that changes at each hop.Circuit Switching and Packet Switching →
TCP/IP stack and the ISO-OSI reference model ISO-OSI Model and TCP-IP StackCommunication between two computers is too varied a problem (signals, errors, medium access, routing, flow control, data representation) for a single protocol, so it is divided into layers. The ISO/OSI model has 7 layers (physical, data link, network, transport, session, presentation, application); the TCP/IP stack merges the top three into one application layer, so it has 5. Each layer offers a service to the one above and talks only to its peer layer through PDUs; going down a header (PCI) is added: encapsulation. Addresses: MAC (link, local), IP (network, global), port (transport).ISO-OSI Model and TCP-IP Stack →
Transport protocols used by the laboratory exercises TCP - Connection, Reliability and Flow ControlTCP is the connection-oriented, reliable transport protocol that turns IP's unreliable service into an ordered byte stream without errors or duplicates; the connection opens with a three-way handshake (SYN, SYN+ACK, ACK) and closes with FIN segments, bytes are numbered (sequence number = first byte of the segment, cumulative ACK = next byte expected), the sender may transmit min(rwnd, cwnd) unacknowledged bytes (rwnd, the receiver window in a 16-bit field, is flow control), errors are handled with checksum, ACKs, retransmission timeout and fast retransmit after three duplicate ACKs, and to fill the pipe the window must reach the bandwidth-delay product, with maximum throughput MSS times Wmax over RTT.TCP - Connection, Reliability and Flow Control →, UDP - User Datagram ProtocolUDP is the connectionless, unreliable transport protocol that adds to IP only process-to-process communication through ports and an optional checksum; its header is 8 bytes (source port, destination port, length, checksum), the checksum covers a pseudo-header (IP addresses, protocol 17, length), the UDP header and the data as a one's complement sum (0 means not computed and a computed 0 is sent as 0xFFFF), and UDP has no connection setup, sequence numbers, flow, error or congestion control, which makes it suitable for short messages (DNS, DHCP, RIP, SNMP) and real-time applications.UDP - User Datagram Protocol →
Application layer on the Web HTTP and the WebThe application layer is the top of the stack and only uses transport services; the Web is a distributed client-server hypertext service whose pages have URLs of the form protocol://host:port/path; HTTP runs over TCP (server port 80), is stateless and uses text messages (request or status line, headers, blank line, body) with methods GET, POST, HEAD, PUT, DELETE and status codes 2xx to 5xx; a page with N embedded objects needs 2(N+1) RTT with non-persistent connections and N+2 RTT with a persistent connection (transmission times neglected), cookies give HTTP a memory through Set-Cookie and Cookie headers, and a proxy (web cache) keeps copies of recent responses to cut load, traffic and delay.HTTP and the Web →
Link technologies (wired, wireless, LAN, WAN) Data Transmission Technologies - Wired, Wireless, LAN and WANSurvey of the data transmission technologies used to connect measurement and IoT nodes, from local ones (RFID, NFC, Bluetooth, WiFi, ZigBee) to wide-area ones (LoRa, SigFox, GSM/GPRS, UMTS, LTE, LTE-M, NB-IoT, 5G), with frequencies, ranges and bit rates.Data Transmission Technologies - Wired, Wireless, LAN and WAN →
Key Performance Indicators (KPI) Network Key Performance IndicatorsA network is a stack of layers; the packet of one layer is the payload of the layer below, with efficiency eta =
Network tools: ping and traceroute ICMP, Ping and TracerouteICMP adds to IP the error reporting and queries it lacks; its messages travel inside IP datagrams with Protocol 1 and are either errors (destination unreachable type 3, time exceeded 11, redirect 5, parameter problem 12), always sent to the original source with the original IP header plus 8 bytes of data, or queries (echo request 8 and reply 0, timestamp 13 and 14); ICMP only reports and never corrects errors, and it supports ping (RTT), path MTU discovery with the D bit (maximum payload 1500-20-8=1472 bytes) and traceroute (TTL increasing, n+1 probes for n routers), but also attacks such as smurf and fake redirects.ICMP, Ping and Traceroute →
Network tools: wireshark, configuration and troubleshooting Static Routing and Diagnostic Tools in KatharàLab 2 builds by hand the routing tables of two LANs (195.11.14.0/24 and 200.1.1.0/24) joined by routers r1 and r2 over 100.0.0.8/30: an active interface adds only its directly connected network, hosts use a default route, routers need static routes in both directions, and ping, route -n, tcpdump and traceroute diagnose the result (ttl=62 after two routers).Static Routing and Diagnostic Tools in Katharà →
Client-server programming practice Client-Server ProgrammingIn a network application the program writes the application-layer messages while TCP or UDP, IP and the drivers live in the kernel; the boundary is the socket API, which is the service access point of the transport layer (address = IP address plus port); the client-server model works like a function call (the client asks and waits, the server is always listening) and is contrasted with peer-to-peer and publish-subscribe.Client-Server Programming → and Socket ProgrammingA socket is a communication endpoint identified like a file descriptor; a TCP server runs socket, setsockopt, bind, listen, accept, read/write, close, while the client runs socket, connect, read/write, close.Socket Programming →
Internet of Things, MQTT Internet of Things, Publish-Subscribe and MQTTThe Internet of Things connects constrained embedded devices (microcontrollers with kilobytes of RAM, IETF classes 0, 1 and 2) organised in edge, fog, core and cloud levels; the publish/subscribe model, used by MQTT, lets a broker forward events from publishers to subscribers, which are decoupled in space, time and synchronisation, and topics are selected with the wildcards plus (one level) and hash (all remaining levels).Internet of Things, Publish-Subscribe and MQTT →, Internet of Things and Application ScenariosThe Internet of Things joins ubiquitous computing (objects that sense, decide and act) with Internet connectivity (objects that transmit, use cloud computing and network information); an IoT system has nodes, a network and a back-end, and is applied in smart city, home, mobility, health, industry, farming and grid scenarios.Internet of Things and Application Scenarios →
ReST ReST Web ServicesA web service lets programs call a service over a network with standard messages carried by HTTP; data are written in XML (nested tags, attributes, namespaces, XSD validation) or JSON (RFC 8259: objects, arrays, strings, numbers, true, false, null; more compact); SOAP is an XML message protocol (Envelope, optional Header, Body, Fault) sent with an HTTP POST and described by WSDL; REST is an architectural style in which the service exposes resources identified by URIs and manipulated with HTTP methods (GET reads, POST creates, PUT replaces, PATCH modifies, DELETE removes) with meaningful status codes (200, 201 with Location, 204, 400, 404, 409), stateless, cacheable, with a uniform interface.ReST Web Services →

The layered view in one paragraph

The network is organised as a stack of layers. Each layer offers a service to the layer above through an interface, hides how the service is implemented, and talks to its peer layer on another host with a protocol. A packet at layer nn becomes the payload of layer n−1n-1: header and payload are added at each level on the sending side and removed on the receiving side. The quantitative consequences of this layering (overhead, efficiency, throughput at each level) are worked out in Network Key Performance IndicatorsA network is a stack of layers; the packet of one layer is the payload of the layer below, with efficiency eta = |SDU|/|PDU|; the key indicators are bit-rate R0 >= throughput S >= goodput, nodal delay d = d_proc + d_queue + d_trans + d_prop with d_trans = L/R and d_prop = x/c, jitter (delay variability), the bandwidth-delay product BDP = S times RTT, and reliability (packet error rate PER = 1 - (1 - eps)^L on a binary symmetric channel, loss rate and delivery ratio), measurable with ping.Network Key Performance Indicators →.

What the program lists but the sources do not describe

The program names iperf among the tools for configuration and troubleshooting. No certified source of the site describes it, so it is not described here: only ping, traceroute and wireshark have notes (see the table).

Versione ripasso