Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of the Western Cape Chapter 12: The Transport Layer.

Similar presentations


Presentation on theme: "University of the Western Cape Chapter 12: The Transport Layer."— Presentation transcript:

1 University of the Western Cape Chapter 12: The Transport Layer

2 University of the Western Cape Purpose of the transport layer The phrase "quality of service" is often used to describe the purpose of Layer 4 - the transport layer. The transport layer regulates information flow to ensure end-to- end connectivity between host applications reliably and accurately The end-to-end control, provided by sliding windows, and reliability in sequencing numbers and acknowledgments are primary duties of Layer 4. Transport layer segments and reassembles data into a data stream. TCP is one of the transport layer protocols used with IP. Transport Layer PDU is segment.

3 University of the Western Cape Transport Layer Protocols The TCP/IP protocol of the OSI model Layer 4 (transport layer) has two protocols - TCP and UDP: TCP (Transmission Control Protocol) supplies a virtual circuit between end- user applications. These are its characteristics: connection-oriented reliable divides outgoing messages into segments reassembles messages at the destination station re-sends anything not received reassembles messages from incoming segments. UDP (User Datagram Protocol) transports data unreliably between hosts. Following are the characteristics of UDP: connectionless unreliable transmit messages (called user datagrams) provides no software checking for message delivery (unreliable) does not reassemble incoming messages uses no acknowledgments provides no flow control

4 University of the Western Cape Comparing TCP and IP TCP/IP is a combination of two individual protocols: TCP and IP IP is a Layer 3 protocol - a connectionless service that provides best-effort delivery across a network. TCP is a Layer 4 protocol - a connection-oriented service that provides flow control as well as reliability. Pairing the protocols enables them to provide a wider range of services. Together, they represent the entire suite. TCP/IP is the Layer 3 and Layer 4 protocol on which the Internet is based.

5 University of the Western Cape TCP and UDP Segments Format Following are the definitions of the fields 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 TCP UDP

6 University of the Western Cape TCP/IP Protocols

7 University of the Western Cape Port Numbers 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. Port numbers have the following assigned ranges: Numbers below 255 - for public applications Numbers from 255-1023 - assigned to companies for marketable applications Numbers above 1023 - are unregulated

8 University of the Western Cape Connection-oriented Session Connection oriented services involve three phases: 1. In the connection establishment phase, a single path between the source and destination is determined. Resources are typically reserved at this time to ensure a consistent grade of service. 2. During the data transfer phase, data is transmitted sequentially over the established path, arriving at the destination in the order in which it was sent. 3. The connection termination phase consists of terminating the connection between the source and destination when it is no longer needed.

9 University of the Western Cape TCP establishes a connection In order for data transfer to begin, one user of the transport layer must establish a connection-oriented session with its peer system. Protocol software modules in the two operating systems communicate by sending messages across the network to verify that the transfer is authorized and that both sides are ready. After all synchronization has occurred, a connection is established, and data transfer begins. Three way-handshake The first handshake requests synchronization. The second and third handshakes acknowledge the initial synchronization request, and synchronize the connection parameters in the opposite direction. The final handshake segment sends an acknowledgement to the destination that both sides agree that a connection has been established. As soon as the connection has been established, data transfer begins.

10 University of the Western Cape TCP sends data with flow control While data transfer is in progress, congestion can occur for two different reasons. First, a high-speed computer might generate traffic faster than a network can transfer it. Second, if many computers send datagrams simultaneously to a single destination, that destination can experience congestion. When datagrams arrive too quickly for a host or gateway to process, they are temporarily stored in memory. If the traffic continues, the host or gateway eventually exhausts its memory and discards any additional datagrams that arrive. Instead of allowing data to be lost, the transport function can issue a "not ready" indicator to the sender. This indicator acts like a stop sign and signals the sender to stop sending data. When the receiver is able to accept additional data, it sends a "ready" transport indicator, which is like a go signal. When the sending device receives this indicator, it resumes segment transmission.

11 University of the Western Cape TCP achieves reliability with windowing Reliable connection- oriented data transfer means that data packets arrive in the same order in which they are sent The number of data packets a sender is allowed to transmit without having received an acknowledgment is known as a window.

12 University of the Western Cape TCP acknowledgment technique Reliable delivery guarantees that a stream of data that is sent from one device will be delivered through a data link to another device without duplication or data loss. Positive acknowledgment with retransmission is one process that guarantees reliable delivery of data streams.It requires a recipient to send an acknowledgment message to the sender whenever it receives data. The sender keeps a record of each data packet that it sends and then waits for the acknowledgment before sending the next data packet. The sender also starts a timer whenever it sends a segment, and retransmits the segment if the timer expires before the acknowledgment arrives.

13 University of the Western Cape The End


Download ppt "University of the Western Cape Chapter 12: The Transport Layer."

Similar presentations


Ads by Google