1 / 37

Lecture #19: Transport Protocols. Elements and Examples

Lecture #19: Transport Protocols. Elements and Examples. C o n t e n t s. OSI Transport Layer Transport Service Primitives Addressing Connection Control Transport Layer in Internet TCP Addressing TCP protocol UDP. 2. 4. 6. 9. 11. 12. 13. 18. OSI Transport Layer.

clea
Télécharger la présentation

Lecture #19: Transport Protocols. Elements and Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture #19: Transport Protocols. Elements and Examples C o n t e n t s • OSI Transport Layer • Transport Service Primitives • Addressing • Connection Control • Transport Layer in Internet • TCP Addressing • TCP protocol • UDP 2 4 6 9 11 12 13 18

  2. OSI Transport Layer User application 1 ... Application layer Encryption/ decryption compression/ expansion Choice of syntax Presentation layer Session control Session synch. Session to transport mapping Session management Session layer Layer and flow control Error recovery Multiplexing Transport layer Connection control Routing Addressing Network layer Data link establishment Error control Flow control Framing Synch Link layer 6/1 Access to transm. media Physical and electrical interface Activation/ deactivation of con. Physical layer Functions within the transport layer may include: • mapping transport-address onto network-address; • multiplexing (end-to-end) transport-connections onto network-connections; • establishment and release of transport-connections; • end-to-end sequence control on individual connections; • end-to-end error detection and any necessary monitoring of the quality of service; etc.

  3. Services of the Transport Layer • Services to the session (or application) layer: • unique identification of each session entity by its transport address. The transport-service provides the means to establish, maintain and release transport-connections (case the service is connection-oriented) • duplex transmission between a pair of transport addresses (one or more transport connection can be established between the same pair of transport addresses) • provides endpoint identifiers that distinguish the transport connection endpoints • the quality of service provided on a transport connection depends on the service class requested by the session entities (the selected quality of service is maintained throughout the lifetime of the transport connection) • the following services are provided by the transport layer: • transport-connection establishment • data transfer • transport-connection release • Transport service provider and transport service user.

  4. Transport Service Primitives • Transport services are provided by the access primitives • Access primitives provide interface to user applications and sessions • Example set of transport service’s access primitives • Transport Protocol Data Unit (TPDU) - standard data entity exchanged between transport peers.TPDU payload is packed with header in Network Layer packet. NL packet is cut into Data Link Layer frames with frame’s headers • UNIX implementation of transport service primitives: as any other interface in UNIX the network transport layer data has file presentation established by SOCKET and assigned by BIND. Unblocking LISTEN allocates buffer for remote requests. • State-transition diagram of the transport layer connection process: • event driven control; events: local execution of a transport primitive or incoming packet 6/3 6/4 6/6 6/5

  5. Transport Protocol Elements • Transport protocols implement transport layer functionality • Example protocol hierarchy (TCP/IP model) • Transport protocol environment: • host-to-host communication over the subnet (instead the Network layer communication between subnet components - routers, over data link) • source/destination addressing (instead addressing by selection of router’s outgoing line by the Network Layer • possibility to store (and delay) packets in the subnet by datagram model --> special transport protocols for real-time and interactive communications • dynamic allocation of connection’s buffers as the number of connections is not predefined (in contrast to the Network Layer where the number of input/output lines is fixed and static allocation of the buffer space is applicable). 19/1 6/7

  6. Addressing • Addressing is based on TSAP (Transport Service Access Point) that corresponds to some port of a local process. TSAP is defined by pairs (IP address, local porti) where NSAP (Network Layer SAP) is presented by IP address (or another adequate addressing - AAL…) • TSAP are multiple for any transport entity while NSAP are either one or few in a machine/router • Connection phases: • server OS assigns a TSAP to an active server process upon its request • application process on a remote machine requests connection to server’s TSAP via its local TSAP • transport entities use the network link to process the communication request either as connection oriented service (session) or as connectionless data delivery 6/8

  7. Addressing • Constant TSAP address services • Dynamic TSAP assignment to the service processes • Initial connection protocol by process server • process server acts as a proxy between a set of server processes and remote client processes • the requested server is split out from the process server set and communicates autonomously to the client during the session 6/9

  8. Classes of the transport protocol Protocol class Network type Functions 0 A Minimal functions 1 B Network error recovery 2 A Connection bonding 3 B Network error recovery, connection bonding 4 C Error detection and recovery, connection bonding

  9. Connection Establishment • Three-way handshaking • Normal operation: • control parameters: • sequential number of initiator - x • sequential number of the party - y • CR - connection request from initiating host • ACK - connection accepted from • Data transfer • delayed duplicate request TPDU - the delayed request is rejected by the initiator • delayed duplicate request and delayed duplicate acknowledge: the initiator rejects the delayed request acknowledge as in previous case; the party rejects the delayed duplicate data-acknowledge because of imparity of its sequential number (z instead y) 6/11a 6/11b 6/11c

  10. Connection Release • Asymmetric release: connection release initiative of any of the parties: • simple and quick • possible lost of data • Symmetric release • treats the connection as two independent unidirectional connections and release each of them separately • no data losses • synchronization problem (two-army problem) 6/12 6/13

  11. Transport Layer in Internet • Connection-oriented and connectionless oriented protocols in Internet • TCP (Transport Control Protocol) features: • connection oriented protocol supporting end-to-end full-duplex byte stream over network links with losses and errors • upper interface to user processes or OS kernel requests • lower interface to IP • brakes user/OS data into IP datagrams of 1500-64kB or restore the IP datagrams into upper level byte stream • controls the timeout periods, retransmission events, sequencing, etc, over the unreliable IP transfer 19/1

  12. TCP addressing • Addressing based on sockets: • a socket unifies NSAP end TSAP • the socket number consists of: • IP address (NSAP) - 4 bytes • local port (TSAP) - 16b (up to 64k ports addressing space) • a socket pair uniquely identifies a transport connection: (socket1, socket2) • several connections may ended in a common socket • socket calls from the OS: • port address space: • 0 - 255 - well-known ports: 7 - Echo; 13 - Daytime; 21 - FTP File Transfer; 23 - Telnet; 49 - Login Host Protocol; 79 - Finger; 80 - World Wide Web HTTP; 110 - Post Office Protocol - Version 3 (POP3) 6/6

  13. TCP protocol • 32-bit numbering (0 - 4G) of the byte sequence • TPDUs: segments • Segmentation according the network properties (user data stream can be split into smaller segments or collected in larger ones). • Segment structure: • header (20B) • header options • data (optional, up to 64k) • Segment header: • 5 * 32-bit words • Source/Destination port - 16b - local end points of the connection • Sequence Number/Acknowledgement Number - 32b (4G ) - the byte numbers in the stream (last received and next expected) 6/24

  14. TCP protocol • Segment Header (cont.) • TCP header length - (4b) - the header length in 32b words - up to 16 words of which 5 are standard header and up to 11 are optional header words • reserved field of 6b (not used in TCP versions up to now) • 6 flags field; the value 1 of the flags means respectively: • URG: Urgent pointer in use. Urgent pointer is a facility that points the urgent data field. Urgent data contains interrupt messages that are interpret by the upper levels but not by TCP itself • ACK: Valid Acknowledgement number. If ACK=0 the contents of the Acknowledgement number field is ignored • PSH: Pushed data indicator. “Pushed data” is data that has to be delivered to the application layer without buffering (i.e. without delay) • RST: Reset connection. Used in cases of host failure or refusal of connection opening attempt 6/24

  15. TCP protocol • Segment Header - Flags’ field (cont.) • SYN: Establish connection. Connection request/replay indicator. SYN=1 and ACK=0 means connection request (no piggybacked acknowledgement) and SYN=1 and ACK=1 means connection replay (acceptance) with a acknowledgement piggybacked in the same segment. SYN segments are ordered by the sequence numbers in order to prevent delayed duplications. • FIN: Release connection request. The sender has finished the data transmission. FIN segments also are ordered by the sequence numbers in order to prevent delayed duplications. • Window size. 16b - Indicates the free buffer space of the receiver after the last received byte (which is Acknowledgement number - 1). The maximum buffer buffer indicated is 64kB. 0 buffer space means temporarily to stop data transmission to the receiver. • Checksum. 16b - checksum over header, data and the pseudoheader: (set of segment parameters) • pseudoheader: set of transmission parameters that includes source/destination IP addresses and the segment length (Note that the control over IP addresses is not a functionality of TCP but of IP) 6/24 6/25

  16. TCP protocol 6/24 • Segment Header (cont.) • Urgent pointer. 16b - Used in compination with URG flag. • Header Options. Variable length - optional extension of the header facilities e.g. maximum segment length. The segment length has to be compromised between the transmission effectiveness and the host/application requirements.

  17. TCP connection management • TCP uses 3-way handshaking for connection establishment: • the server host (host2) waits for incoming having issued LISTEN or ACCEPT primitive • the client host (host1) issued CONNECT primitive specifying TSAP by (IP addr., port) couple; the flags SYN=1, ACK=0 • the server host acknowledges the connection if there is active server process listening the specified port • simultaneous attempts to open connection lead to failure because of different sequence numbering (6/26b) • simultaneous attempts to close connection are not in a collision; FIN segments are acknowledged (or timed-out) and the connection is closed • Finite state-machine of a TCP connection: • set of states • set of transitions (the transitions are invoced by event/action pair) 6/26 6/27 6/28

  18. UDP • UDP (User Datagram Protocol)implements connectionless unreliable services of the Transport Layer • The establishment/release of the connection is skipped • UDP segment: • 8B (2x32b words) header • extends IP datagram with • source/destination ports fields • UDP segment length field (data + 8B header) • UDP checksum field over header, pseudoheader and data • UDP is generally the protocol used in transmitting voice and video across a network. In some instant messengers/chat programs too. 6/34

  19. Miscellaneous Transport protocols • Stream Control Transmission Protocol (SCTP) • RFC 4960 defines the protocol, with RFC 3286 providing an introductory text. • Provides reliable, in-sequence transport of message streams with congestion control.

  20. Miscellaneous Transport protocols (2) • Real-time Transport Protocol (RTP) defines a standardized packet format for delivering audio and video over the Internet. It was developed by the Audio-Video Transport Working Group of the IETF and first published in 1996 as RFC 1889 which was made obsolete in 2003 by RFC 3550. Real time transport protocol can also be used in conjunction with RSVP protocol which enhances the field of multimedia applications. • Resource ReSerVation Protocol (RSVP), described in RFC 2205. Designed to reserve resources across a network for an integrated services Internet (QoS)."RSVP does not transport application data but is rather an Internet control protocol, like ICMP, IGMP, or routing protocols.“RSVP provides receiver-initiated setup of resource reservations for multicast or unicast data flows with scaling and robustness.

  21. 19/1

  22. 6/1

  23. 6/3 6/4

  24. 6/5

  25. 6/6

  26. 6/7

  27. 6/8

  28. 6/9

  29. 6/11

  30. 6/12

  31. 6/13

  32. 6/24

  33. 6/25

  34. 6/26

  35. 6/27

  36. 6/28

  37. 6/34

More Related