Verkkomedian perusteet Fundamentals of Media T-110.250 19.2.2002 Antti Ylä-Jääski 19.2.2002 / AYJ lide 1 Goals and topics protocols Discuss how packet-switching networks differ from circuit switching networks. Discuss the basic protocols like network IP protocol and transport protocols TCP and UDP. 19.2.2002 / AYJ lide 2 Topics protocol (IP) IP version 6 Transport protocols (TCP, UDP) 19.2.2002 / AYJ lide 3 Circuit switching networks Traditional telephone networks operate on circuit switching basis (TDM). A call setup procedure reserves resources (time slots) across the network. Connect, communicate, disconnect. The allocated resources cannot be used for other users as long as the call is on. This is suitable for phone calls. Inefficient for computer applications: Information comes on bursts. Amount of information transferred is small. 19.2.2002 / AYJ lide 4 transfer blocks of information called packets. Matched to computer applications. Can also support real-time telephony. Examples of packet networks are (IP) packet networks. Asynchronous Transfer Mode (ATM). tatistical multiplexing -> efficiency. Packet networks can be viewed from two perspectives. External view: What is the service that the network provides for the user how services are provided. Internal view: What is the internal operation of the network physical topology of the network. 19.2.2002 / AYJ lide 5 19.2.2002 / AYJ lide 6
services in general ome service and network viewpoints. Connectionless / connection-oriented. ingle block / sequence of information. Choice of services Quality-of-ervice. service peer-to-peer operation. topology. working via routers. Connectionless (datagram) networks: is not informed in advance about an intent to transfer information. Connection-oriented networks: is informed about a new information flow to be applied. 19.2.2002 / AYJ lide 7 19.2.2002 / AYJ lide 8 t0 The essential function of a network is to transfer information among users. ingle block of information. equence of blocks. t1 can provide a choice of services to the user of the network: Best-effort connectionless service. Low-delay connectionless service. Connection-oriented reliable stream service. Connection-oriented transfer with delay and bandwidth guarantees. t0 t1 19.2.2002 / AYJ lide 9 19.2.2002 / AYJ lide 10 In the next picture: Peer-to-peer transport protocols operate endto-end across a network - protocol stack view. The network service is visible to the transport through the network service interface. All that matters to the user is the interface. It is irrelevant how the the network operates. Messages Transport service Data link egments Data link Data link Messages Transport service Data link 19.2.2002 / AYJ lide 11 19.2.2002 / AYJ lide 12
Packet network topology - MUX Packet network topology - access Node M U X.. 1 2 Bridge 19.2.2002 / AYJ lide 13 19.2.2002 / AYJ lide 14 Possible topologies bus star ring wireless Packet network topology - Campus erver To erver Backbone erver 19.2.2002 / AYJ lide 15 19.2.2002 / AYJ lide 16 Packet networks - working Packet network - working Main trend in telecommunications 1980->. Interconnection of separate communications networks into an internetwork. Local area networks (). Metropolitan area networks (MAN). Wide area networks (WAN). Interconnected via routers. Increasing capacities in local and wide area. = network of networks. MAN WAN MAN 19.2.2002 / AYJ lide 17 19.2.2002 / AYJ lide 18
transfer blocks of information called packets. Packet switching networks are matched to computer applications. Packet network examples: IP and ATM. Also packet networks can provide Qo. Visible service vs internal operation. Packet network topologies. 19.2.2002 / AYJ lide 19 protocols - TCP/IP The (IP) enables communication across networks that are based on different technologies. Any host computer can communicate with any other computer in the. offers ubiquitous connectivity and the economies of scale from large deployment. 19.2.2002 / AYJ lide 20 protocols - TCP/IP offers two basic communication services on top of IP. (TCP). User datagram protocol (UDP). Any application protocol that operates on top of either TCP or UDP automatically operates across the. Therefore the provides a ubiquitous platform for the deployment of network-based services. 19.2.2002 / AYJ lide 21 protocols - TCP/IP. (IP). IP addressing. IP version 6. Transport protocols: TCP and UDP. 19.2.2002 / AYJ lide 22 The model has four s. TCP / UDP network TCP / IP architecture 19.2.2002 / AYJ lide 23 The TCP/IP protocol suite usually refers not only to TCP (Transmission control protocol) and IP ( ). Also related protocols like UDP (User Datagram ), ICMP ( Control Message ). Also the basic applications such as HTTP, Telnet and FTP. 19.2.2002 / AYJ lide 24
Consider a case when HTTP GET command is passed to the TCP. TCP encapsulates message in TCP segment. The segment header contains an ephemeral port number for the client process, and port 80 for the HTTP server process. TCP segment is passed to the IP where it is encapsulated in an TCP packet. IP header has destination network address. 19.2.2002 / AYJ lide 25 Header contains source and destination port numbers (80) Header contains source and destination IP addresses; transport protocol type (6) Header contains source and destination physical addresses; network protocol type IP header Ethernet header TCP header 19.2.2002 / AYJ lide 26 HTTP request Frame check ome applications make use of TCP (FTP, HTTP) and some use UDP (NMP, DN). The protocol data units (PDU) exchanged by the peer protocols are called: TCP segments. UDP datagrams. IP packets. TCP and UDP deliver packets to applications based on the port numbers. 19.2.2002 / AYJ lide 27 Each host in the is identified by a globally unique IP address. IP address is divided into two parts: ID, and Host ID. ID is obtained from an organisation authorized to issue IP addresses. The transfers packets based on IP network addresses using routers. 19.2.2002 / AYJ lide 28 Machine A Transport interface 1 outer / gateway interface 2 Machine B Transport interface provides a single service: Best-effort connectionless packet transfer. IP packets are exchanged between routers without connection setup Packets are routed independently, and Packets may traverse different paths. The gateways interconnecting the intermediate networks may drop packets. ecovery from losses -> transport. 19.2.2002 / AYJ lide 29 19.2.2002 / AYJ lide 30
The model has four s. TCP / UDP network TCP / IP architecture 19.2.2002 / AYJ lide 31 The The (IP) is the heart of TCP/IP protocol suite. IP corresponds to the network in the OI reference model. IP provides a connectionless and besteffort delivery service. Connectionless: no virtual circuit needs to be established before data transfer begins. 19.2.2002 / AYJ lide 32 The The Best-effort indicates, that IP will try its best to forward packets, but does not guarantee delivery to destination. Best-effort also indicates, that IP does not make guarantee of Qo. s requiring high reliability must implement reliability within higher- protocol (TCP). IP packet format. IP header has fixed-length component of 20 bytes (5x32bit), plus a variable-length component of options up to 40 bytes. 19.2.2002 / AYJ lide 33 19.2.2002 / AYJ lide 34 IP version 4 header 0 16 31 Version IHL Type of service IP version 4 header Total length Identification Flags Fragment offset Time to live Header checksum Options ource IP address Destination IP address Padding 19.2.2002 / AYJ lide 35 IP version 4 header Version: IP version number used, e,g,, 4, 6. header length: in 32 bit words (5). Type of service: priority. 3 bits precedence, 4 bits requirements (delay, reliability, ). In practice ignored by most routers. Total length: #bytes include header & data. Identification, flags, fragment offset: fragmentation and reassembly. 19.2.2002 / AYJ lide 36
IP version 4 header Time to live: time in seconds for the packet to remain in the network. Number of hops router decrements by one. : protocol at the destination; TCP=6, UDP=17, ICMP=1. Header checksum: verify header integrity. ource IP address, destination IP address. Options: variable length, special features such as security level, rarely used. Padding: make header 32 words multiple. 19.2.2002 / AYJ lide 37 IP addressing Each computer on the has unique address. IPv4 address has fixed length 32 bits. Two-level hierarchy: ID identifies the network where the host is connected to. Host ID identifies network connection of the host rather than the host. Packets routed based on network ID. 19.2.2002 / AYJ lide 38 IP addressing Host Class A address: 7 bits 24 bits Class B address: 14 bits 16 bits Class C address: 21 bits 8 bits Class D address: multicast Class E address: experimental IP version 6 IPv4 has 32 bits for addresses. The large growth of during 90 s due to WEB. IP addresses will be exhausted. Already early 1990s IETF IPng. IP version 6 IPv6. 19.2.2002 / AYJ lide 39 19.2.2002 / AYJ lide 40 IP version 6 Longer address fields: 32 bits - > 128 bits. impler header format. upport for options: extension header. Flow label capability: support flows, Qo. ecurity: authentication and confidentiality. Large packets: jumbo payload (don t use). Fragmentation at source only: not routers. No checksum field. 19.2.2002 / AYJ lide 41 IP version 6 header 0 16 31 Version Traffic class Flow label Payload length Next header Hop limit ource IP address Destination IP address 19.2.2002 / AYJ lide 42
IP version 6 IPv6 addresses divided three categories: Unicast, Multicast, Anycast. Addresses organised into hierarchies. Extension headers (six defined): hop-by-hop, routing, fragment, authentication, security, destination options. 19.2.2002 / AYJ lide 43 The model has four s. TCP / UDP network TCP / IP architecture 19.2.2002 / AYJ lide 44 User datagram protocol UDP is an unreliable, connectionless transport protocol. It is very simple and provides two additional services on top of IP: Demultiplexing. Error checking on data. UDP determines among applications. UDP checks integrity of the datagram. Using UDP: DN, NMP, TP. User datagram protocol 0 16 31 ource port UDP length Data UDP datagram Destination port UDP checksum 19.2.2002 / AYJ lide 45 19.2.2002 / AYJ lide 46 TCP provides reliable, connectionoriented stream service over IP. TCP implements congestion control. TCP allows flow control that allows the receiver control the sender transmit rate. TCP supports multiple application processes in the same end system. TCP provides data in error-free order. Before data transfer can begin, TCP establishes a connection. TCP may split the original data sequence into any number and size of segments. eceiver recovers original information. TCP deals with 32 bit sequence numbers. eceiver sends ACK segment to inform the sender for receiving a segment. 19.2.2002 / AYJ lide 47 19.2.2002 / AYJ lide 48
When a segment arrives, receiver performs error check. eceiver puts the segment into buffer since segments may come in false order. eceiver sends ACK when all segments up to some level have arrived. There are specific techniques for handling the receiver sliding-windows. Transmitter resends segment if no ACK. 19.2.2002 / AYJ lide 49 Transmitter sets a timer for each segment transmitted. If timer expires before segment is acknowledged, the segment is retransmitted. TCP uses adaptive technique for retransmission timer -> delay varies. TCP continuously estimates round-trip time. 19.2.2002 / AYJ lide 50 0 16 31 ource port Destination port equence number Byte stream Byte stream Acknowledgement number egments Length eserved xxxxx Window size end buffer Transmitter ACK s eceive buffer eceiver Checksum Options Data Urgent pointer Padding 19.2.2002 / AYJ lide 51 TCP segment 19.2.2002 / AYJ lide 52 ummary howed the basics of packet networks. service interface, connectionless/ oriented, topologies, working. protocols.. (IP). IP version 6 (IPv6). Transport protocols UDP and TCP. 19.2.2002 / AYJ lide 53