4 transport-sharing

Olivier Bonaventure
Olivier BonaventureProfessor at Université catholique de Louvain (UCL) and co-founder at Tessares
Week 4 
Reliable transport 
Sharing resources
Agenda 
• Reliable transport 
• Multiplexing 
• Connection establishment 
• Data transfer 
• Connection release 
• Sharing resources
Multiplexing 
applications 
• How can we multiplex data from several 
applications running on the same host ?
Multiplexing 
Request 
Client Server 
Source port : 1234 
Destination port: 5678 
Source port : 5678 
Destination port: 1234 
Response
Agenda 
• Reliable transport 
• Multiplexing 
• Connection establishment 
• Data transfer 
• Connection release 
• Sharing resources
Connection 
establishment 
• How to reliably open a connection ? 
Connect.req 
Connect.ind 
CR 
Connect.conf Connect.resp 
CA 
Connection established 
Connection established
Segment loss 
Connect.req() 
Connect.ind() 
Connect.conf() 
CA 
Connection established 
Connection established 
CR 
Retransmission CR 
timer expires 
Connect.resp()
Segments delayed 
Connect.ind() 
CR 
Connect.conf() CA 
CR 
First connection established 
Old previous CR 
How to detect duplicates ? 
Connect.req() 
CA 
D 
Connect.resp 
First connection established 
First connection stopped First connection stopped
Delayed segments 
• How to deal with delayed segments ? 
• Network level guarantee 
• No packet will survive more than MSL 
seconds inside the network 
• Transport entities use on a local clock to 
detect duplicated connection 
establishment requests
Three way 
handshake 
Host A Host B 
CR (seq=x) 
CA (seq=y, ack=x) 
CA (seq=x, ack=y) 
Sequence number x read 
from local transport clock 
Local state : 
Connection to B : 
- Wait for ack for CR (x) 
- Start retransmission timer 
Sequence number y read from 
local transport clock 
CA sent to ack CR 
Local state : 
Connection to A : 
- Wait for ack for CA(y) 
Received CA acknowledges CR 
Send CA to ack received CA 
Local state : 
Connection to B : 
- established 
- current_seq = x 
The sequence numbers used 
for the data segments will start 
from x 
The sequence numbers 
used for the data segments 
will start from y 
D(x) 
D(y) 
Local state : 
Connection to A : 
- established 
Connection established - current_seq=y 
Connection established
Three way handshake 
(2) 
Host A CR (seq=z) 
Host B 
CA (seq=y, ack=z) 
REJECT (ack=y) 
Connection cancelled 
No connection is established 
Sequence number y read from 
local transport clock 
Acknowledges CR segment 
Local state : 
Connection to A : 
- Wait for ack for CA(y) 
Local state : 
No connection to B 
Send REJECT to cancel 
connection establishment
Three way handshake 
(3) 
Host A Host B 
CR (seq=z) 
Current state does not contain 
a CR with seq=x 
CA (seq=y, ack=x) 
REJECT (ack=y) 
CR (seq=z) Retransmission timer 
expires 
CA (seq=w, ack=z) 
CA (seq=z, ack=w) 
Connection established 
Sequence number z read 
from local transport clock 
Local state : 
Connection to B : 
- Wait for ack for CR (z) 
- Start retransmission timer 
Current state does not contain 
a segment with seq=y 
REJECT ignored 
Sequence number w read from 
local transport clock 
CA sent to ack CR 
Local state : 
Connection to A : 
- Wait for ack for CA(w) 
Received CA acknowledges CR 
Send CA to ack received CA 
Local state : 
Connection to B : 
- established 
- current_seq = z
Three way handshake 
(4) 
Host A Host B 
Invalid CA received from A 
Send REJECT 
CR (seq=z) 
CA (seq=w, ack=z) 
REJECT (ack=w) 
CA (seq=z, ack=y) 
REJECT (ack=z) 
Sequence number w read from 
local transport clock 
Acknowledges CR segment 
Local state : 
Connection to A : 
- Wait for ack for CA(w) 
Current state does not contain 
a CR with seq=z 
No connection is established
Agenda 
• Reliable transport 
• Multiplexing 
• Connection establishment 
• Data transfer 
• Connection release 
• Sharing resources
Reliable data transfer 
• What are the differences with the 
reliable protocols of the datalink layer ? 
• Segments can be reordered 
• Buffers can change dynamically 
• Bytestream service
Retransmission 
policies 
• Which retransmission policy in reliable 
transport protocols ? 
• Alternating Bit 
• Go-back-n 
• Selective repeat
Buffer management 
• A transport entity serves a variable 
number of applications with a limited 
buffer 
• The buffer/window allocated to a 
given connection may need to change 
dynamically as connections start and 
stop
Buffer management 
A B 
Data.req(a) 
Data.ind(a) 
D(0,a) 
C(OK,0, w=1) 
C(OK,0,w=3) 
Data.req(c) 
D(2,c) 
2 new buffers become 
available 
Data.req(b) 
Data.ind(b) 
D(1,b) 
0 1 2 3 
0 1 2 3 
0 1 2 3 
C(OK,1,w=3) 
Rwin=1 
Swin=3, rwin=1 
0 1 2 3 
Swin=3, rwin=1 
0 1 2 3 
Swin=3, rwin=3 
0 1 2 3 
Data.req(d) 
D(3,d) 0 1 2 3
Buffer management 
A B 
Data.req(b) 
Rwin=1 
Receiver cannot handle 
segment immediately 
Data.ind(a) 
Data.req(a) 
D(0,a) 
C(OK,0, w=0) 
0 1 2 3 
2 new buffers are 
available 
Swin=3, rwin=1 
0 1 2 3 
0 1 2 3 
C(OK,0,w=3) 
Lost segment 
Swin=3, rwin=0 
0 1 2 3 
Window blocked 
No transmission possible 
Waits for control segment Waits for data segment 
How to recover from deadlock ? 
Persitence timer on receiver, resend control segment after 
timer expiration
Delayed segments 
A B 
D(1,b) 
Timer expiration 
Retransmission 
D(3,d) 
D(1,b) 
C(OK,0) 
C(OK,0) 
C(OK,3) 
D(0,e) Data.ind(e) 
C(OK,0) 
C(OK,1) 
Data.ind(b) !!!!!!!!!!!! 
D(0,a) 
Data.req(a) 
Data.ind(a) 
Data.ind(b) 
Data.ind(e)
Delayed segments 
• How to deal with them ? 
• Packets cannot live more than MSL 
seconds inside the network 
• Only one segment carrying sequence 
number x can be transmitted during MSL 
seconds 
• upper bound on maximum throughput
Bidirectional transfer 
• How to efficiently carry data in both 
directions ?
Piggybacking 
A B 
Data.req(a) 
Data.ind(a) 
Data.req(b) D(0,0,a) 
D(1,0,b) 
Error 
Discarded 
Data.req(c) 
D(2,0,c) 
D(5,0,w) acks D(0,0,a) 
Retransmission Segment -> buffer 
Data.ind(b) 
D(1,5,b) 
Data.ind(c) 
Data.req(d) 
D(3,6,d) 
C(OK,2) Data.ind(d) 
C(OK,3) 
Data.req(x) 
D(5,0,w) 
Data.req(w) 
Data.ind(w) 
D(6,0,x) 
Data.ind(x)
Bytestream 
• How to provide a bytestream service ?
Byte stream service (2) 
A B 
Data.req(abcdef) 
Data.req(ijkl) 
Data.req(mnop) 
Data.ind(ab) 
D(0,ab) 
C(OK,1) 
C(OK,1) 
D(2,cd) 
Lost segment 
D(4,ef) 
Placed in buffer 
Data.ind(cdef) 
D(2,cd) 
Expiration timer 
Retransmission 
D(6,ijklmnop) 
C(OK,5) Data.ind(ijklmnop) 
C(OK,13)
Agenda 
• Reliable transport 
• Multiplexing 
• Connection establishment 
• Data transfer 
• Connection release 
• Sharing resources
Connection release 
• Graceful release 
• Data transfer is finished and connection 
must be terminated 
• Abrupt release 
• Something went wrong and the 
connection must be closed immediately 
• Data can be lost !
Graceful release 
D(‘a’,1233) 
DISCONNECT.req (A-B) 
DISCONNECT.ind(A-B) 
ACK,1234 
DISCONNECT.conf(A-B) 
ACK,4567 
DISCONNECT.req(B-A) 
DISCONNECT.conf(A-B) 
DISCONNECT.ind(B-A) 
DR(B-A,4567) 
Outgoing connection (A->B) 
closed 
Incoming connection (A->B) 
closed 
Incoming connection (B->A) 
closed 
Outgoing connection (B->A) 
closed 
DR(A-B,1234) 
DATA.ind(‘a’)
Abrupt release 
CR (seq=z) 
CA (seq=w, ack=z) 
CA (seq=z, ack=w) 
Data.req() D 
Data.ind() 
Disc.req() 
Data.req() D 
DR 
Disc.req() 
Connection closed 
Connection closed 
This segment will not be delivered !
Agenda 
• Reliable transport 
• Sharing resources 
• Which resources need to be shared 
• Medium Access Control 
• Congestion Control
Network resources 
• What are the resources that are shared 
by multiple users inside a network ?
Sharing bandwidth 
• Several nodes on a single link
Agenda 
• Reliable transport 
• Sharing resources 
• Which resources need to be shared 
• Medium Access Control 
• Congestion Control
How to share access 
to a link ? 
• Deterministic solutions 
• Probabilistic solutions
Time Division 
Multiplexing
ALOHA
The collision problem 
A 
B 
collision
Medium Access 
Control : ALOHA 
N=1; 
while ( N<= max) do 
send frame; 
wait for ack on return channel or timeout: 
if ack on return channel 
exit while; 
else 
/* timeout */ 
/* retransmission is needed */ 
N=N+1; 
end do 
/* too many attempts */
CSMA 
• Key idea 
• Listen to the link before transmitting 
and only transmit when nobody else 
transmits
CSMA/CD 
• Key idea 
• Listen to link before transmitting 
• Detect collisions 
• If a collision occurs, stop 
transmitting 
• Caveat 
• Is it possible to detect all collisions ?
CSMA/CA 
• Key idea 
• In wireless networks, we need to 
avoid collisions by deferring 
transmissions 
• Possibility of “reserving” transmission 
slots
Agenda 
• Reliable transport 
• Sharing resources 
• Which resources need to be shared 
• Medium Access Control 
• Congestion Control
Adapting to different 
bandwidth
Self-clocking
The congestion 
problem
Fairness 
• What is the final objective of congestion 
control ? 
• On a single link 
• Fair share 
• In a large network 
• Max-min fairness
Max-min fairness 
• a max-min allocation of bandwidth is an 
allocation of bandwidth which 
maximises the allocation of bandwidth 
to the sources receiving the smallest 
allocation 
• a max-min fair allocation is such that 
in order to increase the bandwidth 
allocated to one source, it is 
necessary to decrease the bandwidth 
allocated to another source which 
already receives a lower allocation
Congestion control
Congestion control 
• Additive Increase / Multiplicative 
Decrease 
# Additive Increase Multiplicative Decrease 
if congestion : 
rate=rate*betaC # MD, betaC<1 
else 
rate=rate+alphaN # AI
How to detect 
congestion ? 
• Host-based solutions 
• Router-based solutions
1 of 50

Recommended

7 tcp-congestion by
7 tcp-congestion7 tcp-congestion
7 tcp-congestionOlivier Bonaventure
3.5K views43 slides
5 sharing-app by
5 sharing-app5 sharing-app
5 sharing-appOlivier Bonaventure
2.2K views57 slides
Part 1 : reliable transmission by
Part 1 : reliable transmissionPart 1 : reliable transmission
Part 1 : reliable transmissionOlivier Bonaventure
259 views46 slides
Part 8 : TCP and Congestion control by
Part 8 : TCP and Congestion controlPart 8 : TCP and Congestion control
Part 8 : TCP and Congestion controlOlivier Bonaventure
107 views81 slides
Computer Networking : Principles, Protocols and Practice - lesson 1 by
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Olivier Bonaventure
9K views30 slides
8 congestion-ipv6 by
8 congestion-ipv68 congestion-ipv6
8 congestion-ipv6Olivier Bonaventure
2K views40 slides

More Related Content

What's hot

Part 5 : Sharing resources, security principles and protocols by
Part 5 : Sharing resources, security principles and protocolsPart 5 : Sharing resources, security principles and protocols
Part 5 : Sharing resources, security principles and protocolsOlivier Bonaventure
67 views76 slides
9 ipv6-routing by
9 ipv6-routing9 ipv6-routing
9 ipv6-routingOlivier Bonaventure
2.8K views45 slides
Future Internet protocols by
Future Internet protocolsFuture Internet protocols
Future Internet protocolsOlivier Bonaventure
877 views53 slides
Part 2 : reliable transmission and building a network by
Part 2 : reliable transmission and building a networkPart 2 : reliable transmission and building a network
Part 2 : reliable transmission and building a networkOlivier Bonaventure
67 views57 slides
Part 9 : Congestion control and IPv6 by
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Olivier Bonaventure
124 views59 slides
Beyond TCP: The evolution of Internet transport protocols by
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
18.3K views59 slides

What's hot(20)

Part 5 : Sharing resources, security principles and protocols by Olivier Bonaventure
Part 5 : Sharing resources, security principles and protocolsPart 5 : Sharing resources, security principles and protocols
Part 5 : Sharing resources, security principles and protocols
Part 2 : reliable transmission and building a network by Olivier Bonaventure
Part 2 : reliable transmission and building a networkPart 2 : reliable transmission and building a network
Part 2 : reliable transmission and building a network
Beyond TCP: The evolution of Internet transport protocols by Olivier Bonaventure
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
Olivier Bonaventure18.3K views
Surviving The Stump The Chump Interview Questions by Duane Bodle
Surviving The Stump The Chump Interview QuestionsSurviving The Stump The Chump Interview Questions
Surviving The Stump The Chump Interview Questions
Duane Bodle1.1K views
Network interview questions by rajasekar1712
Network interview questionsNetwork interview questions
Network interview questions
rajasekar1712647 views
Byte blower basic setting full_v2 by Chen-Chih Lee
Byte blower basic setting full_v2Byte blower basic setting full_v2
Byte blower basic setting full_v2
Chen-Chih Lee436 views
Unit III IPV6 UDP by sangusajjan
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
sangusajjan765 views

Viewers also liked

2 reliability-network by
2 reliability-network2 reliability-network
2 reliability-networkOlivier Bonaventure
2.8K views47 slides
3 network-transport by
3 network-transport3 network-transport
3 network-transportOlivier Bonaventure
1.9K views52 slides
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games by
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesWei Tsang Ooi
950 views85 slides
Lecture 5 by
Lecture 5Lecture 5
Lecture 5ntpc08
652 views20 slides
Socket网络编程 by
Socket网络编程Socket网络编程
Socket网络编程qhm123
475 views37 slides
TCP with delayed ack for wireless networks by
TCP with delayed ack for wireless networksTCP with delayed ack for wireless networks
TCP with delayed ack for wireless networksambitlicksolutions
1.2K views19 slides

Viewers also liked(9)

CS4344 09/10 Lecture 10: Transport Protocol for Networked Games by Wei Tsang Ooi
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
Wei Tsang Ooi950 views
Lecture 5 by ntpc08
Lecture 5Lecture 5
Lecture 5
ntpc08652 views
Socket网络编程 by qhm123
Socket网络编程Socket网络编程
Socket网络编程
qhm123475 views
TCP with delayed ack for wireless networks by ambitlicksolutions
TCP with delayed ack for wireless networksTCP with delayed ack for wireless networks
TCP with delayed ack for wireless networks
ambitlicksolutions1.2K views
Course on TCP Dynamic Performance by Javier Arauz
Course on TCP Dynamic PerformanceCourse on TCP Dynamic Performance
Course on TCP Dynamic Performance
Javier Arauz736 views
TCP Model by manojkum22
TCP ModelTCP Model
TCP Model
manojkum2217.2K views
Flow & Error Control by tameemyousaf
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf38.3K views

Similar to 4 transport-sharing

Part4-reliable-tcp.pptx by
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptxOlivier Bonaventure
16 views59 slides
Part4-reliable-tcp.pptx by
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptxOlivier Bonaventure
6 views59 slides
Data linkcontrol by
Data linkcontrolData linkcontrol
Data linkcontrolBablu Shofi
185 views24 slides
Part3-reliable.pptx by
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptxOlivier Bonaventure
10 views55 slides
Part3-reliable.pptx by
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptxOlivier Bonaventure
5 views55 slides
Data link layer by
Data link layerData link layer
Data link layersbkbca
446 views46 slides

Similar to 4 transport-sharing(20)

Data linkcontrol by Bablu Shofi
Data linkcontrolData linkcontrol
Data linkcontrol
Bablu Shofi185 views
Data link layer by sbkbca
Data link layerData link layer
Data link layer
sbkbca446 views
Transport layer by reshmadayma
Transport layerTransport layer
Transport layer
reshmadayma10.3K views
Transport layer by reshmadayma
Transport layerTransport layer
Transport layer
reshmadayma7.7K views
Unit IV_Flow.pptx by TejasRao8
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
TejasRao83 views
Network protocols and vulnerabilities by G Prachi
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
G Prachi1.6K views
Switching concepts Data communication and networks by Nt Arvind
Switching concepts Data communication and networksSwitching concepts Data communication and networks
Switching concepts Data communication and networks
Nt Arvind1.5K views
RoutingProtocols.ppt by ImXaib
RoutingProtocols.pptRoutingProtocols.ppt
RoutingProtocols.ppt
ImXaib7 views
What every Java developer should know about network? by aragozin
What every Java developer should know about network?What every Java developer should know about network?
What every Java developer should know about network?
aragozin3.2K views

More from Olivier Bonaventure

Part10-router.pptx by
Part10-router.pptxPart10-router.pptx
Part10-router.pptxOlivier Bonaventure
10 views24 slides
Part1-Intro-Apps.pptx by
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptxOlivier Bonaventure
22 views112 slides
Part9-congestion.pptx by
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptxOlivier Bonaventure
13 views56 slides
Part2-Apps-Security.pptx by
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptxOlivier Bonaventure
14 views94 slides
Part11-lan.pptx by
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptxOlivier Bonaventure
8 views89 slides
Part8-ibgp.pptx by
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptxOlivier Bonaventure
10 views35 slides

More from Olivier Bonaventure(15)

A personal journey towards more reproducible networking research by Olivier Bonaventure
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
Part 10 : Routing in IP networks and interdomain routing with BGP by Olivier Bonaventure
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 3 : building a network and supporting applications by Olivier Bonaventure
Part 3 : building a network and supporting applicationsPart 3 : building a network and supporting applications
Part 3 : building a network and supporting applications

Recently uploaded

REACTJS.pdf by
REACTJS.pdfREACTJS.pdf
REACTJS.pdfArthyR3
39 views16 slides
sam_software_eng_cv.pdf by
sam_software_eng_cv.pdfsam_software_eng_cv.pdf
sam_software_eng_cv.pdfsammyigbinovia
19 views5 slides
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R... by
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...IJCNCJournal
5 views25 slides
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... by
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...csegroupvn
16 views210 slides
Design_Discover_Develop_Campaign.pptx by
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxShivanshSeth6
56 views20 slides
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf by
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfAlhamduKure
10 views11 slides

Recently uploaded(20)

REACTJS.pdf by ArthyR3
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
ArthyR339 views
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R... by IJCNCJournal
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...
Trust Metric-Based Anomaly Detection via Deep Deterministic Policy Gradient R...
IJCNCJournal5 views
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... by csegroupvn
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
csegroupvn16 views
Design_Discover_Develop_Campaign.pptx by ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth656 views
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf by AlhamduKure
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
AlhamduKure10 views
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx by lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78314 views
Créativité dans le design mécanique à l’aide de l’optimisation topologique by LIEGE CREATIVE
Créativité dans le design mécanique à l’aide de l’optimisation topologiqueCréativité dans le design mécanique à l’aide de l’optimisation topologique
Créativité dans le design mécanique à l’aide de l’optimisation topologique
LIEGE CREATIVE9 views
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth by Innomantra
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth
Innomantra 22 views
IRJET-Productivity Enhancement Using Method Study.pdf by SahilBavdhankar
IRJET-Productivity Enhancement Using Method Study.pdfIRJET-Productivity Enhancement Using Method Study.pdf
IRJET-Productivity Enhancement Using Method Study.pdf
SahilBavdhankar10 views
Field Programmable Gate Arrays : Architecture by Usha Mehta
Field Programmable Gate Arrays : ArchitectureField Programmable Gate Arrays : Architecture
Field Programmable Gate Arrays : Architecture
Usha Mehta23 views
Ansari: Practical experiences with an LLM-based Islamic Assistant by M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous12 views
Unlocking Research Visibility.pdf by KhatirNaima
Unlocking Research Visibility.pdfUnlocking Research Visibility.pdf
Unlocking Research Visibility.pdf
KhatirNaima11 views
Web Dev Session 1.pptx by VedVekhande
Web Dev Session 1.pptxWeb Dev Session 1.pptx
Web Dev Session 1.pptx
VedVekhande23 views
Integrating Sustainable Development Goals (SDGs) in School Education by SheetalTank1
Integrating Sustainable Development Goals (SDGs) in School EducationIntegrating Sustainable Development Goals (SDGs) in School Education
Integrating Sustainable Development Goals (SDGs) in School Education
SheetalTank113 views

4 transport-sharing

  • 1. Week 4 Reliable transport Sharing resources
  • 2. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources
  • 3. Multiplexing applications • How can we multiplex data from several applications running on the same host ?
  • 4. Multiplexing Request Client Server Source port : 1234 Destination port: 5678 Source port : 5678 Destination port: 1234 Response
  • 5. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources
  • 6. Connection establishment • How to reliably open a connection ? Connect.req Connect.ind CR Connect.conf Connect.resp CA Connection established Connection established
  • 7. Segment loss Connect.req() Connect.ind() Connect.conf() CA Connection established Connection established CR Retransmission CR timer expires Connect.resp()
  • 8. Segments delayed Connect.ind() CR Connect.conf() CA CR First connection established Old previous CR How to detect duplicates ? Connect.req() CA D Connect.resp First connection established First connection stopped First connection stopped
  • 9. Delayed segments • How to deal with delayed segments ? • Network level guarantee • No packet will survive more than MSL seconds inside the network • Transport entities use on a local clock to detect duplicated connection establishment requests
  • 10. Three way handshake Host A Host B CR (seq=x) CA (seq=y, ack=x) CA (seq=x, ack=y) Sequence number x read from local transport clock Local state : Connection to B : - Wait for ack for CR (x) - Start retransmission timer Sequence number y read from local transport clock CA sent to ack CR Local state : Connection to A : - Wait for ack for CA(y) Received CA acknowledges CR Send CA to ack received CA Local state : Connection to B : - established - current_seq = x The sequence numbers used for the data segments will start from x The sequence numbers used for the data segments will start from y D(x) D(y) Local state : Connection to A : - established Connection established - current_seq=y Connection established
  • 11. Three way handshake (2) Host A CR (seq=z) Host B CA (seq=y, ack=z) REJECT (ack=y) Connection cancelled No connection is established Sequence number y read from local transport clock Acknowledges CR segment Local state : Connection to A : - Wait for ack for CA(y) Local state : No connection to B Send REJECT to cancel connection establishment
  • 12. Three way handshake (3) Host A Host B CR (seq=z) Current state does not contain a CR with seq=x CA (seq=y, ack=x) REJECT (ack=y) CR (seq=z) Retransmission timer expires CA (seq=w, ack=z) CA (seq=z, ack=w) Connection established Sequence number z read from local transport clock Local state : Connection to B : - Wait for ack for CR (z) - Start retransmission timer Current state does not contain a segment with seq=y REJECT ignored Sequence number w read from local transport clock CA sent to ack CR Local state : Connection to A : - Wait for ack for CA(w) Received CA acknowledges CR Send CA to ack received CA Local state : Connection to B : - established - current_seq = z
  • 13. Three way handshake (4) Host A Host B Invalid CA received from A Send REJECT CR (seq=z) CA (seq=w, ack=z) REJECT (ack=w) CA (seq=z, ack=y) REJECT (ack=z) Sequence number w read from local transport clock Acknowledges CR segment Local state : Connection to A : - Wait for ack for CA(w) Current state does not contain a CR with seq=z No connection is established
  • 14. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources
  • 15. Reliable data transfer • What are the differences with the reliable protocols of the datalink layer ? • Segments can be reordered • Buffers can change dynamically • Bytestream service
  • 16. Retransmission policies • Which retransmission policy in reliable transport protocols ? • Alternating Bit • Go-back-n • Selective repeat
  • 17. Buffer management • A transport entity serves a variable number of applications with a limited buffer • The buffer/window allocated to a given connection may need to change dynamically as connections start and stop
  • 18. Buffer management A B Data.req(a) Data.ind(a) D(0,a) C(OK,0, w=1) C(OK,0,w=3) Data.req(c) D(2,c) 2 new buffers become available Data.req(b) Data.ind(b) D(1,b) 0 1 2 3 0 1 2 3 0 1 2 3 C(OK,1,w=3) Rwin=1 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=3 0 1 2 3 Data.req(d) D(3,d) 0 1 2 3
  • 19. Buffer management A B Data.req(b) Rwin=1 Receiver cannot handle segment immediately Data.ind(a) Data.req(a) D(0,a) C(OK,0, w=0) 0 1 2 3 2 new buffers are available Swin=3, rwin=1 0 1 2 3 0 1 2 3 C(OK,0,w=3) Lost segment Swin=3, rwin=0 0 1 2 3 Window blocked No transmission possible Waits for control segment Waits for data segment How to recover from deadlock ? Persitence timer on receiver, resend control segment after timer expiration
  • 20. Delayed segments A B D(1,b) Timer expiration Retransmission D(3,d) D(1,b) C(OK,0) C(OK,0) C(OK,3) D(0,e) Data.ind(e) C(OK,0) C(OK,1) Data.ind(b) !!!!!!!!!!!! D(0,a) Data.req(a) Data.ind(a) Data.ind(b) Data.ind(e)
  • 21. Delayed segments • How to deal with them ? • Packets cannot live more than MSL seconds inside the network • Only one segment carrying sequence number x can be transmitted during MSL seconds • upper bound on maximum throughput
  • 22. Bidirectional transfer • How to efficiently carry data in both directions ?
  • 23. Piggybacking A B Data.req(a) Data.ind(a) Data.req(b) D(0,0,a) D(1,0,b) Error Discarded Data.req(c) D(2,0,c) D(5,0,w) acks D(0,0,a) Retransmission Segment -> buffer Data.ind(b) D(1,5,b) Data.ind(c) Data.req(d) D(3,6,d) C(OK,2) Data.ind(d) C(OK,3) Data.req(x) D(5,0,w) Data.req(w) Data.ind(w) D(6,0,x) Data.ind(x)
  • 24. Bytestream • How to provide a bytestream service ?
  • 25. Byte stream service (2) A B Data.req(abcdef) Data.req(ijkl) Data.req(mnop) Data.ind(ab) D(0,ab) C(OK,1) C(OK,1) D(2,cd) Lost segment D(4,ef) Placed in buffer Data.ind(cdef) D(2,cd) Expiration timer Retransmission D(6,ijklmnop) C(OK,5) Data.ind(ijklmnop) C(OK,13)
  • 26. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources
  • 27. Connection release • Graceful release • Data transfer is finished and connection must be terminated • Abrupt release • Something went wrong and the connection must be closed immediately • Data can be lost !
  • 28. Graceful release D(‘a’,1233) DISCONNECT.req (A-B) DISCONNECT.ind(A-B) ACK,1234 DISCONNECT.conf(A-B) ACK,4567 DISCONNECT.req(B-A) DISCONNECT.conf(A-B) DISCONNECT.ind(B-A) DR(B-A,4567) Outgoing connection (A->B) closed Incoming connection (A->B) closed Incoming connection (B->A) closed Outgoing connection (B->A) closed DR(A-B,1234) DATA.ind(‘a’)
  • 29. Abrupt release CR (seq=z) CA (seq=w, ack=z) CA (seq=z, ack=w) Data.req() D Data.ind() Disc.req() Data.req() D DR Disc.req() Connection closed Connection closed This segment will not be delivered !
  • 30. Agenda • Reliable transport • Sharing resources • Which resources need to be shared • Medium Access Control • Congestion Control
  • 31. Network resources • What are the resources that are shared by multiple users inside a network ?
  • 32. Sharing bandwidth • Several nodes on a single link
  • 33. Agenda • Reliable transport • Sharing resources • Which resources need to be shared • Medium Access Control • Congestion Control
  • 34. How to share access to a link ? • Deterministic solutions • Probabilistic solutions
  • 36. ALOHA
  • 37. The collision problem A B collision
  • 38. Medium Access Control : ALOHA N=1; while ( N<= max) do send frame; wait for ack on return channel or timeout: if ack on return channel exit while; else /* timeout */ /* retransmission is needed */ N=N+1; end do /* too many attempts */
  • 39. CSMA • Key idea • Listen to the link before transmitting and only transmit when nobody else transmits
  • 40. CSMA/CD • Key idea • Listen to link before transmitting • Detect collisions • If a collision occurs, stop transmitting • Caveat • Is it possible to detect all collisions ?
  • 41. CSMA/CA • Key idea • In wireless networks, we need to avoid collisions by deferring transmissions • Possibility of “reserving” transmission slots
  • 42. Agenda • Reliable transport • Sharing resources • Which resources need to be shared • Medium Access Control • Congestion Control
  • 46. Fairness • What is the final objective of congestion control ? • On a single link • Fair share • In a large network • Max-min fairness
  • 47. Max-min fairness • a max-min allocation of bandwidth is an allocation of bandwidth which maximises the allocation of bandwidth to the sources receiving the smallest allocation • a max-min fair allocation is such that in order to increase the bandwidth allocated to one source, it is necessary to decrease the bandwidth allocated to another source which already receives a lower allocation
  • 49. Congestion control • Additive Increase / Multiplicative Decrease # Additive Increase Multiplicative Decrease if congestion : rate=rate*betaC # MD, betaC<1 else rate=rate+alphaN # AI
  • 50. How to detect congestion ? • Host-based solutions • Router-based solutions

Editor's Notes

  1. In this example, the duplicate CR is likely to be a previous retransmission of the CR that was delayed in the network.
  2. MSL means Maximum Segment Lifetime