an overview of tcp (transmission control protocol)
TRANSCRIPT
2
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
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
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
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
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
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
TCP Connection Creation
9
3 Way Hand Shake : Before any Data transfer TCP establishes a connection using 3 Way Hand Shake mechanism
3 Way Hand Shake
10
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
Data Transfer
12
Half Close Connection
13
Half Close Connection
14
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
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
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
Congestion Control
TCP uses a congestion window and a congestion policy that avoid congestion and detect and alleviate congestion after it has occurred.
18
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
Congestion Control
In the congestion avoidance algorithm the size of the congestion window increases additively until congestion is detected.
20
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
Sliding Window Protocol
(cwnd, rwnd)
22
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
RFC 1122 enhancements in RFC 793
24
Van Jacobson algorithms
25
THANK YOU
26