NUS.SOC.CS2105 - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

NUS.SOC.CS2105

Description:

TCP is a full-duplex, connection-oriented, reliable protocol. TCP grabs data from a send buffer (containing data from applications), add TCP ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 21
Provided by: WeiTsa6
Category:
Tags: nus | soc | cs2105 | duplex | grabs

less

Transcript and Presenter's Notes

Title: NUS.SOC.CS2105


1
Application
Transport
you are still here
Network
Link
Physical
2
TCP
  • Transmission Control Protocol

3
Application
Transport (process-to-process)
Network (unreliable, host-to-host)
4
(No Transcript)
5
src port
dest port
checksum
6
sequence number
acknowledgement number
7
Data to Send
Data Received
8
TCP
  • TCP is a full-duplex, connection-oriented,
    reliable protocol. TCP grabs data from a send
    buffer (containing data from applications), add
    TCP header, and pass to network layer for
    transmission. TCP can grab MSS bytes (maximum
    segment size) at one time.
  • TCP header is 20 bytes (maybe longer if includes
    option header). Each segment contains a 32-bit
    sequence number and acknowledgement number.
    Sequence number is the byte number of the first
    byte in the segment Acknowledgement number is
    the byte number of the first byte expected.

9
GBN SR
ACK Cumulative Selective
Out-of-Order Throw Buffer
Retransmit All unACK 1 unACK
Timer One Many
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
  • call from above

15
  • recv ACK y

16
  • timeout

17
Reliability in TCP
  • TCP uses a mixed of techniques from GBN and SR.
  • Cumulative ACK since ACK number tells sender
    which byte the receiver is expecting.
  • Only one timer for oldest unacknowledged
    segment.
  • Receiver buffers out-of-order segments.
  • Retransmit only one packet when timeout occur.
  • TCP retransmit if it receives duplicate ACKs, but
    only after 3 of them is received (fast retransmit)

18
receiver window
19
Receiver Buffer
Sender
20
Flow Control in TCP
  • To avoid buffer overflow at receiver, the
    receiver limits the number of bytes the sender
    can send through a receiver window (rcvwin),
    which is the size of the spare room in the
    receiver buffer.
  • The sender ensures that the amount of outstanding
    bytes (sent but not acknowledged) is less than
    rcvwin.

21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
TCP Connection Management
  • Other fields of interest in TCP header are bits
    to indicate type of packets (SYN, FIN, ACK, RST
    etc).
  • To establish connection, TCP uses a 3-way
    handshake A send SYN to B, B replies with
    SYNACK, A replies with ACKdata (optional).
  • To tear down connection, A sends FIN to B, B
    sends ACK back. B sends FIN to A, A sends ACK
    back to B.
Write a Comment
User Comments (0)
About PowerShow.com