Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture #19: Transport Protocols. Elements and Examples l OSI Transport Layer l Transport Service Primitives l Addressing l Connection Control l Transport.

Similar presentations


Presentation on theme: "1 Lecture #19: Transport Protocols. Elements and Examples l OSI Transport Layer l Transport Service Primitives l Addressing l Connection Control l Transport."— Presentation transcript:

1

2 1 Lecture #19: Transport Protocols. Elements and Examples l OSI Transport Layer l Transport Service Primitives l Addressing l Connection Control l Transport Layer in Internet l TCP Addressing l TCP protocol l UDP

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

4 3 Services of the Transport Layer l 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 establishmenttransport-connection establishment data transferdata transfer transport-connection releasetransport-connection release l Transport service provider and transport service user.

5 4 6/6 l Transport services are provided by the access primitives l Access primitives provide interface to user applications and sessions l Example set of transport service’s access primitives l 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. 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. l State-transition diagram of the transport layer connection process: –event driven control; events: local execution of a transport primitive or incoming packet Transport Service Primitives 6/3 6/4 6/5

6 5 l Transport protocols implement transport layer functionality l Example protocol hierarchy (TCP/IP model) l 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). Transport Protocol Elements 19/1 6/7

7 6Addressing l 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 port i ) where NSAP (Network Layer SAP) is presented by IP address (or another adequate addressing - AAL…) where NSAP (Network Layer SAP) is presented by IP address (or another adequate addressing - AAL…) l TSAP are multiple for any transport entity while NSAP are either one or few in a machine/router l 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

8 7Addressing l Constant TSAP address services l 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

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

10 9 Connection Establishment 6/11a l Three-way handshaking –Normal operation: control parameters:control parameters: –sequential number of initiator - x –sequential number of the party - y CR - connection request from initiating hostCR - connection request from initiating host ACK - connection accepted fromACK - connection accepted from Data transferData 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/11c 6/11b

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

12 11 Transport Layer in Internet Connection-oriented and connectionless oriented protocols in InternetConnection-oriented and connectionless oriented protocols in Internet TCP (Transport Control Protocol) features:TCP (Transport Control Protocol) features: connection oriented protocol supporting end-to-end full- duplex byte stream over network links with losses and errorsconnection 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 requestsupper interface to user processes or OS kernel requests lower interface to IPlower interface to IP brakes user/OS data into IP datagrams of kB or restore the IP datagrams into upper level byte streambrakes user/OS data into IP datagrams of kB or restore the IP datagrams into upper level byte stream controls the timeout periods, retransmission events, sequencing, etc, over the unreliable IP transfercontrols the timeout periods, retransmission events, sequencing, etc, over the unreliable IP transfer 19/1

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

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

15 14 TCP protocol Segment Header (cont.)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 wordsTCP 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)reserved field of 6b (not used in TCP versions up to now) 6 flags field; the value 1 of the flags means respectively: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 itselfURG: 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 ignoredACK: 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)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 attemptRST: Reset connection. Used in cases of host failure or refusal of connection opening attempt 6/24

16 15 TCP protocol Segment Header - Flags’ field (cont.)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.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.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.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)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)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/25 6/24

17 16 TCP protocol Segment Header (cont.)Segment Header (cont.) Urgent pointer. 16b - Used in compination with URG flag.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.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. 6/24

18 17 TCP uses 3-way handshaking for connection establishment:TCP uses 3-way handshaking for connection establishment: the server host (host2) waits for incoming having issued LISTEN or ACCEPT primitivethe 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=0the 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 portthe 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 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 closedsimultaneous 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:Finite state-machine of a TCP connection: set of statesset of states set of transitions (the transitions are invoced by event/action pair)set of transitions (the transitions are invoced by event/action pair) 6/27 TCP connection management 6/26 6/28

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

20 19 Miscellaneous Transport protocols l 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. Feature Name TCPUDPSCTP Connection oriented YesNoYes Reliable transport YesNoYes Preserve message boundary NoYesYes Ordered delivery YesNoYes Unordered delivery NoYesYes Data checksum YesYesYes Checksum size (bits) Path MTU YesNoYes Congestion control YesNoYes Multiple streams NoNoYes Multi-homing support NoNoYes BundlingNoNoYes

21 20 l 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 Real time transport protocol can also be used in conjunction with RSVP protocol which enhances the field of multimedia applications. l Resource ReSerVation Protocol (RSVP), described in RFC 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. Miscellaneous Transport protocols (2)

22 21 19/1

23 22 6/1

24 23 6/3 6/4

25 24 6/5

26 25 6/6

27 26 6/7

28 27 6/8

29 28 6/9

30 29 6/11

31 30 6/12

32 31 6/13

33 32 6/24

34 33 6/25

35 34 6/26

36 35 6/27

37 36 6/28

38 37 6/34


Download ppt "1 Lecture #19: Transport Protocols. Elements and Examples l OSI Transport Layer l Transport Service Primitives l Addressing l Connection Control l Transport."

Similar presentations


Ads by Google