Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March...
Transcript of Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March...
![Page 1: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/1.jpg)
Communication Networks
Spring 2020
ETH Zürich (D-ITET)
Laurent Vanbever
March 2 2020
Materials inspired from Scott Shenker & Jennifer Rexford
nsg.ee.ethz.ch
![Page 2: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/2.jpg)
Internet Routing Hackathon, Edition 2020
Thursday March 26, 18:00 in ETZ foyer
![Page 3: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/3.jpg)
Register your group (3 students) starting from
Thursday March 5 (see website)
![Page 4: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/4.jpg)
Last week on
Communication Networks
![Page 5: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/5.jpg)
What is a network made of?
How is it shared?
How is it organized?
How does communication happen?
How do we characterize it?
#4
Communication Networks
Part 1: General overview
![Page 6: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/6.jpg)
The Internet should allow
processes on different hosts
everything else is just commentary…
to exchange data
![Page 7: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/7.jpg)
In practice, there exists a lot of network protocols.
How does the Internet organize this?
![Page 8: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/8.jpg)
Each layer provides a service to the layer above
by using the services of the layer directly below it
Applications
…built on…
…built on…
…built on…
…built on…
Reliable (or unreliable) transport
Best-effort global packet delivery
Best-effort local packet delivery
Physical transfer of bits
![Page 9: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/9.jpg)
What is a network made of?
How is it shared?
How is it organized?
How does communication happen?
How do we characterize it?#5
Communication Networks
Part 1: General overview
![Page 10: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/10.jpg)
throughputlossdelay
How long does it take for a packet to reach the destination
What fraction of packets sent to a destination are dropped?
At what rate is the destination receiving data from the source?
A network connection is characterized by
its delay, loss rate and throughput
![Page 11: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/11.jpg)
This week on
Communication Networks
![Page 12: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/12.jpg)
We will dive in the two fundamental
challenges underlying networking
routingreliable
delivery
![Page 13: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/13.jpg)
routingreliable
delivery
How do you guide IP packets
from a source to destination?
How do you ensure reliable transport
on top of best-effort delivery?
![Page 14: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/14.jpg)
routingreliable
delivery
How do you guide IP packets
from a source to destination?
![Page 15: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/15.jpg)
question 1
question 2
How do we verify that a forwarding state is valid?
How do we compute valid forwarding state?
![Page 16: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/16.jpg)
How do we verify that a forwarding state is valid?
How do we compute valid forwarding state?
question 1
![Page 17: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/17.jpg)
Mark all outgoing ports with an arrow
Eliminate all links with no arrow
State is valid iff the remaining graph
is a spanning-tree
simple algorithm
for one destination
Verifying that a routing state is valid is easy
![Page 18: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/18.jpg)
X
dest
X
dest output
East
dest output
WestX
Given a graph with the corresponding forwarding state
![Page 19: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/19.jpg)
X
Mark all outgoing ports with an arrow
![Page 20: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/20.jpg)
X
Eliminate all links with no arrow
![Page 21: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/21.jpg)
X
![Page 22: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/22.jpg)
X
The result is a spanning tree.
This is a valid routing state
![Page 23: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/23.jpg)
X
Mark all outgoing ports with an arrow
![Page 24: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/24.jpg)
X
Eliminate all links with no arrow
![Page 25: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/25.jpg)
X
The result is not a spanning-tree.
The routing state is not valid
loop
dead-end
![Page 26: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/26.jpg)
question 2
How do we verify that a forwarding state is valid?
How do we compute valid forwarding state?
![Page 27: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/27.jpg)
Producing valid routing state is harder,
but doable
prevent dead ends
easy
prevent loops
hard
![Page 28: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/28.jpg)
This is the question
you should focus on
prevent dead ends
easy
prevent loops
hard
Producing valid routing state is harder
but doable
![Page 29: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/29.jpg)
prevent loops
hard
Existing routing protocols differ in
how they avoid loops
![Page 30: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/30.jpg)
it’s your turn
…to figure out a way to route traffic in a network
instructions given in class
Before I give you all the answers
![Page 31: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/31.jpg)
Essentially,
there are three ways to compute valid routing state
Use tree-like topologies
Rely on a global network view
Rely on distributed computation
Spanning-tree
Link-State
Distance-Vector
#1
#2
#3
BGP
SDN
Intuition Example
![Page 32: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/32.jpg)
Use tree-like topologies
Rely on a global network view
Rely on distributed computation
Spanning-tree
Link-State
Distance-Vector
#1
BGP
SDN
Essentially,
there are three ways to compute valid routing state
![Page 33: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/33.jpg)
The easiest way to avoid loops is to route traffic
on a loop-free topology
Take an arbitrary topology
Build a spanning tree and
ignore all other links
Done!
simple algorithm
Why does it work? Spanning-trees have only one path
between any two nodes
![Page 34: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/34.jpg)
In practice,
there can be many spanning-trees for a given topology
![Page 35: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/35.jpg)
Spanning-Tree #1
![Page 36: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/36.jpg)
Spanning-Tree #2
![Page 37: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/37.jpg)
Spanning-Tree #3
![Page 38: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/38.jpg)
We’ll see how to compute spanning-trees in 2 weeks.
For now, assume it is possible
![Page 39: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/39.jpg)
literally just flood
the packets everywhere
Once we have a spanning tree,
forwarding on it is easy
![Page 40: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/40.jpg)
A
B
When a packet arrives,
simply send it on all ports
![Page 41: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/41.jpg)
While flooding works,
it is quite wasteful
A
B
Useless transmissions
![Page 42: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/42.jpg)
The issue is that nodes do not know their
respective locations
![Page 43: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/43.jpg)
Nodes can learn how to reach nodes
by remembering where packets came from
then
intuition
switch X can use port 4
to reach node A
flood packet from node A
entered switch X on port 4
if
![Page 44: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/44.jpg)
A
B
![Page 45: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/45.jpg)
A
Node A can be reached
through this port
B
![Page 46: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/46.jpg)
A
B
![Page 47: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/47.jpg)
A
B
All the green nodes learn how to reach A
![Page 48: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/48.jpg)
A
All the green nodes learn how to reach A
B
![Page 49: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/49.jpg)
A
All the nodes know on which port
A can be reached
B
![Page 50: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/50.jpg)
A
B
B answers back to A
enabling the green nodes to also learn where B is
![Page 51: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/51.jpg)
A
B
There is no need for flooding here
as the position of A is already known by everybody
![Page 52: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/52.jpg)
A
B
Learning is topology-dependent
The blue nodes only know how to reach A (not B)
![Page 53: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/53.jpg)
Routing by flooding on a spanning-tree
in a nutshell
When destination answers, some switches learn where it is
some because packet to you is not flooded anymore
Flood first packet to node you’re trying to reach
all switches learn where you are
The decision to flood or not is done on each switch
depending on who has communicated before
![Page 54: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/54.jpg)
Spanning-Tree in practice
used in Ethernet
advantages disadvantages
plug-and-play
configuration-free
automatically adapts
to moving host
slow to react to failures
mandate a spanning-tree
eliminate many links from the topology
slow to react to host movement
![Page 55: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/55.jpg)
Essentially,
there are three ways to compute valid routing state
Use tree-like topologies
Rely on a global network view
Rely on distributed computation
Spanning-tree
Link-State
Distance-Vector
#2
BGP
SDN
![Page 56: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/56.jpg)
If each router knows the entire graph,
it can locally compute paths to all other nodes
![Page 57: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/57.jpg)
Initialization Loop
Once a node u knows the entire topology,
it can compute shortest-paths using Dijkstra’s algorithm
add w with the smallest D(w) to S
update D(v) for all adjacent v not in S:
D(v) = min{D(v), D(w) + c(w,v)}
while not all nodes in S:S = {u}
for all nodes v:
if (v is adjacent to u):
D(v) = c(u,v)
else:
D(v) = ∞
![Page 58: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/58.jpg)
for all nodes v:
if (v is adjacent to u):
else:
S = {u}
u is the node running the algorithm
D(v) = c(u,v) c(u,v) is the weight of the link
connecting u and v
D(v) = ∞
D(v) is the smallest distance
currently known by u to reach v
![Page 59: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/59.jpg)
2 1
1
2
14
5
4 3
Let’s compute the shortest-paths
from u
u
3
A B
C D
E F
G
![Page 60: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/60.jpg)
2 1
1
2
14
5
4 3
u
3
A B
C D
E F
G
Initialization
S = {u}
for all nodes v:
if (v is adjacent to u):
D(v) = c(u,v)
else:
D(v) = ∞
![Page 61: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/61.jpg)
2 1
1
2
14
5
4 3
D is initialized based on u’s weight,
and S only contains u itself
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
∞
∞
∞
∞
∞
3
2
S = {u}
u
![Page 62: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/62.jpg)
2 1
1
2
14
5
4 3
3
A B
C D
E F
G
u
Loop
add w with the smallest D(w) to S
update D(v) for all adjacent v not in S:
D(v) = min{D(v), D(w) + c(w,v)}
while not all nodes in S:
![Page 63: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/63.jpg)
2 1
1
2
14
5
4 3
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
∞
∞
∞
∞
∞
3
2
u
smallest D(w)
S = {u}
![Page 64: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/64.jpg)
2 1
1
2
14
5
4 3
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
∞
∞
∞
∞
∞
3
2
u
add E to S
S = {u, E}
![Page 65: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/65.jpg)
2 1
1
2
14
5
4 3
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
∞
3
∞
∞
6
3
2
u D(v) = min{∞, 2 + 1}
S = {u, E}
D(v) = min{∞, 2 + 4}
![Page 66: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/66.jpg)
2 1
1
2
14
5
4 3
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
∞
∞
∞
3
u
S = {u, E}
3
6
2
Now, do it by yourself
![Page 67: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/67.jpg)
2 1
1
2
14
5
4 3
3
D(.) =A B
C D
E F
G
A
B
C
D
E
F
G
5
6
8
3
u 3
6
2
Here is the final state
S = {u, A,
B, C, D, E,
F,G}
![Page 68: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/68.jpg)
This algorithm has a O(n2) complexity
where n is the number of nodes in the graph
iteration #1 search for minimum through n nodes
iteration #2 search for minimum through n-1 nodes
iteration n search for minimum through 1 node
n(n+1) operations => O(n2)
2
![Page 69: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/69.jpg)
Better implementations rely on a heap
to find the next node to expand,
bringing down the complexity to O(n log n)
This algorithm has a O(n2) complexity
where n is the number of nodes in the graph
![Page 70: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/70.jpg)
2 1
1
2
14
5
4 3
3
Forwarding table
A B
C D
E F
G
A
B
C
D
E
F
G
A
E
A
u
E
E
From the shortest-paths,
u can directly compute its forwarding table
destination next-hop
A
E
![Page 71: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/71.jpg)
To build this global view
routers essentially solve a jigsaw puzzle
![Page 72: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/72.jpg)
2 1
1
2
14
5
4 3
Initially,
routers only know their ID and their neighbors
u
3
A B
C D
E F
G
D only knows,
it is connected to B and C
along with the weights to reach them
(by configuration)
![Page 73: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/73.jpg)
2 1
1
2
14
5
4 3
Each routers builds a message (known as Link-State)
and floods it (reliably) in the entire network
u
3
A B
C
E F
G
D edge (D,B); cost: 1
edge (D,C); cost: 4
D’s Advertisement
![Page 74: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/74.jpg)
required for correctness
see exercise
2 1
1
2
14
5
4 3
u
3
A B
C D
E F
G
At the end of the flooding process,
everybody share the exact same view of the network
![Page 75: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/75.jpg)
cf. exercice session
for the dynamic case
Dijkstra will always converge to a unique stable state
when run on static weights
![Page 76: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/76.jpg)
Use tree-like topologies
Rely on a global network view
Rely on distributed computation
Spanning-tree
Link-State
Distance-Vector#3
BGP
SDN
Essentially,
there are three ways to compute valid routing state
![Page 77: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/77.jpg)
Instead of locally compute paths based on the graph,
paths can be computed in a distributed fashion
![Page 78: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/78.jpg)
Let dx(y) be the cost of the least-cost path
known by x to reach y
![Page 79: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/79.jpg)
Let dx(y) be the cost of the least-cost path
known by x to reach y
Each node bundles these distances
into one message (called a vector)
that it repeatedly sends to all its neighborsuntil convergence
![Page 80: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/80.jpg)
Let dx(y) be the cost of the least-cost path
known by x to reach y
Each node bundles these distances
into one message (called a vector)
that it repeatedly sends to all its neighbors
Each node updates its distances
based on neighbors’ vectors:
dx(y) = min{ c(x,v) + dv(y) } over all neighbors v
until convergence
![Page 81: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/81.jpg)
2 1
1
2
14
5
4 3
Let’s compute the shortest-path
from u to D
u
3
A B
C D
E F
G
![Page 82: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/82.jpg)
2 1
1
2
14
5
4 3
u
3
A B
C D
E F
G
dx(y) = min{ c(x,v) + dv(y) }
over all neighbors v
du(D) = min{ c(u,A) + dA(D),
c(u,E) + dE(D) }
The values computed by a node u
depends on what it learns from its neighbors (A and E)
![Page 83: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/83.jpg)
2 1
1
2
14
5
4 3
u
3
A B
C D
E F
G
dB(D) = 1
dC(D) = 4
To unfold the recursion,
let’s start with the direct neighbor of D
![Page 84: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/84.jpg)
2 1
1
2
14
5
4 3
B and C announce their vector to their neighbors,
enabling A to compute its shortest-path
u
3
A B
C D
E F
G
dA(D) = min { 2 + dB(D),
1 + dC(D)}
1
4= 3
![Page 85: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/85.jpg)
2 1
1
2
14
5
4 3
As soon as a distance vector changes,
each node propagates it to its neighbor
u
3
A B
C D
E F
G
dE(D) = min { 1 + dC(D),
4 + dG(D),
2 + du(D)}
= 5
![Page 86: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/86.jpg)
2 1
1
2
14
5
4 3
u
3
A B
C D
E F
G
= 6
du(D) = min { 3 + dA(D),
2 + dE(D) }
Eventually, the process converges
to the shortest-path distance to each destination
![Page 87: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/87.jpg)
the one which advertised the smallest cost
As before, u can directly infer its forwarding table
by directing the traffic to the best neighbor
![Page 88: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/88.jpg)
Evaluating the complexity of DV is harder,
we’ll get back to that in a couple of weeks
![Page 89: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/89.jpg)
routingreliable
delivery
How do you ensure reliable transport
on top of best-effort delivery?
Communication Networks
Part 2: Concepts
![Page 90: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/90.jpg)
In the Internet, reliability is ensured by
the end hosts, not by the network
![Page 91: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/91.jpg)
The Internet puts reliability in L4,
just above the Network layer
Keep applications as network “unaware” as possible
a developer should focus on its app, not on the network
Keep the network simple, dumb
make it relatively “easy” to build and operate a network
goals
Implement reliability in-between, in the networking stack
relieve the burden from both the app and the network
design
![Page 92: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/92.jpg)
Application
Transport
Network
Link
Physical
L4
L3
layer
The Internet puts reliability in L4,
just above the Network layer
reliable end-to-end delivery
global best-effort delivery
![Page 93: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/93.jpg)
Application
Transport
Network
Link
Physical
L4
L3
layer
Recall that the Network provides a best-effort service,
with quite poor guarantees
reliable end-to-end delivery
global best-effort delivery
![Page 94: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/94.jpg)
Let’s consider a simple communication
between two end-points, Alice and Bob
packet 1
packet 2
packet 3
Alice BobInternet
packet 1
packet 2
packet 3
![Page 95: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/95.jpg)
IP packets can get lost or delayed
packet 1
packet 2
packet 3
packet 2
Alice BobInternet
![Page 96: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/96.jpg)
IP packets can get corrupted
payload: 101
payload: 010
payload: 42
Alice BobInternet
payload: 001
payload: 010
payload: 101
![Page 97: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/97.jpg)
IP packets can get reordered
Internet
packet 1
packet 2
packet 3 packet 1
packet 2
packet 3
Alice Bob
![Page 98: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/98.jpg)
IP packets can get duplicated
Internet
packet 1
packet 2
packet 3
packet 1
packet 2
packet 3
packet 1
packet 1
Alice Bob
![Page 99: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/99.jpg)
Reliable Transport
if-and-only if again
Correctness condition1
Design space
timeliness vs efficiency vs …
2
Examples
Go-Back-N & Selective Repeat
3
![Page 100: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/100.jpg)
Reliable Transport
if-and-only if again
Correctness condition1
Design space
Examples
Go-Back-N & Selective Repeat
timeliness vs efficiency vs …
![Page 101: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/101.jpg)
The four goals of reliable transfer
minimize time until data is transferred
ensure data is delivered, in order, and untouched
optimal use of bandwidth
correctness
timeliness
efficiency
goals
fairness play well with concurrent communications
![Page 102: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/102.jpg)
ensure data is delivered, in order, and untouchedcorrectness
goals
![Page 103: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/103.jpg)
Routing had a clean sufficient and necessary
correctness condition
sufficient and necessary condition
a global forwarding state is valid if and only ifTheorem
no outgoing port defined in the table
there are no dead ends
packets going around the same set of nodes
there are no loops
![Page 104: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/104.jpg)
We need the same kind of “if and only if” condition
for a “correct” reliable transport design
![Page 105: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/105.jpg)
attempt #1
Consider that the network is partitioned
We cannot say a transport design is incorrect
if it doesn’t work in a partitioned network…
Wrong
packets are delivered to the receiver
A reliable transport design is correct if…
![Page 106: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/106.jpg)
packets are delivered to receiver if and only if attempt #2
Wrong If the network is only available one instant in time,
We cannot say a transport design is incorrect
if it doesn’t know the unknowable
only an oracle would know when to send
it was possible to deliver them
A reliable transport design is correct if…
![Page 107: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/107.jpg)
attempt #3
Consider two casesWrong
It resends a packet if and only if
packets make it to the receiver, all packets from receiver were dropped
packets are dropped on the way,
all packets from receiver were dropped
packet made it to the receiver and
packet is dropped on the way and
the previous packet was lost or corrupted
A reliable transport design is correct if…
![Page 108: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/108.jpg)
attempt #3
In both case, the sender has no feedback at allWrong
Does it resend or not?
It resends a packet if and only if
the previous packet was lost or corrupted
A reliable transport design is correct if…
![Page 109: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/109.jpg)
attempt #3
Wrong
but better as it refers to what the design does (which it can control),
not whether it always succeeds (which it can’t)
It resends a packet if and only if
the previous packet was lost or corrupted
A reliable transport design is correct if…
![Page 110: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/110.jpg)
attempt #4
Correct!
A packet is always resent if
the previous packet was lost or corrupted
A packet may be resent at other times
A reliable transport design is correct if…
![Page 111: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/111.jpg)
Sufficient algorithm will always keep trying
Necessary
“if”
“only if”
to deliver undelivered packets
if it ever let a packet go undelivered
without resending it, it isn’t reliable
A transport mechanism is correct
if and only if it resends all dropped or corrupted packets
Note it is ok to give up after a while but
must announce it to the application
![Page 112: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/112.jpg)
Reliable Transport
if-and-only if again
Correctness condition
Design space2
Examples
Go-Back-N & Selective Repeat
timeliness vs efficiency vs …
![Page 113: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/113.jpg)
let’s focus on these aspects first
Now, that we have a correctness condition
how do we achieve it and with what tradeoffs?
lostpackets can get
corrupted
reordered
delayed
duplicated
Design a correct, timely, efficient and fair transport mechanism
knowing that
![Page 114: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/114.jpg)
send_packet(word);
set_timer();
upon timer going off:
if no ACK received:
send_packet(word);
reset_timer();
receive_packet(p);
send_ack();
if word not delivered:
deliver_word(word);
for word in list:
upon ACK:
pass;
BobAlice
if check(p.payload) == p.checksum:
else:
pass;
![Page 115: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/115.jpg)
There is a clear tradeoff between timeliness and efficiency
in the selection of the timeout value
send_packet(word);
set_timer();
upon timer going off:
if no ACK received:
send_packet(word);
reset_timer();
for word in list:
upon ACK:
pass
receive_packet(p);
send_ack();
if word not delivered:
deliver_word(word);
if check(p.payload) == p.checksum:
else:
pass;
![Page 116: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/116.jpg)
Timeliness argues for small timers,
efficiency for large ones
efficiency
small
timers
unnecessary retransmissions
large
timers
timeliness
slow transmission
risk risk
![Page 117: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/117.jpg)
packet 1
ACK
packet 2
ACK
BobAlice
Even with short timers, the timeliness of our protocol is
extremely poor: one packet per Round-Trip Time (RTT)
![Page 118: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/118.jpg)
An obvious solution to improve timeliness is
to send multiple packets at the same time
add sequence number inside each packet
store packets sent & not acknowledged
store out-of-sequence packets received
sender
receiver
add buffers to the sender and receiver
approach
![Page 119: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/119.jpg)
BobAlicepacket 1
packet 3
packet 2
packet 4
4 packets
sent w/o
ACKs
![Page 120: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/120.jpg)
supercomputer
…
sends 1000 packet/s can process 10 packet/s
overwhelmed smartphone
Sending multiple packets improves timeliness,
but it can also overwhelm the receiver
packet 1 packet 2
packet 1000
![Page 121: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/121.jpg)
To solve this issue,
we need a mechanism for flow control
![Page 122: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/122.jpg)
Using a sliding window is one way to do that
Receiver also keeps a list of the acceptable sequence #
known as the receiving window
Sender keeps a list of the sequence # it can send
known as the sending window
Sender and receiver negotiate the window size
sending window <= receiving window
![Page 123: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/123.jpg)
1 2 3 4 5 6 7 8 9 10 11 ...0
ACKed
packets
unACK’ed
packets
available
packets
forbidden
packets
Example with a window composed of 4 packets
![Page 124: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/124.jpg)
1 2 3 4 5 6 7 8 9 10 11 ...0
ACKed
packets
unACK’ed
packets
available
packets
forbidden
packets
Window after sender receives ACK 4
![Page 125: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/125.jpg)
Timeliness of the window protocol depends on
the size of the sending window
![Page 126: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/126.jpg)
Assuming infinite buffers,
how big should the window be to maximize timeliness?
BobAlice
100 Mbps, 5 ms (one-way)
What should be the value of W?(in bytes)
![Page 127: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/127.jpg)
Timeliness matters,
but what about efficiency?
![Page 128: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/128.jpg)
The efficiency of our protocol
essentially depends on two factors
receiver
feedback
behavior
upon losses
How much information
does the sender get?
How does the sender
detect and react to losses?
![Page 129: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/129.jpg)
The efficiency of our protocol
essentially depends on two factors
receiver
feedback
behavior
upon losses
How much information
does the sender get?
![Page 130: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/130.jpg)
ACKing individual packets provides detailed feedback,
but triggers unnecessary retransmission upon losses
advantages
know fate of each packet
simple window algorithm
W single-packet algorithms
not sensitive to reordering
disadvantages
loss of an ACK packet
requires a retransmission
causes unnecessary retransmission
![Page 131: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/131.jpg)
advantages
disadvantages
ACK the highest sequence number for which
recover from lost ACKs
confused by reordering
incomplete information about which packets have arrived
all the previous packets have been received
approach
Cumulative ACKs enables to recover from lost ACKs,
but provides coarse-grained information to the sender
causes unnecessary retransmission
![Page 132: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/132.jpg)
Full Information Feedback prevents unnecessary
retransmission, but can induce a sizable overhead
complete information
overhead
List all packets that have been received
highest cumulative ACK, plus any additional packets
approach
resilient form of individual ACKs
advantages
disadvantages
e.g., when large gaps between received packets
(hence lowering efficiency)
![Page 133: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/133.jpg)
We see that Internet design is
all about balancing tradeoffs (again)
![Page 134: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/134.jpg)
The efficiency of our protocol
essentially depends on two factors
receiver
feedback
behavior
upon losses
How does the sender
detect and react to losses?
![Page 135: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/135.jpg)
As of now, we detect loss by using timers.
That’s only one way though
![Page 136: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/136.jpg)
Losses can also be detected by relying on ACKs
![Page 137: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/137.jpg)
sender can infer that 5 is missing
and resend 5 after k subsequent packets
With individual ACKs,
missing packets (gaps) are implicit
Assume packet 5 is lost
1ACK stream
2
3
4
6
7
…
but no other
![Page 138: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/138.jpg)
sender learns that 5 is missing
retransmits after k packets
With full information,
missing packets (gaps) are explicit
Assume packet 5 is lost
up to 1ACK stream
up to 2
up to 3
up to 4
up to 4, plus 6
up to 4, plus 6—7
…
but no other
![Page 139: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/139.jpg)
With cumulative ACKs,
missing packets are harder to know
Assume packet 5 is lost
1ACK stream
2
3
4
4 sent when 6 arrives
4 sent when 7 arrives
…
but no other
![Page 140: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/140.jpg)
but what do you resend?
only 5 or 5 and everything after?
Duplicated ACKs are a sign of isolated losses.
Dealing with them is trickier though.
Stream of ACKs means that (some) packets are delivered
Lack of ACK progress means that 5 hasn’t made it
Sender could trigger resend
situation
upon receiving k duplicates ACKs
![Page 141: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/141.jpg)
lostpackets can get
corrupted
reordered
delayed
duplicated
Design a correct, timely, efficient and fair transport mechanism
knowing that
What about fairness?
![Page 142: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/142.jpg)
When n entities are using our transport mechanism,
we want a fair allocation of the available bandwidth
![Page 143: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/143.jpg)
A B1Gbps
C1Gbps
Consider this simple network
in which three hosts are sharing two links
What is a fair allocation for the 3 flows?
flow 1
flow 2
flow 3
![Page 144: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/144.jpg)
A B1Gbps
C1Gbps
flow 1
flow 2
flow 3
500 Mbps
500 Mbps
500 Mbps
An equal allocation is certainly “fair”,
but what about the efficiency of the network?
Total traffic is 1.5 Gbps
![Page 145: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/145.jpg)
A B1Gbps
C1Gbps
flow 1
flow 2
flow 3
1 Gbps
1 Gbps
0 Mbps
Fairness and efficiency don’t always play along,
here an unfair allocation ends up more efficient
Total traffic is 2 Gbps!
![Page 146: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/146.jpg)
What is fair anyway?
![Page 147: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/147.jpg)
Equal-per-flow isn’t really fair as (A,C) crosses two links:
it uses more resources
A B1Gbps
C1Gbps
flow 1
flow 2
flow 3
500 Mbps
500 Mbps
500 Mbps
Total traffic is 1.5 Gbps
![Page 148: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/148.jpg)
With equal-per-flow, A ends up with 1 Gbps because it
sends 2 flows, while B ends up with 500 Mbps
Is it fair?
![Page 149: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/149.jpg)
Seeking an exact notion of fairness is not productive.
What matters is to avoid starvation.
equal-per-flow is good enough for this
![Page 150: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/150.jpg)
A B1Gbps
C10 Gbps
flow 1
flow 2
flow 3
Simply dividing the available bandwidth doesn’t work
in practice since flows can see different bottleneck
(A,B)
(B,C)
(A,B)
bottleneck link
![Page 151: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/151.jpg)
Intuitively, we want to give users with "small" demands
what they want, and evenly distribute the rest
Max-min fair allocation is such that
the lowest demand is maximized
after the lowest demand has been satisfied,
the second lowest demand is maximized
after the second lowest demand has been satisfied,
the third lowest demand is maximized
and so on…
![Page 152: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/152.jpg)
Start with all flows at rate 0
Done!
step 1
Increase the flows until there is
a new bottleneck in the network
Hold the fixed rate of the flows
that are bottlenecked
step 2
step 3
Go to step 2 for the remaining flowsstep 4
Max-min fair allocation can easily be computed
![Page 153: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/153.jpg)
Max-min fair allocation can be approximated
by slowly increasing W until a loss is detected
Progressively increase
the sending window size
Intuition
Whenever a loss is detected,
decrease the window size
Repeat
signal of congestion
max=receiving window
![Page 154: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/154.jpg)
lostpackets can get
corrupted
reordered
delayed
duplicated
Design a correct, timely, efficient and fair transport mechanism
knowing that
![Page 155: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/155.jpg)
Dealing with corruption is easy:
Rely on a checksum, treat corrupted packets as lost
![Page 156: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/156.jpg)
The effect of reordering depends on
the type of ACKing mechanism used
individual ACKs
full feedback
cumm. ACKs
no problem
no problem
create duplicate ACKs
why is it a problem?
![Page 157: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/157.jpg)
Long delays can create useless timeouts,
for all designs
![Page 158: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/158.jpg)
Packets duplicates can lead to duplicate ACKs whose
effects will depend on the ACKing mechanism used
individual ACKs
full feedback
cumm. ACKs
no problem
no problem
problematic
![Page 159: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/159.jpg)
lostpackets can get
corrupted
reordered
delayed
duplicated
Design a correct, timely, efficient and fair transport mechanism
knowing that
![Page 160: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/160.jpg)
Here is one correct, timely, efficient and fair
transport mechanism
retransmission
full information ACK
after timeout
ACKing
after k subsequent ACKs
window management additive increase upon successful delivery
multiple decrease when timeouts
We'll come back to this when we see TCP
![Page 161: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/161.jpg)
Reliable Transport
if-and-only if again
Correctness condition
Design space
Examples
Go-Back-N & Selective Repeat
3
timeliness vs efficiency vs …
![Page 162: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/162.jpg)
Go-Back-N (GBN) is a simple sliding window protocol
using cumulative ACKs
receiver should be as simple as possibleprinciple
delivers packets in-order to the upper layerreceiver
for each received segment,
ACK the last in-order packet delivered (cumulative)
upon timeout, resend all W packets
starting with the lost one
sender use a single timer to detect loss, reset at each new ACK
![Page 163: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/163.jpg)
Selective Repeat (SR) avoid unnecessary retransmissions
by using per-packet ACKs
avoids unnecessary retransmissionsprinciple
acknowledge each packet, in-order or notreceiver
buffer out-of-order packets
upon loss, only resend the lost packet
sender use per-packet timer to detect loss
see Book 3.4.3
![Page 164: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/164.jpg)
Let’s see how it works in practice
visually
http://www.ccs-labs.org/teaching/rn/animations/gbn_sr/
![Page 165: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/165.jpg)
timeliness vs efficiency vs …
Reliable Transport
if-and-only if again
Correctness condition
Design space
Examples
Go-Back-N & Selective Repeat
![Page 166: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/166.jpg)
Next week on Communication Networks
Ethernet and Switching
Source: Andrew Hart (Flickr)
![Page 167: Communication NetworksCommunication Networks Spring 2020 ETH Zürich (D-ITET) Laurent Vanbever March 2 2020 Materials inspired from Scott Shenker & Jennifer Rexford nsg.ee.ethz.ch](https://reader034.fdocuments.in/reader034/viewer/2022043003/5f826faf006a0e0f47027b96/html5/thumbnails/167.jpg)
Communication Networks
Spring 2020
ETH Zürich (D-ITET)
Laurent Vanbever
March 2 2020
nsg.ee.ethz.ch