170 likes | 323 Views
Sem 1v2 Chapter 12 The Transport Layer. The purpose of this target indicator is to start to justify the need for layer 4. Layer 1 allows bit streams to be created and to travel; Layer 2 packages those data packets into frames to be converted to bit streams and makes LAN delivery possible;
E N D
The purpose of this target indicator is to start to justify the need for layer 4. Layer 1 allows bit streams to be created and to travel; Layer 2 packages those data packets into frames to be converted to bit streams and makes LAN delivery possible; Layer 3 packages data from upper layers in packets and makes routing and WAN delivery possible. But we have made no provision for assuring our data reliable travels end-to-end across the often vast network path. Layer 4 performs multiple functions to provide this "quality of service."
Flow control and reliability of the transport layer can be compared to a student who studies only one year of a foreign language, then visits the country that uses that language. Whenever the student tries to join a conversation, she has to ask everyone, frequently, to repeat their words (reliability), and to speak slowly (flow control).
Two particularly important Layer 4 protocols -- Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are introduced and briefly described.
TCP supplies a virtual circuit between end-user applications. • connection-oriented • reliable • divides outgoing messages into segments • reassembles messages at the destination station • re-sends anything not received • reassembles messages from incoming segments. • Following are the characteristics of UDP: • connectionless • unreliable • transmit messages • provides no software checking for segment delivery (unreliable)
The curriculum explicitly refers to, TCP/IP. So in many students minds they are correctly related. But they are not the same -- most obviously TCP is a layer 4 protocol and IP is a layer 3 protocol. Less obvious is the TCP is connection-oriented and ensures reliability and IP is connection-less with best effort attempts at delivery.
12.2.1.1. Describe the general form of TCP.Transmission Control Protocol (TCP) is a connection-oriented Layer 4 (transport layer) protocol that provides reliable full-duplex data transmission. TCP is part of the TCP/IP protocol stack.
Field definitions in the TCP segment: • source port - number of the calling port • destination port - number of the called port • sequence number - number used to ensure correct sequencing of the arriving data • acknowledgment number - next expected TCP octet • HLEN - number of 32-bit words in the header • reserved - set to zero • code bits - control functions (such as setup and termination of a session) • window - number of octets that the sender is willing to accept • checksum - calculated checksum of the header and data fields • urgent pointer - indicates the end of the urgent data • option-one option - maximum TCP segment size • data - upper-layer protocol data
User Datagram Protocol (UDP) is the connectionless transport protocol in the TCP/IP protocol stack. UDP is a simple protocol that exchanges datagrams, without acknowledgments or guaranteed delivery, requiring that error processing and retransmission be handled by other protocols.
UDP uses no windowing or acknowledgments, therefore application-layer protocols provide reliability. UDP is designed for applications that do not need to put sequences of segments together. • Protocols that use UDP include: • TFTP • SNMP • DHCP • DNS (Domain Name System)
Both TCP and UDP use port (or socket) numbers to pass information to the upper layers. Port numbers are used to keep track of different conversations that cross the network at the same time. Application software developers have agreed to use the well-known port numbers that are defined in RFC1700. The range of numbers are below 255 for TCP and UDP appilcations.
Conversations, that do not involve applications with well-known port numbers, are assigned port numbers that have been randomly selected from within a specific range. These port numbers are used as source and destination addresses in the TCP segment.
Originating source port numbers are dynamically assigned by the source host. Usually, it is a number larger than 1023.
A three-way handshake/open connection sequence synchronizes a connection at both ends before the transferred data reaches the ends. The exchange of introductory sequence numbers, during the connection sequence, ensures that any data that is lost, due to problems that may occur later, can be recovered.
Window size determines the amount of data that can be transmitted at one time before receiving an acknowledgement. After a host transmits the window-sized number of bytes, it must receive an acknowledgement before it can send any more messages.
Window size refers to the number of messages that can be transmitted before receiving an acknowledgment. The larger the window size number (bytes), the greater amount of data that can be transmitted.TCP uses expectational acknowledgments, meaning that the acknowledgment number refers to the octet that is next expected. The "sliding" part, of sliding window, refers to the fact that the window size is negotiated dynamically during the TCP session.
The End Since the segments are encapsulated in packets, and since packets travel connectionless paths through internetworks, sequence and acknowledgement numbers become necessary for TCP to track since two successive IP packets may in many instance NOT travel the same path and arrive at the destination host out of order.