Transport Layer - PowerPoint PPT Presentation

About This Presentation
Title:

Transport Layer

Description:

UDP datagrams have a header that follows the hardware and IP headers. Hardware IP UDP Application Data. UDP header is very simple: ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 33
Provided by: wan5
Learn more at: http://www.cs.ucf.edu
Category:
Tags: layer | transport

less

Transcript and Presenter's Notes

Title: Transport Layer


1
Transport Layer
  • Rong Wang
  • CGS3285
  • Spring2004

2
TCP RELIABLE TRANSPORT SERVICES
  • Internet Protocol (IP) provides unreliable
    datagram service'' between hosts
  • Transport protocols provide end-to-end delivery
    between endpoints of a connection e.g.,
    processes or programs
  • User Datagram Protocol (UDP) provides datagram
    service
  • Transmission Control Protocol (TCP) provides
    reliable data delivery

3
USER DATAGRAM PROTOCOL
  • UDP delivers independent messages, called
    datagrams between applications or processes on
    host computers
  • Best effort'' delivery - datagrams may be lost,
    delivered out of order, etc.
  • Checksum (optionally) guarantees integrity of
    data
  • For generality, endpoints of UDP are called
    protocol ports or ports
  • Each UDP data transmission identifies the
    internet address and port number of the
    destination and the source of the message
  • Destination port and source port may be different

4
UDP HEADERS
  • UDP datagrams have a header that follows the
    hardware and IP headers
  • Hardware IP UDP Application Data
  • UDP header is very simple
  • Port numbers
  • Message length
  • Checksum
  • UDP source port UDP destination port UDP message
    length UDP checksum Data

Hardware IP UDP Application Data
UDP Source Port UDP Destination Port
UDP Message Length UDP Checksum
Data Data
5
TCP
  • Transmission Control Protocol (TCP) is most
    widely used transport protocol
  • Provides reliable data delivery by using IP
    unreliable datagram delivery
  • Compensates for loss, delay, duplication and
    similar problems in Internet components
  • Reliable delivery is high-level, familiar model
    for construction of applications

6
FEATURES OF TCP
  • Connection oriented Application requests
    connection to destination and then uses
    connection to deliver data to transfer data
  • Point-to-point A TCP connection has two
    endpoints
  • Reliability TCP guarantees data will be
    delivered without loss, duplication or
    transmission errors
  • Full duplex The endpoints of a TCP connection
    can exchange data in both directions
    simultaneously
  • Stream interface Application delivers data to
    TCP as a continuous stream, with no record
    boundaries TCP makes no guarantees that data
    will be received in same blocks as transmitted
  • Reliable connection startup Three-way handshake
    guarantees reliable, synchronized startup between
    endpoints
  • Graceful connection shutdown TCP guarantees
    delivery of all data after endpoint shutdown by
    application

7
STREAM DELIVERY
8
USING IP FOR DATA DELIVERY
  • TCP uses IP for data delivery (like UDP)
  • Endpoints are identified by ports (like UDP)
  • Allows multiple connections on each host
  • Ports may be associated with an application or a
    process
  • IP treats TCP like data and does not interpret
    any contents of the TCP message

9
SENDING AND RECEIVING BUFFERS
10
TCP SEGMENTS
11
Note
The bytes of data being transferred in each
connection are numbered by TCP. The numbering
starts with a randomly generated number.
12
Note
The value of the sequence number field in a
segment defines the number of the first data byte
contained in that segment.
13
Note
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.
14
TCP SEGMENT FORMAT
15
CONTROL FIELD
16
DESCRIPTION OF FLAGS IN THE CONTROL FIELD
Flag Description
URG The value of the urgent pointer field is valid.
ACK The value of the acknowledgment field is valid.
PSH Push the data.
RST The connection must be reset.
SYN Synchronize sequence numbers during connection.
FIN Terminate the connection.
17
THREE-STEP CONNECTION ESTABLISHMENT
18
FOUR-STEP CONNECTION TERMINATION
19
States for TCP
State Description
CLOSED There is no connection.
LISTEN The server is waiting for calls from the client.
SYN-SENT A connection request is sent waiting for acknowledgment.
SYN-RCVD A connection request is received.
ESTABLISHED Connection is established.
FIN-WAIT-1 The application has requested the closing of the connection.
FIN-WAIT-2 The other side has accepted the closing of the connection.
TIME-WAIT Waiting for retransmitted segments to die.
CLOSE-WAIT The server is waiting for the application to close.
LAST-ACK The server is waiting for the last acknowledgment.
20
STATE TRANSITION DIAGRAM
21
Note
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. TCPs sliding windows are
byte-oriented.
22
SENDER BUFFER
23
RECEIVER WINDOW
24
SENDER BUFFER AND SENDER WINDOW
25
SLIDING THE SENDER WINDOW
26
EXPANDING THE SENDER WINDOW
27
SHRINKING THE SENDER WINDOW
28
Note
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.
29
Note
Some points about TCPs sliding windows
The source does not have to send a full windows
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.
30
LOST SEGMENT
31
LOST ACKNOWLEDGEMENT
32
TCP TIMERS
Write a Comment
User Comments (0)
About PowerShow.com