Transport Layer: Introduction: Transport Layer Services, Connectionless and Connection oriented Protocols, Transport Layer Protocols: Simple protocol, Stop and wait protocol, Go-Back-N Protocol, Selective repeat protocol. Transport-Layer Protocols in the Internet: User Datagram Protocol: User Datagram, UDP Services, UDP Applications, Transmission Control Protocol: TCP Services, TCP Features, Segment, Connection, State Transition diagram, Windows in TCP, Flow control, Error control, TCP congestion control.
Transport Layer All modules and procedures pertaining to transportation of data or data stream are categorized into this layer. As all other layers, this layer communicates with its peer Transport layer of the remote host. Transport layer offers peer-to-peer and end-to-end connection between two processes on remote hosts. Transport layer takes data from upper layer (i.e. Application layer) and then breaks it into smaller size segments, numbers each byte, and hands over to lower layer (Network Layer) for delivery.
Functions This Layer is the first one which breaks the information data, supplied by Application layer in to smaller units called segments. It numbers every byte in the segment and maintains their accounting. This layer ensures that data must be received in the same sequence in which it was sent. This layer provides end-to-end delivery of data between hosts which may or may not belong to the same subnet. All server processes intend to communicate over the network are equipped with well-known Transport Service Access Points (TSAPs) also known as port numbers .
The two main Transport layer protocols are: Transmission Control Protocol It provides reliable communication between two hosts. User Datagram Protocol It provides unreliable communication between two hosts.
Services
Reliable delivery
Simple Protocol- Connectionless protocol with neither flow nor error control. FSMs
Stop-and-Wait Protocol- uses both flow and error control In the Stop-and-Wait protocol, the acknowledgment number always announces, in modulo-2 arithmetic, the sequence number of the next packet expected.
FSM
Go-Back-N Protocol (GBN)
FSM
Selective-Repeat Protocol
FSM- Sf (send window, the first outstanding packet), Sn (send window, the next packet to be sent), and Ssize (send window, size).
User Datagram Protocol Connectionless, unreliable transport protocol. It does not add anything to the services of IP except for providing process-to-process communication instead of host-to-host communication. UDP packets, called user datagrams, have a fixed-size header of 8 bytes made of four fields, each of 2 bytes (16 bits).
UDP Services Process-to-Process Communication Connectionless Services Flow Control Error Control Checksum Congestion Control Encapsulation and Decapsulation Queuing Multiplexing and Demultiplexing
Typical Applications ❑ UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control. It is not usually used for a process such as FTP that needs to send bulk data ❑ UDP is suitable for a process with internal flow- and error-control mechanisms. For example, the Trivial File Transfer Protocol (TFTP) process includes flow and error control. It can easily use UDP. ❑ UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in the UDP software but not in the TCP software. ❑ UDP is used for management processes such as SNMP ❑ UDP is used for some route updating protocols such as Routing Information Protocol (RIP) ❑ UDP is normally used for interactive real-time applications that cannot tolerate uneven delay between sections of a received message
TRANSMISSION CONTROL PROTOCOL Connection-oriented, reliable protocol. TCP explicitly defines connection establishment, data transfer, and connection teardown phases to provide a connection-oriented service. TCP uses a combination of GBN and SR protocols to provide reliability. TCP Services Process-to-Process Communication Delivery Services Full-Duplex Communication. Multiplexing and Demultiplexing Connection-Oriented Service Reliable Service
Multiplexing and Demultiplexing services are provided in almost every protocol architecture ever designed. UDP and TCP perform the demultiplexing and multiplexing jobs by including two special fields in the segment headers: the source port number field and the destination port number field. Multiplexing – Gathering data from multiple application processes of the sender, enveloping that data with a header, and sending them as a whole to the intended receiver is called multiplexing. Demultiplexing – Delivering received segments at the receiver side to the correct app layer processes is called demultiplexing.
TCP Segment Format
Control Field
A TCP Connection
State Transition Diagram
Windows in TCP Send window in TCP Receive window in TCP