Part v transport layer
This presentation is the property of its rightful owner.
Sponsored Links
1 / 36

PART V. Transport Layer PowerPoint PPT Presentation


  • 59 Views
  • Uploaded on
  • Presentation posted in: General

PART V. Transport Layer. Position of transport layer. Transport layer duties. Packetizing: Dividing large messages and adding a header Connection control: Connection-oriented or connectionless delivery Addressing Providing reliability: Flow control and error control

Download Presentation

PART V. Transport Layer

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Part v transport layer

PART V.Transport Layer

Computer Networks


Position of transport layer

Position of transport layer

Computer Networks


Transport layer duties

Transport layer duties

  • Packetizing: Dividing large messages and adding a header

  • Connection control: Connection-oriented or connectionless delivery

  • Addressing

  • Providing reliability: Flow control and error control

  • Congestion control and QoS

Computer Networks


Chapter 22 process to process delivery udp and tcp

Chapter 22. Process-to-Process DeliveryUDP and TCP

22.1 Process-to-Process Delivery

22.2 UDP

22.3 TCP

Computer Networks


Types of data deliveries

Types of data deliveries

  • The transport layer is responsible for process-to-process delivery.

  • Process (application program ??)

Computer Networks


Client server paradigm

Client-Server Paradigm

  • Address required for delivery

  • Transport layer address: port number

  • Most common process-to-process communication is the client-server paradigm

  • Operating systems support multiuser and multiprogramming environments.

  • Local host, local process, remote host, remote process must be defined

Addressing

Computer Networks


Port numbers

Port numbers

  • 16 bits between 0 and 65553: ephemeral port number

  • IANA (Internet Assigned Number Authority) range: well-known ports, registered ports, dynamic ports

Computer Networks


Ip addresses versus port numbers

IP addresses versus port numbers

Computer Networks


Socket address

Socket address

  • Process-to-process delivery needs two identifiers, IP address and the port number

  • Socket address is the combination of an IP address and a port number

  • A transport-layer protocol needs a pair of socket addresses; the client and server socket address

Computer Networks


Multiplexing and demultiplexing

Multiplexing and demultiplexing

  • Multiplexing required because of several processes with only one transport-layer protocol

Computer Networks


Connection establishment

Connection establishment

  • In the case of connection-oriented service

Computer Networks


Connection termination

Connection termination

  • In the case of connection-oriented service

Computer Networks


Part v transport layer

UDP

  • UDP is a connectionless, unreliable protocol that has no flow and error control. It uses port numbers to multiplex data from the application layer.

  • UDP is a convenient transport-layer protocol for applications that provide flow and error control. It is also used by multimedia applications.

  • The calculation of checksum and its inclusion in the user datagram are optional

Computer Networks


Well known ports used by udp

Well-known ports used by UDP

Computer Networks


Error control

Error control

  • Error control at the data link layer does not guarantee error control at the transport layer.

  • UDP: connectionless and unreliable

  • TCP: connection-oriented and reliable

Computer Networks


Part v transport layer

TCP

  • Transmission Control Protocol

  • Stream connection-oriented and reliable transport protocol

  • It adds connection-oriented and reliability features to the services of IP

  • Like UDP, TCP uses port numbers as transport-layer addresses

  • Unlike UDP, TCP is a stream-oriented protocol

Computer Networks


Well known ports used by tcp

Well-known ports used by TCP

Computer Networks


Sending and receiving buffers

Sending and receiving buffers

  • Buffering handles the disparity between the speed of the producing and consuming processes

  • One example: to use a circular array of 1-byte locations

Computer Networks


Tcp segments

TCP segments

  • IP layer needs to send data in packets not as a stream of byte

Computer Networks


Sequence number

Sequence number

  • The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number.

  • The value of the sequence number field in a segment defines the number of the first data byte contained in that segment.

  • The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative

  • Example: Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes?

  • Solution:

    Segment 1==> sequence number: 10,010 (range: 10,010 to 11,009)

    Segment 2 ==> sequence number: 11,010 (range: 11,010 to 12,009)

    Segment 3==> sequence number: 12,010 (range: 12,010 to 13,009)

Computer Networks


Tcp segment format

TCP segment format

Computer Networks


Tcp control field

TCP control field

Computer Networks


Three step connection establishment

Three-step connection establishment

Computer Networks


Four step connection termination

Four-step connection termination

Computer Networks


States for tcp

States for TCP

Computer Networks


State transition diagram

State transition diagram

  • TCP software is implemented as a finite state machine

Computer Networks


Sliding windows protocol

Sliding windows protocol

  • A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data. TCP’s sliding windows are byte-oriented.

  • In TCP, the sender window size is totally controlled by the receiver window value (the number of empty locations in the receiver buffer). However, the actual window size can be smaller if there is congestion in the network.

  • The source does not have to send a full window’s worth of data.

  • The size of the window can be increased or decreased by the destination.

  • The destination can send an acknowledgment at any time.

Computer Networks


Sender buffer and receive window

Sender buffer

Receive window

Sender buffer and receive window

Computer Networks


Sender buffer and sender window

Sender buffer and sender window

Sliding the sender window

Computer Networks


Sliding the sender window

Sliding the sender window

Computer Networks


Expanding the sender window

Expanding the sender window

Shrinking the sender window

Computer Networks


Silly window syndrome

Silly window syndrome

  • When either the sending application creates data slowly or the receiving application consumes data slowly, or both in the sliding window operation

  • Syndrome created by the sender:

    • Nagle’s algorithm: accumulate data in the output buffer (simplicity)

  • Syndrome created by the receiver

    • Clark’s solution: announce a window size of zero

    • Delayed acknowledgement

Error control

  • TCP uses three tools: checksum, acknowledgement, and time-out

  • TCP is no negative acknowledgement in TCP

  • Lost or corrupted segment, out-of-order segment, lost ACK

Computer Networks


Lost segment

Lost segment

Computer Networks


Lost acknowledgment

Lost acknowledgment

Computer Networks


Tcp timers

TCP timers

  • To perform its operation smoothly, TCP uses four timers

  • Retransmission timer

    • Retransmission time = 2 X RTT (round-trip time)

    • RTT = ALPHA(previous RTT) + (1-ALPHA)(current RTT), usually 90%

    • Karn’s algorithm: when retransmission occurs, RTT ? no update RTT

  • Persistence timer: To correct the deadlock, for instance, zero window-size announcement case with ACK loss. The sending TCP sends a special segment called a probe

Computer Networks


Pushing data and urgent data

Pushing Data and Urgent Data

  • The application program on the sending site can request a push operation. This means that the sending TCP should not wait for the window to be filled and must create a segment and send it immediately

  • The sending TCP can also set the push bit (PSH) to tell the receiving TCP that it must be delivered to the receiving application ASAP.

  • The sending application wants a piece of data to be read out of order by the receiving application by sending urgent bytes

  • If URG bit is set, the receiving TCP extracts the urgent data from the segment, using the value of the urgent pointer, and delivers it, out of order, to the receiving application

Computer Networks


  • Login