0% found this document useful (0 votes)
25 views16 pages

Set17-Ch 6-Transport Layer

This document summarizes the Transport Layer protocols, focusing on TCP. It introduces TCP, describes the TCP service model, TCP segments and headers, how TCP establishes connections, its transmission policies including flow control and congestion control, and how it manages timers. TCP provides reliable, in-order byte stream delivery between two endpoints and establishes connections using a three-way handshake before transmitting data. It uses sequence numbers, acknowledgments, flow control using sliding windows, and congestion control to reliably transmit data over IP networks.

Uploaded by

osukurralu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views16 pages

Set17-Ch 6-Transport Layer

This document summarizes the Transport Layer protocols, focusing on TCP. It introduces TCP, describes the TCP service model, TCP segments and headers, how TCP establishes connections, its transmission policies including flow control and congestion control, and how it manages timers. TCP provides reliable, in-order byte stream delivery between two endpoints and establishes connections using a three-way handshake before transmitting data. It uses sequence numbers, acknowledgments, flow control using sliding windows, and congestion control to reliably transmit data over IP networks.

Uploaded by

osukurralu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Set 17: Transport Layer

Dr. Anirudh Paranjothi


Oklahoma State University
CS 4283/5383

11/28/23 Computer Networks AP 17-1


The Internet Transport Protocols: TCP

Introduction to TCP

The TCP Service Model

The TCP Protocol

The TCP Segment Header

TCP Connection Establishment

TCP Transmission Policy

TCP Congestion Control

TCP Timer Management

11/28/23 Computer Networks AP 17-2


• Introduction to TCP
• The TCP Service Model
TCP: Overview •

The TCP Protocol
The TCP Segment Header
• TCP Connection Establishment
RFCs: 793, 1122, 1323, 2018, 2581
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management
• point-to-point: • full duplex data:
– one sender, one receiver – bi-directional data flow in same
connection
• reliable, in-order byte steam:
– no “message boundaries” – MSS: maximum segment size

• pipelined: • connection-oriented:
– handshaking (exchange of control
– TCP congestion and flow control set
msgs) init’s sender, receiver state
window size
before data exchange
• send & receive buffers
• flow controlled:
– sender will not overwhelm receiver

application application
writes data reads data
socket socket
door door
TCP TCP
send buffer receive buffer
segment

11/28/23 Computer Networks AP 17-3


The TCP Service Model •

Introduction to TCP
The TCP Service Model
• The TCP Protocol
• The TCP Segment Header
Some assigned ports. • TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management

Port Protocol Use


21 FTP File transfer
23 Telnet Remote login
25 SMTP E-mail
69 TFTP Trivial File Transfer Protocol
79 Finger Lookup info about a user
80 HTTP World Wide Web
110 POP-3 Remote e-mail access
119 NNTP USENET news

11/28/23 Computer Networks AP 17-4


The TCP Service Model (2)

(a) Four 512-byte segments sent as separate IP datagrams.


(b) The 2048 bytes of data delivered to the application in a single READ CALL.

11/28/23 Computer Networks AP 17-5


TCP Header

11/28/23 Computer Networks AP 17-6


• Introduction to TCP

TCP Connection Establishment


• The TCP Service Model
• The TCP Protocol
• The TCP Segment Header
• TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management

6-31

(a) TCP connection establishment in the normal case.


(b) Call collision.

11/28/23 Computer Networks AP 17-7


• Introduction to TCP
• The TCP Service Model
TCP Transmission Policy •

The TCP Protocol
The TCP Segment Header
• TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management

Flow Control
Simulation

Window management in TCP.


11/28/23 Computer Networks AP 17-8
TCP seq. #’s and ACKs

Seq. #’s:
– byte stream “number” of first Host A Host B
byte in segment’s data
ACKs: User Seq=4
2, ACK
– seq # of next byte expected types =79, d
ata = ‘C’
from other side ‘C’
– cumulative ACK host ACKs
Q: how receiver handles out-of-order receipt of
C ’ ‘C’, echoes
segments
, data = ‘
3
CK=4 back ‘C’
– A: TCP spec doesn’t say, -
eq=79, A
up to implementor S

host ACKs
receipt Seq=4
of echoed 3, ACK
=80
‘C’

time
simple telnet scenario

11/28/23 Computer Networks AP 17-9


TCP Problem 1: Keystroke
• Let’s take the example of a Telnet session
• 1 keystroke:
– 41 bytes sent (1 (key) + 20 (IP header) + 20 (TCP header))
– 40 bytes of ACK from destination
– 40 bytes of window update (by 1) when the editor reads from TCP
– 41 bytes when editor echoes the keystroke
– Total of 162 bytes per keystroke
• Possible solution:
– Delay ACK and window updates for 500 msec
» Send one segment containing ACK, window update and echo à Bandwidth
requirement is reduced to half
• Problems still exists with the above solution
– Sender is sending 41 bytes per keystroke (character)
» Solution: Nagel’s algorithm

11/28/23 Computer Networks AP 17-10


Nagel’s algorithm: Solution to Keystroke

Nagel’s algorithm The algorithm Nagel’s algorithm


solves the might create
keystroke problem with
problem cursor movement
in an X-windows
environment.
Send the first keystroke
Buffer all subsequent keystrokes until ACK has arrived
Send all buffered keystrokes in one segment after ACK
has arrived
OR
After half the window or a maximum segment has
accumulated

11/28/23 Computer Networks AP 17-11


TCP Problem 2: Silly window syndrome
Problem:
• Buffer is full. Receiver reads one
byte at a time
– Receiver sends one large
segment containing one byte
window update
– Sender sends one byte
– Lot of traffic generated for one
byte

Clark’s Solution
• Prevent receiver from sending
updates for one byte
• Limit window updates to
MIN(MSS, RecvBuffer/2)
• Sender also should not send one
byte at a time
• Wait until there is enough
space at the receiver buffer

11/28/23 Computer Networks AP 17-12


TCP Congestion Control

(a) A fast network feeding a


low capacity receiver.
(b) A slow network feeding a
high-capacity receiver.

• Introduction to TCP
• The TCP Service Model
• The TCP Protocol
• The TCP Segment Header
• TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management

• Potential problems:
– Network capacity
» Requires congestion window
– Receiver capacity
» Requires receiver granted window
• Number of bytes that can be sent = MIN (cong window, receiver window)

11/28/23 Computer Networks AP 17-13


Congestion Control for TCP: Slow start
• As each segment is ACKed
– cwnd = cwnd + 1 à each successful burst doubles cwnd (exponential growth)
• cwnd increases until timeout (requires timer management)
• ICMP SOURCE QUENCH is treated by TCP the same way as a timeout.

Window size
increases linearly

TCP
Congestion
Control
Window size
doubles Simulation`

11/28/23 Computer Networks AP 17-14


• Introduction to TCP
• The TCP Service Model
TCP Timer Management (1) • The TCP Protocol
• The TCP Segment Header
• TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management

(a) Probability density of ACK arrival times in the data link layer. Very predictable.
(b) Probability density of ACK arrival times for TCP. Dynamic and is hard to predict.

11/28/23 Computer Networks AP 17-15


TCP Timer
Management (2)
Jacobson’s Algorithm

Smooth RTT: SRTT =α × SRTTold + (1−α )× RTT

SRTT = Smooth RTT (new


average value of RTT)
α = smooth factor (0.85 by default)
SRTTold = old smooth RTT
RTT = currently measured RTT Deviation: D =α × Dold + (1−α ) | SRTT − RTT |

Timeout = SRTT + 4 × D

11/28/23 Computer Networks AP 17-16

You might also like