Computer networking
Olivier Bonaventure
http://perso.uclouvain.be/olivier.bonaventure
Teaching material
• Third edition, work in progress
https://beta.computer-networking.info
• Feedback/Fixes/Suggestions/Comments
• http://github.com/cnp3/ebook
Question
• What are the topics that you expect to
learn during this course ?
Course structure
• Principles first
• reliable transfer, building a network,
sharing resources, serving applications,
security
• Protocols in details
• HTTP, SMTP, DNS, TLS, TCP, SCTP, UDP,
IPv6, MPLS, RIP, OSPF, BGP, Ethernet, WiFi
• Practice
• Learning by doing
Course organisation
• First pass on the week topic (Thursday)
• Students read book and prepare exercises
• Inginious questions
• Multiple choice questions
• Some weeks : practical exercises as well
• Discussion with teaching assistants (Wed/Fri)
• Second pass on the week topics (Thursday)
Course evaluation
• Programming project (20%)
• implement one protocol due end March
(15%)
• Review of code (5%)
• Web site Analysis (15%)
• Analyze the optimizations of a website (-
>May)
• Exam
• Both exercises and theory (65%)
Question
• During this course, we will describe all the
components of the Internet, but when
was this network created?
ARPANet
First ARPANet message, Oct. 29, 1969
https://en.wikipedia.org/wiki/ARPANET
Question
• When (year) were the first public web
servers launched ?
https://home.cern/science/computing/birth-web/short-history-
web
Internet versus web
https://www.reddit.com/r/pcmasterrace/comments/b086lz/tim_bernerslee_and_vint_cerf_w
earing_funny_shirts/
Question
• What is the average size of a web page
(in bytes) ?
https://httparchive.org/reports/page-weight
Connecting two hosts
Question
• What are the technologies that allow to
connect two computers together ?
Question
• What is the bandwidth that you can
achieve on a telephone line over a several
kilometers ?
VDSL and G.Fast
https://techzine.alcatel-lucent.com/fixed-access-stay-ahead-ultra-broadband-
curve
Question
• What is the bandwidth that you can
achieve using current wireless (4G/5G,
Wi-Fi) networks ?
Question
• What is the bandwidth that you can
achieve on an optical fiber ?
Optical fiber
http://www.nature.com/nphoton/journal/v7/n5/fig_tab/nphoton.2013.94_F1.html
Question
• What is the minimum delay (in msec)
required to transmit one byte from
Louvain-la-Neuve to Barcelone (+-1000
km) ?
The physical layer
• Transmitting bits over a wire
• Time sequence diagram
The physical layer
service
• unreliable service
• transmission errors
• loss/creation of bits
Physical layer Physical layer
Physical transmission medium
Bits
010100010100010101001010
Time sequence
diagram
• How to represent the operation of the
physical layer ?
A B
Data.request(0)
0
Data.ind(0)
Data.request(1)
Data.ind(1)
Data.request(1)
Data.ind(1)
1
1
Time sequence
diagram
• How to represent the unreliablity of the
physical layer ?
A B
Data.request(0)
0
Data.ind(0)
Data.request(1)
Data.ind(1)
Data.request(1)
Data.ind(1)
0
1
Time sequence
diagram
• How to represent the fact that the
physical layer can loose bits ?
A B
Data.request(0)
0
Data.ind(0)
Data.request(1)
Data.request(1)
Data.ind(1)
1
Time sequence
diagram
• How to represent the fact that the
physical layer can create bits ?
A B
Data.request(0)
0
Data.ind(0)
Data.request(1)
Data.ind(1)
1
Data.ind(1)
Data.request(0)
0
Data.ind(0)
Exchanging frames
• From a software viewpoint, it is much
easier to consider that hosts exchange
frames
Payload
Header Trailer
The framing problem
• How to extract variable length frames
from a sequence of bits ?
• Bit stuffing
• Character stuffing
How to reliably
transfer data ?
• Hypothesis
• Reliable physical layer service
A B
Data.request(a) Frame(a)
Data.ind(a)
Data.request(b) Frame(b)
Data.ind(b)
Data.request(c) Frame(c)
Data.ind(c)
Does this always work
?
Question
• What do we need to add to our “reliable”
transfer to allow a datacenter to adapt its
transmission rate to a raspeberry pi ?
Finite State Machine
• Sender
• Receiver
Control frames
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
Data.ind(b)
C(OK)
Payload
Header Trailer
Question
• Two hosts are connected with a 1 Gbps
(10^9 bits/sec) link. It takes one msec to
send a frame from host A to host B. What
is the bandwidth that this protocol will
achieve (in bits per second) ?
How to deal with
transmission errors ?
• The receiver must be able to detect that
the content of a frame has been modified
• Checksum, CRC
Question
• How should a host react when it receives
a frame with an incorrect checksum ?
Coping with errors
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
D(b)
Data.ind(b)
start timer
timer expires
Coping with errors
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
D(b)
Data.ind(b)
start timer
timer expires
C(OK) Data.ind(b)
Alternating Bit
Protocol
A B
Data.req(b) C(OK0) Data.ind(a)
D(0,a)
Data.req(a)
Duplicate detected
D(1,b)
Retransmission timer
D(1,b)
Data.ind(b)
Data.req(c)
Lost
D(0,c)
C(OK1)
D(1,b) recvd
C(OK1)
D(1,b) recvd
Retransmission timer
Data.ind(c)
D(0,c)
Pipelining
• How many frames can A send ?
A B
Data.ind(a)
Data.req(a)
...
D(0,a)
...
D(4,e)
Data.req(b)
Data.req(e)
Data.ind(e)
Pipelining example
A B
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 Data.req(a)
Data.ind(a)
D(0,a)
0 1 2 3 4 5 6 7 8 Data.req(b)
Data.ind(b)
D(1,b)
0 1 2 3 4 5 6 7 8
Data.req(c)
Data.ind(c)
D(2,c)
C(OK0)
C(OK1)
C(OK2)
0 1 2 3 4 5 6 7 8
Data.req(d)
Data.ind(d)
D(3,d)
0 1 2 3 4 5 6 7 8
Data.req(e)
D(4,e)
Sending window
Sequence numbers
can be reused
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.req(a)
Data.ind(a)
D(0,a)
Data.req(b)
Data.ind(b)
D(1,b)
Data.req(c)
Data.ind(c)
D(2,c)
C(OK0)
C(OK1)
C(OK2)
Data.req(d)
Data.ind(d)
D(3,d)
Data.req(e)
D(0,e)
Sending window
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
How to deal with
errors/frame losses ?
• Go-back-n
• Selective repeat
Go-back-n
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.req(e)
Data.req(a)
Data.ind(a)
D(0,a)
Data.req(c)
D(2,c)
C(OK,0)
C(OK,0)
Sending window
Data.req(b)
D(1,b)
Lost
Not expected seq num,
discarded
Retransmission
timer expires
Sending window is full
0 1 2 3
0 1 2 3
D(1,b)
Data.ind(b)
Data.req(d)
D(3,d)
Data.ind(d)
D(2,c)
Data.ind(c)
Selective repeat
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.ind(b)
Data.req(a)
Data.ind(a)
D(0,a)
0 1 2 3
Data.req(c)
D(2,c)
C(OK,0)
C(OK,0)
Sending window
Data.req(b)
D(1,b)
Lost frame
Frame stored
D(1,b)
Retransmission
timer expires
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.ind(c)
Data.req(d)
D(3,d)
Data.ind(d)
0 1 2 3
0 1 2 3
C(OK,2)
C(OK,3)
Rec. window
0 1 2 3
0 1 2 3

Part 1 : reliable transmission

Editor's Notes

  • #31 Morse telegraph - 1940 110 Bps AT&T 1950 300 BPs AT&T http://www.history-computer.com/ModernComputer/Basis/modem.html 1988 : Robotics 9600 bps https://en.wikipedia.org/wiki/File:Fax_modem_antigo.jpg Minitel : années 1980