0% found this document useful (0 votes)
9 views86 pages

Internet Transport Layer Protocols Explained

Chapter 2 covers the Network and Transport Layer, focusing on Internet transport protocols such as UDP, TCP, and SCTP, as well as congestion control and routing algorithms. It explains the differences between connectionless (UDP) and connection-oriented (TCP) transport services, highlighting their respective functionalities and use cases. The chapter also discusses the structure of transport layer actions, including how data is segmented and transmitted between applications across networks.

Uploaded by

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

Internet Transport Layer Protocols Explained

Chapter 2 covers the Network and Transport Layer, focusing on Internet transport protocols such as UDP, TCP, and SCTP, as well as congestion control and routing algorithms. It explains the differences between connectionless (UDP) and connection-oriented (TCP) transport services, highlighting their respective functionalities and use cases. The chapter also discusses the structure of transport layer actions, including how data is segmented and transmitted between applications across networks.

Uploaded by

Boonsaa Mulataa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Chapter 2:

Network and
Transport Layer

 Lecture 3:
2.1 Internet transport protocol
 UDP
 TCP Computer Networking: A
 SCTP Top-Down Approach
2.2 Congestion control 8th edition
Jim Kurose, Keith Ross
Pearson, 2020
Chapter 2: Network and
Transport layer
2.1 Internet transport protocol
 UDP
 TCP
 SCTP
2.2 Congestion control
2.3 Routing Algorithms
2.4 IPv6

Transport Layer: 3-2


Chapter 2: Network and
Transport laye
2.1 Internet transport protocol
 UDP
 TCP Lecture 3
 SCTP
2.2 Congestion control
2.3 Routing Algorithms
2.4 IPv6

Transport Layer: 3-3


Internet Transport layer: overview

Our goal:

 understand principles  learn about Internet transport


behind transport layer layer protocols:
services: • UDP: connectionless transport
• TCP: connection-oriented reliable
transport

Transport Layer: 3-4


Transport layer:
 Transport-layer services
 Connectionless transport: UDP
 Connection-oriented transport: TCP

Transport Layer: 3-5


Transport services and protocols
application
transport

 provide logical communication mobile


network
network
data link
physical

between application processes national or global ISP

running on different hosts

log
ica
 transport protocols actions in end

le
n d-
systems:

e nd
local or

tra
• sender: breaks application messages regional ISP

nsp
into segments, passes to network layer

ort
home network content
• receiver: reassembles segments into provider
network
messages, passes to application layer application
transport
datacenter
network
network
 two transport protocols available to data link
physical

Internet applications enterprise


network
• TCP, UDP
Transport Layer: 3-6
Transport vs. network layer services and protocols
household analogy:
10 kids in A’s house sending
letters to 10 kids in B’s house:
 hosts = houses
 processes = kids
 app messages = letters in
envelopes
 transport protocol = A and B who
demux to in-house siblings
 network-layer protocol = postal
service

Transport Layer: 3-7


Transport vs. network layer services and protocols

household analogy:
 transport layer:
communication between 10 kids in A’s house sending
letters to 10 kids in B’s house:
processes  hosts = houses
• relies on, enhances, network
 processes = kids
layer services
 app messages = letters in
 network layer: envelopes
 transport protocol = A and B who
communication between
demux to in-house siblings
hosts  network-layer protocol = postal
service
Transport Layer: 3-8
Transport Layer Actions

Sender:
application
 is passed an application- app. msg
application
layer message
 determines segment TThtransport
app. msg
transport h

header fields values


 creates segment network
network (IP)
 passes segment to IP (IP)
link
link
physical physical

Transport Layer: 3-9


Transport Layer Actions

Receiver:
application  receives segment from IP application
 checks header values
app. msg
transport  extracts application-layer transport
message
network (IP)  demultiplexes message up network
to application via socket (IP)
link
link
physical physical
Th app. msg

Transport Layer: 3-10


Two principal Internet transport protocols
application
transport

 TCP: Transmission Control Protocol mobile


network
network
data link
physical
national or global ISP
• reliable, in-order delivery

log
• congestion control

ica
le
• flow control

n d-
e nd
• connection setup local or

tra
regional ISP
 UDP: User Datagram Protocol

nsp
ort
home network
• unreliable, unordered delivery content
provider
network
• no-frills extension of “best-effort” IP application
transport
datacenter
network
network
 services not available: data link
physical

• delay guarantees enterprise


network
• bandwidth guarantees
Transport Layer: 3-11
HTTP server
client
application application
HTTP msg
transport

transport network transport


network link network
link physical link
physical physical

Transport Layer: 3-12


HTTP server
client
application application
HTTP msg
Ht HTTP msg
transport

transport network transport


network link network
link physical link
physical physical

Transport Layer: 3-13


HTTP server
client
application application
HTTP msg
Ht HTTP msg
transport
Hnetwork
n Ht HTTP msg
transport transport
network link network
link physical link
physical physical

Transport Layer: 3-14


HTTP server
client
application application

transport

transport network transport


network link network
link physical link
physical physical

Hn Ht HTTP msg

Transport Layer: 3-15


HTTP server
client
application application
HTTP msg
Ht HTTP msg
transport

transport network transport


Hn network
Ht HTTP msg link network
link physical link
physical physical

Transport Layer: 3-16


HTTP server
client
application application
HTTP msg
Ht HTTP msg
transport
Ht HTTP msg
transport network transport
network link network
link physical link
physical physical

Transport Layer: 3-17


client
application application
HTTP msg
HTTP msg Ht HTTP msg
transport

transport network transport


network link network
link physical link
physical physical

Transport Layer: 3-18


Q: how did transport layer know to deliver message to Firefox
browser process rather then Netflix process or Skype process?

client
application application
HTTP msg
HTTP msg Ht HTTP msg
transport

transport network transport


network link network
link physical link
physical physical

Transport Layer: 3-19


Chapter 2: outline
 Transport-layer services
 Connectionless transport: UDP
 Connection-oriented transport: TCP

Transport Layer: 3-20


UDP: User Datagram Protocol
 “no frills,” “bare bones” Why is there a UDP?
Internet transport protocol  no connection
establishment (which can
 “best effort” service, UDP add RTT delay)
segments may be:  simple: no connection state
• lost at sender, receiver
• delivered out-of-order to app  small header size
 connectionless:  no congestion control
 UDP can blast away as fast as
• no handshaking between UDP desired!
sender, receiver  can function in the face of
• each UDP segment handled congestion
independently of others
Transport Layer: 3-21
UDP: User Datagram Protocol
 UDP use:
 streaming multimedia apps (loss tolerant, rate sensitive)
 DNS
 SNMP
 HTTP/3
 if reliable transfer needed over UDP (e.g., HTTP/3):
 add needed reliability at application layer
 add congestion control at application layer

Transport Layer: 3-22


UDP: User Datagram Protocol [RFC 768]

Transport Layer: 3-23


UDP: Transport Layer Actions

SNMP client SNMP server

application application

transport transport
(UDP) (UDP)

network (IP) network


(IP)
link
link
physical physical

Transport Layer: 3-24


UDP: Transport Layer Actions

SNMP client SNMP server


UDP sender actions:
application
 is passed an application- SNMP msg
application
layer message
transport  determines UDP segment UDPtransport
UDPh h SNMP msg

(UDP) header fields values (UDP)


 creates UDP segment network
network (IP)
 passes segment to IP (IP)
link
link
physical physical

Transport Layer: 3-25


UDP: Transport Layer Actions

SNMP client SNMP server


UDP receiver actions:
application  receives segment from IP application
 checks UDP checksum
transport
transport
SNMP msg header value
(UDP)  extracts application-layer (UDP)

UDP h SNMP (IP)


network msg message network
 demultiplexes message up (IP)
link to application via socket link

physical physical

Transport Layer: 3-26


UDP segment header
32 bits
source port # dest port #
length checksum

application length, in bytes of


data UDP segment,
(payload) including header

data to/from
UDP segment format application layer

Transport Layer: 3-27


UDP checksum
Goal: detect errors (i.e., flipped bits) in transmitted segment
1st number 2nd number sum

Transmitted: 5 6 11

Received: 4 6 11

receiver-computed
checksum
= sender-computed
checksum (as received)

Transport Layer: 3-28


Internet checksum
Goal: detect errors (i.e., flipped bits) in transmitted segment
sender: receiver:
 treat contents of UDP  compute checksum of received
segment (including UDP header segment
fields and IP addresses) as
sequence of 16-bit integers  check if computed checksum equals
 checksum: addition (one’s checksum field value:
complement sum) of segment • not equal - error detected
content • equal - no error detected. But maybe
 checksum value put into errors nonetheless? More later ….
UDP checksum field
Transport Layer: 3-29
Internet checksum: an example
example: add two 16-bit integers
1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

sum 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
checksum 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1

Note: when adding numbers, a carryout from the most significant bit needs to be
added to the result

* Check out the online interactive exercises for more examples: h ttp://[Link]/kurose_ross/interactive/
Transport Layer: 3-30
Internet checksum: weak protection!

example: add two 16-bit integers


0 1
1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 Even though
numbers have
sum 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 changed (bit
flips), no change
checksum 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 in checksum!

Transport Layer: 3-31


Summary: UDP
 “no frills” protocol:
• segments may be lost, delivered out of order
• best effort service: “send and hope for the best”
 UDP has its plusses:
• no setup/handshaking needed (no RTT incurred)
• can function when network service is compromised
• helps with reliability (checksum)
 build additional functionality on top of UDP in application layer
(e.g., HTTP/3)
Chapter 2: outline
 Transport-layer services

 Connectionless transport: UDP

 Connection-oriented transport: TCP


• segment structure

• flow control

• connection management

Transport Layer: 3-33


TCP: overview RFCs: 793,1122, 2018, 5681, 7323

 point-to-point:  cumulative ACKs


• one sender, one receiver  pipelining:
 reliable, in-order byte • TCP congestion and flow control
stream: set window size
• no “message boundaries"  connection-oriented:
 full duplex data: • handshaking (exchange of control
• bi-directional data flow in messages) initializes sender,
same connection receiver state before data exchange
• MSS: maximum segment size  flow controlled:
• sender will not overwhelm receiver

Transport Layer: 3-34


TCP segment structure
32 bits

source port # dest port # segment seq #: counting


ACK: seq # of next expected sequence number bytes of data into bytestream
byte; A bit: this is an ACK (not segments!)
acknowledgement number
length (of TCP header) head not
len used C EUAP R SF receive window flow control: # bytes
Internet checksum checksum Urg data pointer receiver willing to accept

options (variable
C, E: congestion notification length)
TCP options
application data sent by
RST, SYN, FIN: connection data application into
management (variable length) TCP socket

Transport Layer: 3-35


Transport Layer: 3-36
Transport Layer: 3-37
Transport Layer: 3-38
Transport Layer: 3-39
TCP sequence numbers, ACKs
outgoing segment from sender
Sequence numbers: source port # dest port #
sequence number
• byte stream “number” of acknowledgement number

first byte in segment’s data checksum


rwnd
urg pointer

window size
Acknowledgements: N

• seq # of next byte expected


from other side sender sequence number space

• cumulative ACK sent sent, not- usable not


ACKed yet ACKed but not usable
Q: how receiver handles out-of- (“in-flight”) yet sent

order segments outgoing segment from receiver

• A: TCP spec doesn’t say, - up


source port # dest port #
sequence number

to implementor acknowledgement number


A rwnd
checksum urg pointer
Transport Layer: 3-40
TCP sequence numbers, ACKs
Host A Host B

User types‘C’
Seq=42, ACK=79, data = ‘C’
host ACKs receipt of‘C’,
echoes back ‘C’
Seq=79, ACK=43, data = ‘C’
host ACKs receipt
of echoed ‘C’
Seq=43, ACK=80

simple telnet scenario


Transport Layer: 3-41
TCP round trip time, timeout
Q: how to set TCP timeout Q: how to estimate RTT?
value?  SampleRTT:measured time
 longer than RTT, but RTT varies! from segment transmission until
ACK receipt
 too short: premature timeout,
• ignore retransmissions
unnecessary retransmissions
 SampleRTT will vary, want
 too long: slow reaction to estimated RTT “smoother”
segment loss • average several recent
measurements, not just current
SampleRTT

Transport Layer: 3-42


TCP round trip time, timeout
EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT
 exponential weighted moving average (EWMA)
 influence of past sample decreases exponentially fast
 typical value:  = 0.125 (RFC 6298) RTT: [Link] to [Link]

350

RTT: [Link] to [Link]

RTT (milliseconds)
300

250

RTT (milliseconds)
200

sampleRTT
150

EstimatedRTT

100
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106
time (seconnds)
time Transport Layer: 3-43
SampleRTT Estimated RTT
TCP round trip time, timeout
 timeout interval: EstimatedRTT plus “safety margin”
• large variation in EstimatedRTT: want a larger safety margin
TimeoutInterval = EstimatedRTT + 4*DevRTT

estimated RTT “safety margin”

 DevRTT: EWMA of SampleRTT deviation from EstimatedRTT:


DevRTT = (1-)*DevRTT + *|SampleRTT-EstimatedRTT|
(typically,  = 0.25)

* Check out the online interactive exercises for more examples: h ttp://[Link]/kurose_ross/interactive/
Transport Layer: 3-44
TCP Sender (simplified)
event: data received from event: timeout
application  retransmit segment that
 create segment with seq # caused timeout
 restart timer
 seq # is byte-stream number
of first data byte in segment
event: ACK received
 start timer if not already
 if ACK acknowledges
running
• think of timer as for oldest
previously unACKed segments
unACKed segment • update what is known to be
ACKed
• expiration interval:
TimeOutInterval • start timer if there are still
unACKed segments
Transport Layer: 3-45
TCP Receiver: ACK generation [RFC 5681]

Event at receiver TCP receiver action


arrival of in-order segment with delayed ACK. Wait up to 500ms
expected seq #. All data up to for next segment. If no next segment,
expected seq # already ACKed send ACK

arrival of in-order segment with immediately send single cumulative


expected seq #. One other ACK, ACKing both in-order segments
segment has ACK pending

arrival of out-of-order segment immediately send duplicate ACK,


higher-than-expect seq. # . indicating seq. # of next expected byte
Gap detected

arrival of segment that immediate send ACK, provided that


partially or completely fills gap segment starts at lower end of gap

Transport Layer: 3-46


TCP: retransmission scenarios
Host A Host B Host A Host B

SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeout

timeout
Seq=100, 20 bytes of data
ACK=100
X
ACK=100
ACK=120

Seq=92, 8 bytes of data Seq=92, 8


SendBase=100 bytes of data send cumulative
SendBase=120 ACK for 120
ACK=100
ACK=120

SendBase=120

lost ACK scenario premature timeout

Transport Layer: 3-47


TCP: retransmission scenarios
Host A Host B

Seq=92, 8 bytes of data

Seq=100, 20 bytes of data


ACK=100
X
ACK=120

Seq=120, 15 bytes of data

cumulative ACK
covers for earlier
lost ACK
Transport Layer: 3-48
TCP fast retransmit
Host A Host B
TCP fast retransmit
if sender receives 3 additional
ACKs for same data (“triple Se q= 9
2, 8 by
Seq= data tes of
duplicate ACKs”), resend unACKed 100, 2
data
0 b yt e
s of
segment with smallest seq # X
 likely that unACKed segment lost,
=100
so don’t wait for timeout ACK

timeout
=100
ACK
CK =100
A
= 10 0
Receipt of three duplicate ACKs ACK

indicates 3 segments received Seq=100, 20 bytes of data

after a missing segment – lost


segment is likely. So retransmit!

Transport Layer: 3-49


TCP flow control
application
Q: What happens if network Application removing
process

layer delivers data faster than data from TCP socket


buffers
application layer removes TCP socket
data from socket buffers? receiver buffers

TCP
code
Network layer
delivering IP datagram
payload into TCP
IP
socket buffers code

from sender

receiver protocol stack

Transport Layer: 3-50


TCP flow control
application
Q: What happens if network Application removing
process

layer delivers data faster than data from TCP socket


buffers
application layer removes TCP socket
data from socket buffers? receiver buffers

TCP
code
Network layer
delivering IP datagram
payload into TCP
IP
socket buffers code

from sender

receiver protocol stack

Transport Layer: 3-51


TCP flow control
application
Q: What happens if network Application removing
process

layer delivers data faster than data from TCP socket


buffers
application layer removes TCP socket
data from socket buffers? receiver buffers

TCP
code

receive window
flow control: # bytes
receiver willing to accept IP
code

from sender

receiver protocol stack

Transport Layer: 3-52


TCP flow control
application
Q: What happens if network Application removing
process

layer delivers data faster than data from TCP socket


buffers
application layer removes TCP socket
data from socket buffers? receiver buffers

TCP
flow control code

receiver controls sender, so


sender won’t overflow IP
code
receiver’s buffer by
transmitting too much, too fast
from sender

receiver protocol stack

Transport Layer: 3-53


TCP flow control
 TCP receiver “advertises” free buffer
space in rwnd field in TCP header to application process
• RcvBuffer size set via socket
options (typical default is 4096 bytes) RcvBuffer buffered data
• many operating systems autoadjust
RcvBuffer
rwnd free buffer space

 sender limits amount of unACKed


(“in-flight”) data to received rwnd TCP segment payloads

 guarantees receive buffer will not TCP receiver-side buffering


overflow

Transport Layer: 3-54


TCP flow control
flow control: # bytes receiver willing to accept

 TCP receiver “advertises” free buffer


space in rwnd field in TCP header
• RcvBuffer size set via socket
receive window
options (typical default is 4096 bytes)
• many operating systems autoadjust
RcvBuffer
 sender limits amount of unACKed
(“in-flight”) data to received rwnd
 guarantees receive buffer will not
overflow
TCP segment format

Transport Layer: 3-55


TCP connection management
before exchanging data, sender/receiver “handshake”:
 agree to establish connection (each knowing the other willing to establish connection)
 agree on connection parameters (e.g., starting seq #s)

application application

connection state: connection state:


ESTAB ESTAB
connection variables: connection Variables:
seq # client-to- seq # client-to-
server server
server-to-client server-to-client
rcvBuffer size rcvBuffer size
network
at server,client at network
server,client

Socket clientSocket = Socket connectionSocket =


newSocket("hostname","port number"); [Link]();
Transport Layer: 3-56
Agreeing to establish a connection
2-way handshake:

Q: will 2-way handshake always


Let’s talk work in network?
ESTAB
OK  variable delays
ESTAB
 retransmitted messages (e.g.
req_conn(x)) due to message loss
 message reordering
choose x
req_conn(x)
 can’t “see” other side
ESTAB
acc_conn(x)
ESTAB

Transport Layer: 3-57


2-way handshake scenarios
choose x
req_conn(x)
ESTAB
acc_conn(x)

ESTAB
data(x+1) accept
data(x+1
ACK(x+1)
)
connection
x completes

No problem!

Transport Layer: 3-58


2-way handshake scenarios

choose x
req_conn(x)
ESTAB
retransmit acc_conn(x)
req_conn(
x)
ESTAB
req_conn(x)

connection
client x completes server
terminat forgets x
es

ESTAB
acc_conn(x)
Problem: half open
connection! (no client)
Transport Layer: 3-59
2-way handshake scenarios
choose x
req_conn(x)
ESTAB
retransmit acc_conn(x)
req_conn(
x)
ESTAB
data(x+1) accept
data(x+1
retransmit )
data(x+1)
connection
x completes server
client
terminat forgets x
es req_conn(x)
ESTAB
data(x+1) accept
data(x+1
)
Problem: dup data
accepted!
TCP 3-way handshake
Server state
serverSocket = socket(AF_INET,SOCK_STREAM)
Client state [Link]((‘’,serverPort))
[Link](1)
clientSocket = socket(AF_INET, SOCK_STREAM) connectionSocket, addr = [Link]()
LISTEN
[Link]((serverName,serverPort)) LISTEN
choose init seq num, x
send TCP SYN msg
SYNSENT SYNbit=1, Seq=x
choose init seq num, y
send TCP SYNACK
msg, acking SYN SYN RCVD
SYNbit=1, Seq=y
ACKbit=1; ACKnum=x+1
received SYNACK(x)
ESTAB indicates server is live;
send ACK for SYNACK;
this segment may contain ACKbit=1, ACKnum=y+1
client-to-server data
received ACK(y)
indicates client is live
ESTAB

Transport Layer: 3-61


Closing a TCP connection
 client, server each close their side of connection
• send TCP segment with FIN bit = 1
 respond to received FIN with ACK
• on receiving FIN, ACK can be combined with own FIN
 simultaneous FIN exchanges can be handled

Transport Layer: 3-62


 Reading and Note take
Assignment
 Page 263 - 279 of book
“computer networking
A top-down Approach”

Transport Layer: 3-63


Stream Control Transmission Protocol (SCTP)
Suitable transport protocol for signaling traffic (SS7) over IP
– may be used for traditional Internet services such as those based on HTTP
and SIP
– sometimes called the “Next Generation TCP”
– Internet standard RFC2960
 Service model
– unicast transport protocol
– provides reliable, message-oriented data delivery
• SCTP sends “complete” messages whereas TCP is byte oriented and
does not preserve any structure in the byte stream
• reliable = lost/corrupted messages are retransmitted

Transport Layer: 3-64


 Other features
– functionality is TCP-like with modifications due to message oriented
principle
• TCP-like sliding window, flow control and congestion control
• uses selective acknowledgements (SACKs) to report out of
sequence data
– multistreaming: data stream can be partitioned into multiple streams,
each controlled independently
– multihoming: for redundancy, an SCTP endpoint can be associated with
multiple IP addresses

Transport Layer: 3-65


Congestion Control
👇👇👇👇👇👇👇👇👇👇
Congestion Control vs. Flow Control
👉Congestion Control has to due with making sure the subnets are able to carry
the offered traffic. Thus it is a global issue involving the behavior of
• all the hosts,
• all the routers,
• the store-and forwarding processing within the routers, and
• all the other factors that tend to diminish the carrying capacity of the
subnet.

👉 Flow Control relates to point-to-point traffic between a given sender a given


receiver. Its job is to make sure that a fast sender cannot continually transmit
data faster than the receiver is able to absorb it.
• It frequently involves some direct feedback from the receiver to the
sender to tell the sender how things are doing at the other end.
Congestion Control vs. Flow Control Example

👉 Flow Control Problem: Consider a fiber optic network with a capacity of


1000 Gbps on which a supercomputer is trying to transfer a file to a personal
computer at 1 Gbps. Although there is not congestion the supercomputer
has to frequently stop in order to allow PC to catch up.

👉 Congestion Control Problem: Consider a store-and-forward network with 1


Mbps lines and 1000 large computers, half of which are trying to transfer
files at 100 kbps to the other half creating a traffic of 500x100 kbps = 50000
kbps = 50 Mbps. The problem here is that this traffic exceeds the capacity of
what the network can handle.
Virtual circuit subnets
 Dynamic approach: act when needed
 Admission control
• No new virtual circuits when congestion is signalled
• e.g. telephone network
 Route new virtual circuits around problem areas
Virtual circuit subnets
 Dynamic approach
 Admission control
 Route new virtual circuits around problem areas

 Negotiation when virtual circuit is set up


• About kind of traffic + service desired
• Resource reservation in subnet
• Line capacity
• Buffers in routers
No congestion
Unused resources
General techniques
 Approaches: reduce traffic by
• Requesting senders
local measurements + info packets to senders
+ hope for ….

• Throwing away packets


local measurements + local actions to reduce load
Source based approach
 Warning bit
• Output line in warning state
• Warning bit set in header
• Destination copies bit into next ack
• Source cuts back traffic
• Algorithm at source
• As long as warning bits arrive: reduce traffic
• Less warning bits: increase traffic
• Problems
• voluntary action of host!
• correct source selected?
• Used in
• DecNet
• Frame relay
Source based approach
 Choke packet
• In case of overload: router sends choke packet to host causing the overload
• Host receiving choke packet
• reduces traffic to the specified destination
• ignores choke packets for a fixed interval
• new choke packets during next listening interval?
• Yes: reduce traffic
• No: increase traffic
• Problems:
• voluntary action of host!
• correct host selected?
Source based
approach
 Choke packets:
• Example showing
slow reaction
• Solution: Hop-by-
Hop choke packets

81
Source based
approach
 Hop-by-Hop choke
packets
• Have choke packet
take effect at every
hop
• Problem: more
buffers needed in
routers
82
Load shedding
 Throw away packets that cannot be handled!!
 Packet selection?
 Random early detection
• Discard packets before all buffer space is exhausted
• Routers maintain running average of queue lengths
• Select at random a packet
• Inform source?
• Send choke packet?  more load!!
• No reporting
• When does it work?
• Source slows down when packets are lost
Congestion: jitter control
 Important for audio and video applications?
• not delay
• variance of delay
Congestion: jitter control
 Jitter = variation in packet delay
 Compute feasible mean value for delay
• compute expected transit time for each hop
• router checks to see if packet is
• behind
• ahead schedule
• behind: forward packet asap
• ahead: hold back packet to get it on schedule again
 Buffering? Depends on characteristics:
• Video on demand: ok
• Videoconferencing: nok
Lecture 4

Routing Algorithms/protocols

Transport Layer: 3-86

You might also like