Part 4 : reliable transport and sharing resources

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
Server
Client
Source port : 1234
Destination port: 5678
Request
Response
Source port : 5678
Destination port: 1234
Source Addr: Client
Dest. Addr: Server
Source Addr: Server
Dest. Addr: Client
Connection table
• A server interacts with many different
clients and maintains a connection table
• This table contains one entry per
active connection with its state
• Each connection is identified by 4
infos
• Client address and port
• Server address and port
Agenda
• Reliable transport
• Multiplexing
• Connection establishment
• Data transfer
• Connection release
• Sharing resources
• Security principles
Coping with 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
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
- current_seq=y
Connection established
Connection established
Host A Host B
Client FSM
Connect.req
Send CR
Timer expires
Send CR
Recvd REJECT
Disconnect.ind
Recvd(CA)
Connect.conf / Send CA
Recvd REJECT
Disconnect.ind
In any state, a Disconnect.ind (abrupt)
-> Send REJECT and transition to red state
Server FSM
Recvd (CR)
Connect.ind
Connect.resp
Send CA
Recvd REJECT
Disconnect.ind
Recvd REJECT
Disconnect.ind
Recvd CA
In any state, a Disconnect.ind (abrupt)
-> Send REJECT and transition to red state
Recvd CR
Recvd CR
Send CA
Three way handshake
(2)
CA (seq=y, ack=z)
CR (seq=z)
REJECT (ack=y)
Connection cancelled
No connection is established
Host A Host B
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)
CR (seq=z)
Current state does not contain
a CR with seq=x
REJECT (ack=y)
Connection established
CR (seq=z)
Retransmission timer
expires
CA (seq=w, ack=z)
CA (seq=z, ack=w)
CA (seq=y, ack=x)
Sequence number z read
from local transport clock
Local state :
Connection to B :
- Wait for ack for CR (z)
- Start retransmission timer
Host A Host B
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)
Invalid CA received from A
Send REJECT
CA (seq=w, ack=z)
CR (seq=z)
CA (seq=z, ack=y)
REJECT (ack=w)
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
Host A Host B
No connection is established
Agenda
• Reliable transport
• Multiplexing
• Connection establishment
• Data transfer
• Connection release
• Sharing resources
• Security principles
Reliable data transfer
• What are the main differences with the
reliable protocols of the datalink layer ?
• Segments can be reordered
• Buffers can change dynamically
• Bytestream service
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
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
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)
Data.ind(a)
Data.req(a)
D(0,a)
C(OK,0, w=0)
2 new buffers are
available
0 1 2 3
Rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Receiver cannot handle
segment immediately
C(OK,0,w=3)
Lost segment
0 1 2 3
Swin=3, rwin=0
Window blocked
No transmission possible
Waits for control segment Waits for data segment
How to recover from deadlock ?
Persistence timer on receiver,
resend control segment after
timer expiration
Delayed segments
A B
D(1,b)
Timer expiration
Retransmission D(1,b)
D(3,d)
C(OK,0)
C(OK,0)
C(OK,3)
C(OK,0)
C(OK,1)
D(0,e)
Data.ind(e)
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)
D(0,0,a)
Data.req(b)
D(1,0,b)
Error
Discarded
Data.req(c)
D(2,0,c)
Segment -> buffer
Retransmission
Data.ind(b)
D(1,5,b)
Data.ind(c)
Data.req(d)
D(3,6,d)
Data.ind(d)
C(OK,2)
C(OK,3)
Data.req(x)
D(5,0,w)
Data.req(w)
Data.ind(w)
D(6,0,x)
Data.ind(x)
D(5,0,w) acks D(0,0,a)
Bytestream
• How to provide a bytestream service ?
Byte stream service (2)
A B
Data.req(ijkl)
Data.req(mnop)
Data.req(abcdef)
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)
Data.ind(ijklmnop)
C(OK,5)
C(OK,13)
Agenda
• Reliable transport
• Multiplexing
• Connection establishment
• Data transfer
• Connection release
• Sharing resources
• Security principles
Connection release
• Graceful release
• Data transfer 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.conf(A-B)
DISCONNECT.req(B-A)
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’)
Graceful release (2)
D(‘a’,1230)
DISCONNECT.req (A-B)
DISCONNECT.ind(A-B)
ACK(1230)
DISCONNECT.conf(A-B)
Outgoing connection (A->B)
closed
Incoming connection (A->B)
closed
DR(A-B,1234)
DATA.ind(‘a’)
D(‘bcd’,1231)
ACK(1230)
DATA.ind(‘bcd’)
ACK(1234)
Abrupt release
CR (seq=z)
CA (seq=w, ack=z)
CA (seq=z, ack=w)
D
Data.req()
Data.ind()
Disc.req()
D
Data.req()
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
Sharing bandwidth
• Congested network
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
Agenda
• Reliable transport
• Sharing resources
• Which resources need to be shared
• Medium Access Control
• Congestion Control
Adapting to different
bandwidth
What is the round-trip-time in
milliseconds this network if A sends
10,000 bits segments, all links are 1
m long and B returns 100 bits acks ?
If A sends four 10,000 bits
segments in a row, after how
many msec will it receive the last
Self-clocking
The congestion
problem
• If R1 has a buffer of five 10,000 bits long
packets, how many packets will be dropped
if A and B send a burst of ten packets at
line rate ?
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
Max-min fairness
• a max-min allocation maximises the
allocation of bandwidth to the sources
receiving the smallest allocation
• Property
• 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
Example
• Max-min fair bandwidth allocation
R
R
R
R
R
1000 Mbps
100 Mbps
S1
S2
S3 S4 S5 S6 S7 S8
D1 D3 D4
D2
D5
D6
D7
D8
Link1
Link2
Link3
Link4
How to achieve
max-min fairness ?
• Two possible approaches
• Modify the routers to reach max-min
fairness
• Modify the endhosts to reach max-min
fairness
How to detect
congestion ?
• Packet losses
• Increased delay
• Routers add information to packets
• Forward binary feedback
• Backward binary feedback
• Rate feedback
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
Simple Router
output port
Buffer
Input links Output link
Buffer acceptance
accepts or rejects
incoming packets
Router output port
Q[1]
Q[2]
Q[3]
Q[N]
Flow identification
Input links
Output link
Flow identification
Identifies the TCP/UDP flow
to which the arriving packet
belongs
Buffer acceptance
accepts or rejects
incoming packets
Queuing strategy
Logical organization of the
router's buffers
Scheduler
Chooses the packet to
be transmitted first on
the output link
Round robin
Flow 2
Flow 1
Flow 3
Flow 4
Flow 5
Flow 1
Flow 2
Flow 3
Flow N
Scheduler :
F1
F2
F3
F4
FN
Round robin
• If the RR scheduler starts with queue1
and serves them in numerical order,
what is the ordering of the packets on
the output link ?
A
B
D
E
F
G
Queue 1
Queue 2
Queue 3
Example
F1
F2
F3
Flow2 (L=2)
Flow1(L=1)
Flow3 (L=1) F1
F2
F3
Flow1 and Flow3 send packets of size 1
Flow 2 sends packets of size 2
Round-Robin
• Advantage
• Can provide fairness independently of
the characteristics of the flows
• Drawback
• Difficult to scale to a very large
number of flows
1 of 54

Recommended

Part 12 : Local Area Networks by
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks Olivier Bonaventure
110 views62 slides
Part 7 : HTTP/2, UDP and TCP by
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPOlivier Bonaventure
119 views89 slides
Part 6 : Internet applications by
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applicationsOlivier Bonaventure
67 views83 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
6 app-tcp by
6 app-tcp6 app-tcp
6 app-tcpOlivier Bonaventure
3K views52 slides
10 routing-bgp by
10 routing-bgp10 routing-bgp
10 routing-bgpOlivier Bonaventure
2.1K views49 slides

More Related Content

What's hot

12 ethernet-wifi by
12 ethernet-wifi12 ethernet-wifi
12 ethernet-wifiOlivier Bonaventure
3.5K views49 slides
9 ipv6-routing by
9 ipv6-routing9 ipv6-routing
9 ipv6-routingOlivier Bonaventure
2.8K views45 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
TCPLS presentation @ietf 109 by
TCPLS presentation @ietf 109TCPLS presentation @ietf 109
TCPLS presentation @ietf 109Olivier Bonaventure
125 views15 slides
4 transport-sharing by
4 transport-sharing4 transport-sharing
4 transport-sharingOlivier Bonaventure
1.9K views50 slides

What's hot(20)

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
Computer Networking : Principles, Protocols and Practice - lesson 1 by Olivier Bonaventure
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1
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
Network interview questions by rajasekar1712
Network interview questionsNetwork interview questions
Network interview questions
rajasekar1712647 views
Unit III IPV6 UDP by sangusajjan
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
sangusajjan765 views

Similar to Part 4 : reliable transport and sharing resources

Part3-reliable.pptx by
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptxOlivier Bonaventure
5 views55 slides
Part3-reliable.pptx by
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptxOlivier Bonaventure
10 views55 slides
Part4-reliable-tcp.pptx by
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptxOlivier Bonaventure
16 views59 slides
Data link layer by
Data link layerData link layer
Data link layersbkbca
446 views46 slides
Network protocols and vulnerabilities by
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilitiesG Prachi
1.6K views97 slides
Part4-reliable-tcp.pptx by
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptxOlivier Bonaventure
6 views59 slides

Similar to Part 4 : reliable transport and sharing resources(20)

Data link layer by sbkbca
Data link layerData link layer
Data link layer
sbkbca446 views
Network protocols and vulnerabilities by G Prachi
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
G Prachi1.6K views
COMPLETE COMPUTER NETWORK by Amar Panchal
COMPLETE COMPUTER NETWORK COMPLETE COMPUTER NETWORK
COMPLETE COMPUTER NETWORK
Amar Panchal2.8K views
Transport layer by reshmadayma
Transport layerTransport layer
Transport layer
reshmadayma10.3K views
Data linkcontrol by Bablu Shofi
Data linkcontrolData linkcontrol
Data linkcontrol
Bablu Shofi185 views
Transport layer by reshmadayma
Transport layerTransport layer
Transport layer
reshmadayma7.7K views
A Platform for Large-Scale Grid Data Service on Dynamic High-Performance Netw... by Tal Lavian Ph.D.
A Platform for Large-Scale Grid Data Service on Dynamic High-Performance Netw...A Platform for Large-Scale Grid Data Service on Dynamic High-Performance Netw...
A Platform for Large-Scale Grid Data Service on Dynamic High-Performance Netw...
Tal Lavian Ph.D.219 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
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
Part7-routing.pptx by
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptxOlivier Bonaventure
11 views93 slides

Recently uploaded

ARNAB12.pdf by
ARNAB12.pdfARNAB12.pdf
ARNAB12.pdfArnabChakraborty499766
5 views83 slides
Marketing and Community Building in Web3 by
Marketing and Community Building in Web3Marketing and Community Building in Web3
Marketing and Community Building in Web3Federico Ast
15 views64 slides
The Dark Web : Hidden Services by
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden ServicesAnshu Singh
19 views24 slides
ATPMOUSE_융합2조.pptx by
ATPMOUSE_융합2조.pptxATPMOUSE_융합2조.pptx
ATPMOUSE_융합2조.pptxkts120898
35 views70 slides
hamro digital logics.pptx by
hamro digital logics.pptxhamro digital logics.pptx
hamro digital logics.pptxtupeshghimire
11 views36 slides
Affiliate Marketing by
Affiliate MarketingAffiliate Marketing
Affiliate MarketingNavin Dhanuka
20 views30 slides

Recently uploaded(10)

Part 4 : reliable transport and sharing resources

  • 2. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources
  • 3. Multiplexing Server Client Source port : 1234 Destination port: 5678 Request Response Source port : 5678 Destination port: 1234 Source Addr: Client Dest. Addr: Server Source Addr: Server Dest. Addr: Client
  • 4. Connection table • A server interacts with many different clients and maintains a connection table • This table contains one entry per active connection with its state • Each connection is identified by 4 infos • Client address and port • Server address and port
  • 5. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources • Security principles
  • 6. Coping with 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
  • 7. Three way handshake 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 - current_seq=y Connection established Connection established Host A Host B
  • 8. Client FSM Connect.req Send CR Timer expires Send CR Recvd REJECT Disconnect.ind Recvd(CA) Connect.conf / Send CA Recvd REJECT Disconnect.ind In any state, a Disconnect.ind (abrupt) -> Send REJECT and transition to red state
  • 9. Server FSM Recvd (CR) Connect.ind Connect.resp Send CA Recvd REJECT Disconnect.ind Recvd REJECT Disconnect.ind Recvd CA In any state, a Disconnect.ind (abrupt) -> Send REJECT and transition to red state Recvd CR Recvd CR Send CA
  • 10. Three way handshake (2) CA (seq=y, ack=z) CR (seq=z) REJECT (ack=y) Connection cancelled No connection is established Host A Host B 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
  • 11. Three way handshake (3) CR (seq=z) Current state does not contain a CR with seq=x REJECT (ack=y) Connection established CR (seq=z) Retransmission timer expires CA (seq=w, ack=z) CA (seq=z, ack=w) CA (seq=y, ack=x) Sequence number z read from local transport clock Local state : Connection to B : - Wait for ack for CR (z) - Start retransmission timer Host A Host B 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
  • 12. Three way handshake (4) Invalid CA received from A Send REJECT CA (seq=w, ack=z) CR (seq=z) CA (seq=z, ack=y) REJECT (ack=w) 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 Host A Host B No connection is established
  • 13. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources • Security principles
  • 14. Reliable data transfer • What are the main differences with the reliable protocols of the datalink layer ? • Segments can be reordered • Buffers can change dynamically • Bytestream service
  • 15. 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
  • 16. 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 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 Swin=3, rwin=3 0 1 2 3 Data.req(d) D(3,d) 0 1 2 3
  • 17. Buffer management A B Data.req(b) Data.ind(a) Data.req(a) D(0,a) C(OK,0, w=0) 2 new buffers are available 0 1 2 3 Rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Receiver cannot handle segment immediately C(OK,0,w=3) Lost segment 0 1 2 3 Swin=3, rwin=0 Window blocked No transmission possible Waits for control segment Waits for data segment How to recover from deadlock ? Persistence timer on receiver, resend control segment after timer expiration
  • 18. Delayed segments A B D(1,b) Timer expiration Retransmission D(1,b) D(3,d) C(OK,0) C(OK,0) C(OK,3) C(OK,0) C(OK,1) D(0,e) Data.ind(e) Data.ind(b) !!!!!!!!!!!! D(0,a) Data.req(a) Data.ind(a) Data.ind(b) Data.ind(e)
  • 19. 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
  • 20. Bidirectional transfer • How to efficiently carry data in both directions ?
  • 21. Piggybacking A B Data.req(a) Data.ind(a) D(0,0,a) Data.req(b) D(1,0,b) Error Discarded Data.req(c) D(2,0,c) Segment -> buffer Retransmission Data.ind(b) D(1,5,b) Data.ind(c) Data.req(d) D(3,6,d) Data.ind(d) C(OK,2) C(OK,3) Data.req(x) D(5,0,w) Data.req(w) Data.ind(w) D(6,0,x) Data.ind(x) D(5,0,w) acks D(0,0,a)
  • 22. Bytestream • How to provide a bytestream service ?
  • 23. Byte stream service (2) A B Data.req(ijkl) Data.req(mnop) Data.req(abcdef) 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) Data.ind(ijklmnop) C(OK,5) C(OK,13)
  • 24. Agenda • Reliable transport • Multiplexing • Connection establishment • Data transfer • Connection release • Sharing resources • Security principles
  • 25. Connection release • Graceful release • Data transfer finished and connection must be terminated • Abrupt release • Something went wrong and the connection must be closed immediately • Data can be lost !
  • 26. Graceful release D(‘a’,1233) DISCONNECT.req (A-B) DISCONNECT.ind(A-B) ACK,1234 DISCONNECT.conf(A-B) ACK,4567 DISCONNECT.conf(A-B) DISCONNECT.req(B-A) 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’)
  • 27. Graceful release (2) D(‘a’,1230) DISCONNECT.req (A-B) DISCONNECT.ind(A-B) ACK(1230) DISCONNECT.conf(A-B) Outgoing connection (A->B) closed Incoming connection (A->B) closed DR(A-B,1234) DATA.ind(‘a’) D(‘bcd’,1231) ACK(1230) DATA.ind(‘bcd’) ACK(1234)
  • 28. Abrupt release CR (seq=z) CA (seq=w, ack=z) CA (seq=z, ack=w) D Data.req() Data.ind() Disc.req() D Data.req() DR Disc.req() Connection closed Connection closed This segment will not be delivered !
  • 29. Agenda • Reliable transport • Sharing resources • Which resources need to be shared • Medium Access Control • Congestion Control
  • 30. Network resources • What are the resources that are shared by multiple users inside a network ?
  • 31. 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. Agenda • Reliable transport • Sharing resources • Which resources need to be shared • Medium Access Control • Congestion Control
  • 38. Adapting to different bandwidth What is the round-trip-time in milliseconds this network if A sends 10,000 bits segments, all links are 1 m long and B returns 100 bits acks ? If A sends four 10,000 bits segments in a row, after how many msec will it receive the last
  • 40. The congestion problem • If R1 has a buffer of five 10,000 bits long packets, how many packets will be dropped if A and B send a burst of ten packets at line rate ?
  • 41. Fairness • What is the final objective of congestion control ? • On a single link • Fair share • In a large network • Max-min fairness
  • 42. 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
  • 43. Max-min fairness • a max-min allocation maximises the allocation of bandwidth to the sources receiving the smallest allocation • Property • 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
  • 44. Example • Max-min fair bandwidth allocation R R R R R 1000 Mbps 100 Mbps S1 S2 S3 S4 S5 S6 S7 S8 D1 D3 D4 D2 D5 D6 D7 D8 Link1 Link2 Link3 Link4
  • 45. How to achieve max-min fairness ? • Two possible approaches • Modify the routers to reach max-min fairness • Modify the endhosts to reach max-min fairness
  • 46. How to detect congestion ? • Packet losses • Increased delay • Routers add information to packets • Forward binary feedback • Backward binary feedback • Rate feedback
  • 48. Congestion control • Additive Increase / Multiplicative Decrease # Additive Increase Multiplicative Decrease if congestion : rate=rate*betaC # MD, betaC<1 else rate=rate+alphaN # AI
  • 49. Simple Router output port Buffer Input links Output link Buffer acceptance accepts or rejects incoming packets
  • 50. Router output port Q[1] Q[2] Q[3] Q[N] Flow identification Input links Output link Flow identification Identifies the TCP/UDP flow to which the arriving packet belongs Buffer acceptance accepts or rejects incoming packets Queuing strategy Logical organization of the router's buffers Scheduler Chooses the packet to be transmitted first on the output link
  • 51. Round robin Flow 2 Flow 1 Flow 3 Flow 4 Flow 5 Flow 1 Flow 2 Flow 3 Flow N Scheduler : F1 F2 F3 F4 FN
  • 52. Round robin • If the RR scheduler starts with queue1 and serves them in numerical order, what is the ordering of the packets on the output link ? A B D E F G Queue 1 Queue 2 Queue 3
  • 53. Example F1 F2 F3 Flow2 (L=2) Flow1(L=1) Flow3 (L=1) F1 F2 F3 Flow1 and Flow3 send packets of size 1 Flow 2 sends packets of size 2
  • 54. Round-Robin • Advantage • Can provide fairness independently of the characteristics of the flows • Drawback • Difficult to scale to a very large number of flows

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
  3. How to determine a max-min fair bandwidth allocation for a given network ? Algorithm [Bertsekas & Gallager, Data Networks, 2nd edition, Prentice Hall 1992] First start with an allocation of 0 Mbps for each source Then equally increment the allocation to each source until one link becomes saturated. At this point, each source which uses the saturated link receives an allocation equal to the bandwidth of this saturated link divided by the number of sources using this bottleneck link. Next, the allocation of all the sources which do not use a saturated link is equally incremented until another link becomes saturated. The algorithm continues from step to step, always incrementing the allocation of the sources which do not use a saturated link, until all sources use at least one of the saturated links.