Presentation is loading. Please wait.

Presentation is loading. Please wait.

NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are still here.

Similar presentations


Presentation on theme: "NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are still here."— Presentation transcript:

1 NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are still here

2 NUS.SoC.CS2105 Ooi Wei Tsang TCP Transmission Control Protocol

3 NUS.SOC.CS2105 Ooi Wei Tsang Application Transport (process-to-process) Network (unreliable, host-to-host)

4 NUS.SOC.CS2105 Ooi Wei Tsang

5 NUS.SOC.CS2105 Ooi Wei Tsang src port checksum dest port

6 NUS.SOC.CS2105 Ooi Wei Tsang sequence number acknowledgement number

7 NUS.SOC.CS2105 Ooi Wei Tsang 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 NUS.SOC.CS2105 Ooi Wei Tsang GBNSR ACKCumulativeSelective Out-of- OrderThrowBuffer RetransmitAll unACK1 unACK TimerOneMany

10 NUS.SOC.CS2105 Ooi Wei Tsang

11 NUS.SOC.CS2105 Ooi Wei Tsang

12 NUS.SOC.CS2105 Ooi Wei Tsang

13 NUS.SOC.CS2105 Ooi Wei Tsang

14 NUS.SOC.CS2105 Ooi Wei Tsang call from above

15 NUS.SOC.CS2105 Ooi Wei Tsang recv ACK y

16 NUS.SOC.CS2105 Ooi Wei Tsang 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 NUS.SOC.CS2105 Ooi Wei Tsang receiver window

19 NUS.SOC.CS2105 Ooi Wei Tsang 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 NUS.SOC.CS2105 Ooi Wei Tsang

22 NUS.SOC.CS2105 Ooi Wei Tsang

23 NUS.SOC.CS2105 Ooi Wei Tsang

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 SYN+ACK, A replies with ACK+data (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.


Download ppt "NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are still here."

Similar presentations


Ads by Google