William Stallings Data and Computer Communications - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

William Stallings Data and Computer Communications

Description:

Provides end-to-end data transfer service. Shields upper layer protocols from details ... Precedence. Normal delay/low delay. Normal throughput/high throughput ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 29
Provided by: adria221
Category:

less

Transcript and Presenter's Notes

Title: William Stallings Data and Computer Communications


1
William StallingsData and Computer Communications
  • Chapter 20
  • Transport Protocols

2
Transport Protocol
  • Provides end-to-end data transfer service
  • Shields upper layer protocols from details
  • Can be connection-oriented (TCP) or
    connectionless (UDP)

3
Textbook Note
  • Disregard generic discussion of transport
    protocols.
  • Instead, focus on TCP and UDP

4
Connection Oriented Transport Protocol Mechanisms
  • Provides for establishment, maintenance,and
    termination of logical connection between
    transport service users
  • Generally reliable, as in case of TCP
  • REMEMBER, TCP active only at sending and
    receiving nodes impacts reliability

5
Issues in a Reliable Transport Protocol
  • Addressing
  • Multiplexing
  • Flow Control
  • Connection establishment and termination

6
Addressing
  • Target user specified by
  • User identification
  • Usually host, port
  • Called a socket in TCP
  • Transport entity identification
  • Either TCP or UDP, based on application
  • Host address
  • If local, an attached network device
  • In an internet, a global internet address
  • Host portion of address passed to network layer,
    which is responsible for routing.
  • Network number

7
Finding Addresses
  • Four methods
  • Know address ahead of time
  • e.g. have previously sent or received something
  • Well known addresses standard protocols
  • DNS domain name server
  • Sending process request to well known address

8
Multiplexing
  • Transport protocol performs multiplexing/demultipl
    exing
  • Multiple users employ the same transport protocol
    and are distinguished by port numbers or service
    access points

9
Flow Control
  • Transport entity needs to take steps to stop or
    slow the flow of segments to prevent buffer
    overflow

10
Coping with Flow Control Requirements
  • Do nothing
  • Segments that overflow are discarded
  • Sending transport entity will fail to get ACK and
    will retransmit
  • Thus further adding to incoming data
  • Refuse further segments
  • Use fixed sliding window protocol
  • Works well on reliable network
  • Failure to receive ACK is taken as flow control
    indication
  • Does not work well on unreliable network
  • Can not distinguish between lost segment and flow
    control
  • Use credit scheme
  • Receiver has greater control over data flow
  • Not necessary with a reliable system (e.g. TCP)
  • Decouples acknowledgement and flow control
  • Segment may be acknowledged without granting new
    credit

11
Why Establish a Connection?
  • Allow each end to assure the other exists
  • Negotiation of optional parameters (max packets
    size, QoS, etc.)
  • Triggers allocation of transport entity resources
    (such as buffer space)
  • Termination is by mutual agreement

12
Termination
  • Either or both sides
  • By mutual agreement
  • Abrupt termination
  • Or graceful termination
  • Close wait state must accept incoming data until
    FIN received

13
Issues to be Addressed
  • Ordered Delivery
  • Retransmission strategy
  • Duplication detection
  • Flow control
  • Connection establishment
  • Connection termination
  • Crash recovery

14
Ordered Delivery
  • In unreliable system, segments may arrive out of
    order
  • Number segments sequentially
  • TCP numbers each octet sequentially
  • Segments are numbered by the first octet number
    in the segment
  • If first segment is 200 octets long, 2nd segment
    is number 201
  • TCP only exchanges packets for connection and
    termination

15
Retransmission Strategy
  • Need to retransmit if
  • Segment damaged in transit
  • Segment fails to arrive
  • Receiver must acknowledge successful receipt
  • Time out waiting for ACK triggers
    re-transmission
  • Need to consider timer value
  • Too small leads to unnecessary re-transmissions
  • Too large and response to lost segments is slow
  • Should be a bit longer than round trip time
  • Adaptive timer retransmission time set at
    average of observed delays
  • Not trusted because
  • May not ACK immediately
  • Can not distinguish between ACK of original
    segment and re-transmitted segment
  • Conditions may change suddenly

16
Duplication Detection
  • If ACK lost, segment is re-transmitted
  • Receiver must recognize duplicates

17
Flow Control
  • If timer expires, send something
  • Could be re-transmission of previous segment

18
TCP Connection Establishment
  • Three way handshake
  • A initiates connection with a SYN and sequence
    number i
  • B accepts and acknowledge with a SYN and sequence
    number j ACK i 1
  • A acknowledges Bs OK to send data and begins
    transmission SYN i 1, ACK j 1
  • NOW, data can be sent

19
Three WayHandshakeExamples
20
Connection Termination
  • Each side must explicitly ACK the FIN of the
    other, using an ACK and sequence number of the
    FIN
  • Graceful Close
  • Send FIN i and receive AACK i
  • Receive FIN j and send ACK j
  • Wait twice maximum expected segment lifetime

21
Failure Recovery
  • If failure during connection, all state info is
    lost
  • Connection is half open
  • Side that did not crash still thinks it is
    connected
  • Problems with lost or duplicate data

22
TCP Services
  • Reliable communication between pairs of processes
  • Functions across variety of reliable and
    unreliable networks and internets (but primarily
    IP, which is unreliable)

23
Items Passed to IP
  • TCP passes some parameters down to IP
  • Precedence
  • Normal delay/low delay
  • Normal throughput/high throughput
  • Normal reliability/high reliability
  • Security

24
UDP
  • Unreliable Network Service
  • Connectionless
  • Relies upon IP to deliver the message
  • Segments may get lost
  • Segments may arrive out of order
  • Reduced overhead

25
UDP Uses
  • Inward data collection active or passive
    sampling of data sources such as sensors
  • Outward data dissemination such as real time
    clock values
  • Request-Response such as multicast message
    requiring single response
  • Real time application such as voice

26
UDP Header
  • Note checksum is optional and applies to the
    header, not the data

27
Required Reading
  • Stallings chapter 20
  • RFCs

28
Chapter 20 Review Questions
  • Compare and contrast TCP with UDP.
  • Discuss the four described addressing methods
  • Discuss the following transport protocol issues
    Ordered Delivery, Retransmission strategy,
    Duplication detection, Flow control, Connection
    establishment, Connection termination, and Crash
    recovery.
  • Discuss the TCP 3-way Handshake
  • Provide examples of TCP applications.
  • Provide examples of UDP applications.
Write a Comment
User Comments (0)
About PowerShow.com