an overview of tcp (transmission control protocol)

26

Upload: ammad-marwat

Post on 16-Jul-2015

94 views

Category:

Education


5 download

TRANSCRIPT

Page 1: An overview of TCP (Transmission Control Protocol)
Page 2: An overview of TCP (Transmission Control Protocol)

2

Page 3: An overview of TCP (Transmission Control Protocol)

What is TCP

TCP Uses

TCP Connection Creation

Flow Control

Error Control

Congestion Control

Sliding Windows Protocol

Purpose of sliding windows protocol

QUESTIONS

Sequence

3

Page 4: An overview of TCP (Transmission Control Protocol)

What is TCP ?

4

TCP (Transmission Control Protocol ) is a transport layer Process to Process Data delivery protocol . Its main characteristics are:

Connection oriented

Reliable

Full Duplex

Bytes steams

Page 5: An overview of TCP (Transmission Control Protocol)

Connection oriented

5

Connection oriented means:

A connection is established before any data is transferred

If the connection can’t be established, the user program is notified

If an established connection is interrupted, the user program is notified

Page 6: An overview of TCP (Transmission Control Protocol)

Reliable

6

Reliable means:

Each and every transmission of Data is Acknowledged by Receiver

If the acknowledgement is not received with in specified time, data is retransmitted

Page 7: An overview of TCP (Transmission Control Protocol)

Byte Streams

7

Byte Stream means:

Connection is treated as stream of Bytes

The user application does not need to package data in individual Datagrams

Page 8: An overview of TCP (Transmission Control Protocol)

Uses of TCP

8

TCP is used for those services where error free and reliable Data transmission is required. For example following well known services use TCS as transport layer Protocol.

Service / Protocol Port Number Used

Description

HTTP 80 Hyper text transfer protocol

SMTP 25 Simple mail transfer protocol

FTP 21 File transfer protocol

SSH 22 Secure shell

TELNET 23 Terminal Network

Page 9: An overview of TCP (Transmission Control Protocol)

TCP Connection Creation

9

3 Way Hand Shake : Before any Data transfer TCP establishes a connection using 3 Way Hand Shake mechanism

Page 10: An overview of TCP (Transmission Control Protocol)

3 Way Hand Shake

10

Page 11: An overview of TCP (Transmission Control Protocol)

3 Way Hand Shake

Client : I want to establish a connection and I will transfer Data with initial sequence number 8000 (Syn Packet)

Server : OK. I received your syn, My intial sequence number will be 15000 and expect your Data Starting with Byte number 8001 (Syn + Ack Packet)

Client : Got it. You start your data transfer starting with Byte number 15001 (Ack Packet)

11

Page 12: An overview of TCP (Transmission Control Protocol)

Data Transfer

12

Page 13: An overview of TCP (Transmission Control Protocol)

Half Close Connection

13

Page 14: An overview of TCP (Transmission Control Protocol)

Half Close Connection

14

Page 15: An overview of TCP (Transmission Control Protocol)

Flow Control

TCP uses flow control to balance the rate at which sender sends Data and receiver receives it.

Messagesare pushed

1

Segements are pushed

2

Messagesare pulled

3

Flow control feedback

4

Flow controlfeedback5

15

Page 16: An overview of TCP (Transmission Control Protocol)

Flow Control : How it works

Receiver advertises spare room (available buffer size) by including value of rwind (receive window) in segments.

Sender limits Data transfer size to rwind avoiding the receiver to overflow

16

Page 17: An overview of TCP (Transmission Control Protocol)

Error Control

TCP is a reliable Transport layer protocol . It sends Data end to end without error, in order, and without any part lost or duplicated

Error Control in TCP is achieved through the use of three tools :

1. Checksum2. Acknowledgement

3. Time out

17

Page 18: An overview of TCP (Transmission Control Protocol)

Congestion Control

TCP uses a congestion window and a congestion policy that avoid congestion and detect and alleviate congestion after it has occurred.

18

Page 19: An overview of TCP (Transmission Control Protocol)

Congestion Control

In Slow Start algorithm, the size of Congestion window (cwnd) exponentially increases until it reaches a threshold.

cwnd

1

cwnd

2

RTT

cwnd

4

RTT

cwnd

8

RTT

19

Page 20: An overview of TCP (Transmission Control Protocol)

Congestion Control

In the congestion avoidance algorithm the size of the congestion window increases additively until congestion is detected.

20

Page 21: An overview of TCP (Transmission Control Protocol)

Sliding Window Protocol

Sliding window is lesser of receiver (rwnd) and congestion (cwnd) windows The source does not have to send a full window’s worth of data

21

Page 22: An overview of TCP (Transmission Control Protocol)

Sliding Window Protocol

(cwnd, rwnd)

22

Page 23: An overview of TCP (Transmission Control Protocol)

Purpose Of Sliding Window Protocol

Sliding window is used :

To make the transmission more efficient

To prevent the receiver from overwhelming with data

To prevent the network from Congestion and loss free transmission

23

Page 24: An overview of TCP (Transmission Control Protocol)

RFC 1122 enhancements in RFC 793

24

Page 25: An overview of TCP (Transmission Control Protocol)

Van Jacobson algorithms

25

Page 26: An overview of TCP (Transmission Control Protocol)

THANK YOU

26