Part 2 : reliable transmission and building a network

Olivier Bonaventure
Olivier BonaventureProfessor at Université catholique de Louvain (UCL) and co-founder at Tessares
Week 2
Reliable transmission
Building a network
Agenda
• Reliable transmission
• Checksums
• Framing
• Finite State Machines
• Go-back-n
• Selective repeat
• Building a network
Agenda
• Reliable transmission
• Checksums
• Framing
• Finite State Machines
• Go-back-n
• Selective repeat
• Building a network
Checksums
• How to verify that a transmission has not
been affected by random errors
• Checksum
• CRC
Question
• Which of these two techniques provides
the best error detection capability ?
• CRC
• Internet checksum
Question
• Where should we place the
CRC/checksum ?
Payload
Header Trailer
Question
• Should the Checksum/CRC also protect
the header ?
Payload
Header Trailer
Agenda
• Reliable transmission
• Checksums
• Framing
• Go-back-n
• Selective repeat
• Building a network
Question
• How to combine bit stuffing and
checksums ?
• Apply stuffing first and then compute
checksum on the sender
• Compute checksum and then apply
stuffing
Payload
Header Trailer
Agenda
• Reliable transmission
• Checksums
• Framing
• Finite State Machines
• Go-back-n
• Selective repeat
• Building a network
Alternating bit : sender
Go-back-n
Agenda
• Reliable transmission
• Checksums
• Framing
• Go-back-n
• Selective repeat
• Building a network
Go-back-n : example
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)
Question
• You implement a go-back-n receiver using 3 bits
to encode the sequence number. You have
correctly received frame 7 and delivered its
content. You now receive a correct frame 0, how
do you react ?
• you ignore the frame and send ACK(7)
• you accept the frame, deliver it and send
ACK(7)
• you accept the frame, deliver it and send
ACK(0)
Question
• Go-back-n is used in a network where all
data frames are correctly received, but
every second acknowledgement is
corrupted. How many data frames will be
retransmitted by the sender if it sends 20
data frames ?
Question
• Go-back-n is used by a protocol that
encodes sequence numbers using 5 bits.
What is the largest possible sending
window (in frames) ?
Question
• Go-back-n is used in a satellite network
with a round-trip-time of 1 sec. What is
the minimum sending window (in frames)
to fully use a 1 Mbps link using 10.000
bits frames ?
Agenda
• Reliable transmission
• Checksums
• Framing
• Go-back-n
• Selective repeat
• Building a network
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 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
Question
• You implement a selective repeat receiver using
3 bits to encode the sequence number. You have
correctly received frame 6 and delivered its
content. You receive a correct frame 1, what do
you do ?
• you ignore the frame and send ACK(6)
• you accept the frame, store it in your buffer
and send ACK(6)
• you accept the frame, store it in your buffer
and send ACK(1)
Question
• You implement a selective repeat receiver using
3 bits to encode the sequence number. You have
correctly received frame 7 and delivered its
content. You receive a correct frame 3, what do
you do ?
• you ignore the frame and send ACK(7)
• you accept the frame, store it in your buffer
and send ACK(7)
• you accept the frame, store it in your buffer
and send ACK(3)
Take back lessons
• Usage of Checksums/CRCs
• Finite State Machines
• Cumulative acknowledgements
• Maximum window size with GBN/SR
• Bandwidth x delay product
Piggybacking
Student question
• lorsque l’on utilise le piggybacking, comment est-ce
que l’on détermine que l’on peut envoyer à la fois
l’ACK de ce qu’on a reçu et envoyer la frame avec la
séquence propre à l’hôte qui envoie cet ACK ? Ma
question porte sur le mécanisme inhérent au
piggybacking. Je pense que ça doit être plutôt rare
d’avoir à envoyer le message pile au bon moment
pour faire d’une pierre deux coups et envoyer l'ACK
et la frame. Du coup est-ce qu’il y a un mécanisme
derrière qui attend que l'on ait à envoyer une frame
dans un court laps de temps suivant la réception
d’une frame ou bien est-ce simplement une
concordance des évènements qui fait que l’on
détermine alors qu’on peut envoyer les deux à la fois.
How to transfert
information ?
• Divide it in small blocks called packets
which can be sent independently
ABCDEFGHIJKLMNOPQRSTUVWXYZ1234
ABCDEFGHIJKLM
NOPQRSTUVW
XYZ1234
Agenda
• Reliable transmission
• Building a network
• Virtual circuit organisation
• Datagram organisation
• Distance vector routing
• Link state routing
How to organise a
network ?
Source: wikipedia : https://en.wikipedia.org/wiki/Post_office and https://en.wikipedia.org/wiki/Telephone_exchange
Agenda
• Reliable transmission
• Building a network
• Virtual circuit organisation
• Datagram organisation
• Distance vector routing
• Link state routing
Virtual circuit
• Basic idea
• Create circuits through the network to
transfer data divided in packets
• Packets contain one (or more) labels
• Simpler forwarding table
• incoming label, nexthop, outgoing
label
Virtual circuit
B
A R1
R2
R3
C
3 -> 5, South East
2 -> 3, South East
1 -> 2, North East
5 -> 2, South
East
3 -> 1, South
East
Agenda
• Reliable transmission
• Building a network
• Virtual circuit organisation
• Datagram organisation
• Distance vector routing
• Link state routing
Datagram
organisation
• Principles
• Two types of devices
• Hosts
• Routers
• Packet
• Source and destination addresses
A network
B
A R1
R2
R3
• Contents of the forwarding table
• Destination, nexthop/outgoing if
A: West
B: East
A: North
B: North-East
A: North
B: South-East
A simple solution
Port-station table
• When a node boots, its forwarding table
is empty, is it possible to learn
automatically the forwarding table from
the data packets ?
• Tree-shaped networks only !
A simple network
B
A R1
R2
R3
A->B
A: West
A->B A->B
A: North
A->B
A: North-West
B->A
B->A
B->A
Source routing
• Basic idea
• Each node has a unique address
• Each node knows its direct neighbours
• How ?
• Each packet contains the list of the
addresses of intermediate nodes
Source routing (2)
B
A R1
R2
R3
A: West
R2: South-West
R3: East
R1: North
R2: North-
East
B: South
R1: North-
West
R2: South-
West
A->B via R1,R3
A->B via R1,R3
A->B via R1,R3
B->A via R3,R2,R1
B->A via R3,R2,R1
B->A via R3,R2,R1
Can we do better ?
• Networks must be redundant to cope with
failures
• tree-shaped networks are not sufficient
• Source routing consummes header
space
Static routing
C
E
A B C
D E
Routing table
A : Local
D : South
B : East
C : East [via B]
E: East [via B]
Routing table
A : West
B : Local
C : East
D : South [via E]
E : South
Routing table
A : West [via B]
B : West
C : Local
D : West [via B]
E : South West
Routing table
A : North
B : North [via A]
C : East [via E]
D : Local
E : East
Routing table
A : North [via B]
B : North
C : North-East
D : West
E : Local
• Manually compute router forwarding
tables
Question
C
E
A B C
D E
Routing table
A : Local
D : South
B : East
C : East [via B]
E: East [via B]
Routing table
A : West
B : Local
C : East
D : South [via E]
E : South
Routing table
A : West [via B]
B : West
C : Local
D : West [via B]
E : South West
Routing table
A : North
B : North [via A]
C : East [via E]
D : Local
E : East
Routing table
A : North [via B]
B : North
C : North-East
D : West
E : Local
• Link A-B fails, which tables must be
updated ?
Agenda
• Reliable transmission
• Building a network
• Virtual circuit organisation
• Datagram organisation
• Distance vector routing
• Link state routing
Distance vector
routing
• Objectives of the routing protocol
• Automatically compute all forwarding
tables so that each node can reach any
node in the network
• Principle
• Each node regularly sends a summary
of its forwarding table to its neighbors
Distance vector
C
D E
Routing table
A : 0 [ Local ]
A B C
D E
Routing table
B : 0 [Local] Routing table
C : 0 [Local]
Routing table
E : 0 [Local]
Routing table
D : 0 [Local]
Cost=1
Cost=1
Cost=1
Cost=1
Cost=1
Cost=1
Distance vector
example (2)
C
D E
Routing table
A : 0 [ Local ]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
Routing table
C : 0 [Local]
Routing table
E : 0 [Local]
Routing table
D : 0 [Local]
A : 1 [North]
D=0 ; A=1
D=0 ; A=1
Distance vector
example (3)
C
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
Routing table
C : 0 [Local]
Routing table
E : 0 [Local]
D : 1 [West]
A : 2 [West]
Routing table
D : 0 [Local]
A : 1 [North]
C=0
C=0
Distance vector
example (4)
C
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
Routing table
C : 0 [Local]
Routing table
E : 0 [Local]
D : 1 [West]
A : 2 [West]
C : 1 [North-East]
Routing table
D : 0 [Local]
A : 1 [North]
E=0;D=1;A=2;C=1
E=0;D=1;A=2;C=1
E=0;D=1;A=2;C=1
Distance vector
example (5)
C
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
Routing table
C : 0 [Local]
E : 1 [South-West]
D : 2 [South-West]
A : 3 [South-West]
Routing table
E : 0 [Local]
D : 1 [West]
A : 2 [West]
C : 1 [North-East]
Routing table
D : 0 [Local]
A : 1 [North]
E : 1 [East]
C : 2 [East]
B=0;A=1;C=1;D=2;E=1
B=0;A=1;C=1;D=2;E=1
Distance vector
example (6)
C
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
B : 1 [East]
C : 2 [East]
E : 2 [East]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
Routing table
C : 0 [Local]
E : 1 [South-West]
D : 2 [South-West]
A : 2 [West]
B : 1 [West]
Routing table
E : 0 [Local]
D : 1 [West]
A : 2 [West]
C : 1 [North-East]
B : 1 [North]
Routing table
D : 0 [Local]
A : 1 [North]
E : 1 [East]
C : 2 [East]
A=0;B=1;C=2;D=1;E=2
Distance vector
example (7)
C
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
B : 1 [East]
C : 2 [East]
E : 2 [East]
A B C
D E
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
Routing table
C : 0 [Local]
E : 1 [South-West]
D : 2 [South-West]
A : 2 [West]
B : 1 [West]
Routing table
E : 0 [Local]
D : 1 [West]
A : 2 [West]
C : 1 [North-East]
B : 1 [North]
Routing table
D : 0 [Local]
A : 1 [North]
E : 1 [East]
C : 2 [East]
B : 2 [North]
Agenda
• Reliable transmission
• Building a network
• Datagram organisation
• Virtual circuit organisation
• Distance vector routing
• Link state routing
Link state routing
• Objectives of the routing protocol
• Compute all forwarding tables
• Principle
• Each node detects its direct neighbors
• Each node regularly sends the list of
its direct neighbors to all nodes
Discovering
neighbours
• Manually
• Automatically
E
A B
E
B:HELLO
A:HELLO
E:HELLO
Link state packets
• How to reliably send LSPs to all nodes ?
C
D E
Links
A-B : 1
A-D : 1
A B C
D E
Links
B-C : 1
C-E : 1
Links
E-D : 1
E-B : 1
E-C : 1
Links
A-D : 1
D-E : 1
Links
A-B : 1
B-E : 1
B-C : 1
Links
A-D : 1
D-E : 1
LSP : E [D:1];[B:1];[C:1]
LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1]
Distributing LSPs
• Naive approach
• Forward received LSP to all neighbors
C
D E
Links
A-B : 1
A-D : 1
A B C
D E
Links
B-C : 1
C-E : 1
B-E : 1
D-E : 1
Links
E-D : 1
E-B : 1
E-C : 1
Links
A-B : 1
B-E : 1
B-C : 1
E-D : 1
E-C : 1
Links
A-D : 1
D-E : 1
B-E : 1
E-C : 1
LSP : E [D:1];[B:1];[C:1]
LSP : E [D:1];[B:1];[C:1]
LSP : E [D:1];[B:1];[C:1]
With this approach, LSPs will loop forever...
Flooding
C
D E
Links
A-B : 1
A-D : 1
A B C
D E
Links
B-C : 1
C-E : 1
Links
E-D : 1
E-B : 1
E-C : 1
Links
A-D : 1
D-E : 1
Links
A-B : 1
B-E : 1
B-C : 1
Links
A-D : 1
D-E : 1
LSP : E-0 [D:1];[B:1];[C:1]
LSP : E-0 [D:1];[B:1];[C:1] LSP : E-0 [D:1];[B:1];[C:1]
LSPs
LSPs
LSPs
E-0 [D:1];[B:1];[C:1]
LSPs
LSPs
New LSP, flood
!
New LSP, flood
!
New
LSP, flood !
Flooding
C
D E
Links
A-B : 1
A-D : 1
A B C
D E
Links
B-C : 1
C-E : 1
B-E : 1
D-E : 1
Links
E-D : 1
E-B : 1
E-C : 1
Links
A-B : 1
B-E : 1
B-C : 1
E-D : 1
E-C : 1
Links
A-D : 1
D-E : 1
B-E : 1
E-C : 1
LSP : E-0 [D:1];[B:1];[C:1]
LSP : E-0 [D:1];[B:1];[C:1]
LSPs
E-0 [D:1];[B:1];[C:1]
LSPs
E-0 [D:1];[B:1];[C:1]
LSPs
E-0 [D:1];[B:1];[C:1]
LSPs
E-0 [D:1];[B:1];[C:1]
LSPs
LSP : E-0 [D:1];[B:1];[C:1]
A already
knows E-0
C already
knows E-0
After flooding
• Each node knows full network topology
• computes shortest paths from graph
C
D E
A B C
D E
Links
A-B, B-A : 1
B-E, E-B : 1
B-C, C-B : 1
E-D, D-E : 1
E-C, C-E : 1
A-D, D-A : 1
LSPs
E-0 [D:1];[B:1];[C:1]
A-0 [D:1];[B:1]
B-0 [A:1] [C:1] [E:1]
C-0 [B:1] [E:1]
D-0 [A:1] [E:1]
Links
A-B, B-A : 1
B-E, E-B : 1
B-C, C-B : 1
E-D, D-E : 1
E-C, C-E : 1
A-D, D-A : 1
LSPs
E-0 [D:1];[B:1];[C:1]
A-0 [D:1];[B:1]
B-0 [A:1] [C:1] [E:1]
C-0 [B:1] [E:1]
D-0 [A:1] [E:1]
Links
A-B, B-A : 1
B-E, E-B : 1
B-C, C-B : 1
E-D, D-E : 1
E-C, C-E : 1
A-D, D-A : 1
LSPs
E-0 [D:1];[B:1];[C:1]
A-0 [D:1];[B:1]
B-0 [A:1] [C:1] [E:1]
C-0 [B:1] [E:1]
D-0 [A:1] [E:1]
Links
A-B, B-A : 1
B-E, E-B : 1
B-C, C-B : 1
E-D, D-E : 1
E-C, C-E : 1
A-D, D-A : 1
LSPs
E-0 [D:1];[B:1];[C:1]
A-0 [D:1];[B:1]
B-0 [A:1] [C:1] [E:1]
C-0 [B:1] [E:1]
D-0 [A:1] [E:1]
Links
A-B, B-A : 1
B-E, E-B : 1
B-C, C-B : 1
E-D, D-E : 1
E-C, C-E : 1
A-D, D-A : 1
LSPs
E-0 [D:1];[B:1];[C:1]
A-0 [D:1];[B:1]
B-0 [A:1] [C:1] [E:1]
C-0 [B:1] [E:1]
D-0 [A:1] [E:1]
1 of 57

Recommended

2 reliability-network by
2 reliability-network2 reliability-network
2 reliability-networkOlivier Bonaventure
2.8K views47 slides
11 bgp-ethernet by
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernetOlivier Bonaventure
1.5K views59 slides
Computer Networking : Principles, Protocols and Practice - lesson 1 by
Computer Networking : Principles, Protocols and Practice - lesson 1Computer Networking : Principles, Protocols and Practice - lesson 1
Computer Networking : Principles, Protocols and Practice - lesson 1Olivier Bonaventure
9K views30 slides
Part 4 : reliable transport and sharing resources by
Part 4 : reliable transport and sharing resourcesPart 4 : reliable transport and sharing resources
Part 4 : reliable transport and sharing resourcesOlivier Bonaventure
70 views54 slides
Part 1 : reliable transmission by
Part 1 : reliable transmissionPart 1 : reliable transmission
Part 1 : reliable transmissionOlivier Bonaventure
259 views46 slides
Future Internet protocols by
Future Internet protocolsFuture Internet protocols
Future Internet protocolsOlivier Bonaventure
877 views53 slides

More Related Content

What's hot

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
9 ipv6-routing by
9 ipv6-routing9 ipv6-routing
9 ipv6-routingOlivier Bonaventure
2.8K views45 slides
Part 6 : Internet applications by
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applicationsOlivier Bonaventure
67 views83 slides
8 congestion-ipv6 by
8 congestion-ipv68 congestion-ipv6
8 congestion-ipv6Olivier Bonaventure
2K views40 slides
Part 3 : building a network and supporting applications by
Part 3 : building a network and supporting applicationsPart 3 : building a network and supporting applications
Part 3 : building a network and supporting applicationsOlivier Bonaventure
63 views63 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

What's hot(20)

Part 3 : building a network and supporting applications by Olivier Bonaventure
Part 3 : building a network and supporting applicationsPart 3 : building a network and supporting applications
Part 3 : building a network and supporting applications
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
Adhoc routing protocols by Senthil Kanth
Adhoc routing protocolsAdhoc routing protocols
Adhoc routing protocols
Senthil Kanth1.1K views
Transport Layer Part 1 by Tutun Juhana
Transport Layer Part 1Transport Layer Part 1
Transport Layer Part 1
Tutun Juhana1.4K views
Layer3protocols by assinha
Layer3protocolsLayer3protocols
Layer3protocols
assinha1.6K views
Network layer ip address assignment and routing by HamzahMohammed4
Network layer ip address assignment and routingNetwork layer ip address assignment and routing
Network layer ip address assignment and routing
HamzahMohammed4218 views

Similar to Part 2 : reliable transmission and building a network

Part6-network-routing.pptx by
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptxOlivier Bonaventure
12 views65 slides
4 transport-sharing by
4 transport-sharing4 transport-sharing
4 transport-sharingOlivier Bonaventure
1.9K views50 slides
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
Part7-routing.pptx by
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptxOlivier Bonaventure
11 views93 slides
5 sharing-app by
5 sharing-app5 sharing-app
5 sharing-appOlivier Bonaventure
2.2K views57 slides

Similar to Part 2 : reliable transmission and building a network(20)

IAP PPT-2.pptx by HirazNor
IAP PPT-2.pptxIAP PPT-2.pptx
IAP PPT-2.pptx
HirazNor6 views
Network layer by sbkbca
Network layerNetwork layer
Network layer
sbkbca219 views
Powerpoint one by pqatester
Powerpoint onePowerpoint one
Powerpoint one
pqatester223 views
Powerpoint one by pqatester
Powerpoint onePowerpoint one
Powerpoint one
pqatester515 views
Dc ch07 : error control and data link control by Syaiful Ahdan
Dc ch07 : error control and data link controlDc ch07 : error control and data link control
Dc ch07 : error control and data link control
Syaiful Ahdan77 views
CS553_ST7_Ch06-DigitalDataComm.ppt by AnandaSaikia1
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.ppt
AnandaSaikia11 view
Routing algorithm network layer by sambhenilesh
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layer
sambhenilesh14.8K views
Datagram Switching and Virtual Control Switching by Mustak Ahmmed
Datagram Switching and Virtual Control SwitchingDatagram Switching and Virtual Control Switching
Datagram Switching and Virtual Control Switching
Mustak Ahmmed298 views
Routing Presentation by Mohsin Ali
Routing PresentationRouting Presentation
Routing Presentation
Mohsin Ali5.2K views
NetworkAlgorithms.ppt by 21121A0594
NetworkAlgorithms.pptNetworkAlgorithms.ppt
NetworkAlgorithms.ppt
21121A05944 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
Part5-tcp-improvements.pptx by
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptxOlivier Bonaventure
12 views71 slides
Part8-ibgp.pptx by
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptxOlivier Bonaventure
10 views35 slides

Recently uploaded

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
ARNAB12.pdf by
ARNAB12.pdfARNAB12.pdf
ARNAB12.pdfArnabChakraborty499766
5 views83 slides
Amine el bouzalimi by
Amine el bouzalimiAmine el bouzalimi
Amine el bouzalimiAmine EL BOUZALIMI
5 views38 slides
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx by
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxCracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxLeasedLinesQuote
5 views8 slides
hamro digital logics.pptx by
hamro digital logics.pptxhamro digital logics.pptx
hamro digital logics.pptxtupeshghimire
11 views36 slides

Recently uploaded(10)

Part 2 : reliable transmission and building a network

  • 2. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  • 3. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  • 4. Checksums • How to verify that a transmission has not been affected by random errors • Checksum • CRC
  • 5. Question • Which of these two techniques provides the best error detection capability ? • CRC • Internet checksum
  • 6. Question • Where should we place the CRC/checksum ? Payload Header Trailer
  • 7. Question • Should the Checksum/CRC also protect the header ? Payload Header Trailer
  • 8. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  • 9. Question • How to combine bit stuffing and checksums ? • Apply stuffing first and then compute checksum on the sender • Compute checksum and then apply stuffing Payload Header Trailer
  • 10. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  • 13. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  • 14. Go-back-n : example 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)
  • 15. Question • You implement a go-back-n receiver using 3 bits to encode the sequence number. You have correctly received frame 7 and delivered its content. You now receive a correct frame 0, how do you react ? • you ignore the frame and send ACK(7) • you accept the frame, deliver it and send ACK(7) • you accept the frame, deliver it and send ACK(0)
  • 16. Question • Go-back-n is used in a network where all data frames are correctly received, but every second acknowledgement is corrupted. How many data frames will be retransmitted by the sender if it sends 20 data frames ?
  • 17. Question • Go-back-n is used by a protocol that encodes sequence numbers using 5 bits. What is the largest possible sending window (in frames) ?
  • 18. Question • Go-back-n is used in a satellite network with a round-trip-time of 1 sec. What is the minimum sending window (in frames) to fully use a 1 Mbps link using 10.000 bits frames ?
  • 19. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  • 20. 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 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
  • 21. Question • You implement a selective repeat receiver using 3 bits to encode the sequence number. You have correctly received frame 6 and delivered its content. You receive a correct frame 1, what do you do ? • you ignore the frame and send ACK(6) • you accept the frame, store it in your buffer and send ACK(6) • you accept the frame, store it in your buffer and send ACK(1)
  • 22. Question • You implement a selective repeat receiver using 3 bits to encode the sequence number. You have correctly received frame 7 and delivered its content. You receive a correct frame 3, what do you do ? • you ignore the frame and send ACK(7) • you accept the frame, store it in your buffer and send ACK(7) • you accept the frame, store it in your buffer and send ACK(3)
  • 23. Take back lessons • Usage of Checksums/CRCs • Finite State Machines • Cumulative acknowledgements • Maximum window size with GBN/SR • Bandwidth x delay product
  • 24. Piggybacking Student question • lorsque l’on utilise le piggybacking, comment est-ce que l’on détermine que l’on peut envoyer à la fois l’ACK de ce qu’on a reçu et envoyer la frame avec la séquence propre à l’hôte qui envoie cet ACK ? Ma question porte sur le mécanisme inhérent au piggybacking. Je pense que ça doit être plutôt rare d’avoir à envoyer le message pile au bon moment pour faire d’une pierre deux coups et envoyer l'ACK et la frame. Du coup est-ce qu’il y a un mécanisme derrière qui attend que l'on ait à envoyer une frame dans un court laps de temps suivant la réception d’une frame ou bien est-ce simplement une concordance des évènements qui fait que l’on détermine alors qu’on peut envoyer les deux à la fois.
  • 25. How to transfert information ? • Divide it in small blocks called packets which can be sent independently ABCDEFGHIJKLMNOPQRSTUVWXYZ1234 ABCDEFGHIJKLM NOPQRSTUVW XYZ1234
  • 26. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  • 27. How to organise a network ? Source: wikipedia : https://en.wikipedia.org/wiki/Post_office and https://en.wikipedia.org/wiki/Telephone_exchange
  • 28. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  • 29. Virtual circuit • Basic idea • Create circuits through the network to transfer data divided in packets • Packets contain one (or more) labels • Simpler forwarding table • incoming label, nexthop, outgoing label
  • 30. Virtual circuit B A R1 R2 R3 C 3 -> 5, South East 2 -> 3, South East 1 -> 2, North East 5 -> 2, South East 3 -> 1, South East
  • 31. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  • 32. Datagram organisation • Principles • Two types of devices • Hosts • Routers • Packet • Source and destination addresses
  • 33. A network B A R1 R2 R3 • Contents of the forwarding table • Destination, nexthop/outgoing if A: West B: East A: North B: North-East A: North B: South-East
  • 34. A simple solution Port-station table • When a node boots, its forwarding table is empty, is it possible to learn automatically the forwarding table from the data packets ? • Tree-shaped networks only !
  • 35. A simple network B A R1 R2 R3 A->B A: West A->B A->B A: North A->B A: North-West B->A B->A B->A
  • 36. Source routing • Basic idea • Each node has a unique address • Each node knows its direct neighbours • How ? • Each packet contains the list of the addresses of intermediate nodes
  • 37. Source routing (2) B A R1 R2 R3 A: West R2: South-West R3: East R1: North R2: North- East B: South R1: North- West R2: South- West A->B via R1,R3 A->B via R1,R3 A->B via R1,R3 B->A via R3,R2,R1 B->A via R3,R2,R1 B->A via R3,R2,R1
  • 38. Can we do better ? • Networks must be redundant to cope with failures • tree-shaped networks are not sufficient • Source routing consummes header space
  • 39. Static routing C E A B C D E Routing table A : Local D : South B : East C : East [via B] E: East [via B] Routing table A : West B : Local C : East D : South [via E] E : South Routing table A : West [via B] B : West C : Local D : West [via B] E : South West Routing table A : North B : North [via A] C : East [via E] D : Local E : East Routing table A : North [via B] B : North C : North-East D : West E : Local • Manually compute router forwarding tables
  • 40. Question C E A B C D E Routing table A : Local D : South B : East C : East [via B] E: East [via B] Routing table A : West B : Local C : East D : South [via E] E : South Routing table A : West [via B] B : West C : Local D : West [via B] E : South West Routing table A : North B : North [via A] C : East [via E] D : Local E : East Routing table A : North [via B] B : North C : North-East D : West E : Local • Link A-B fails, which tables must be updated ?
  • 41. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  • 42. Distance vector routing • Objectives of the routing protocol • Automatically compute all forwarding tables so that each node can reach any node in the network • Principle • Each node regularly sends a summary of its forwarding table to its neighbors
  • 43. Distance vector C D E Routing table A : 0 [ Local ] A B C D E Routing table B : 0 [Local] Routing table C : 0 [Local] Routing table E : 0 [Local] Routing table D : 0 [Local] Cost=1 Cost=1 Cost=1 Cost=1 Cost=1 Cost=1
  • 44. Distance vector example (2) C D E Routing table A : 0 [ Local ] A B C D E Routing table B : 0 [Local] A : 1 [West] Routing table C : 0 [Local] Routing table E : 0 [Local] Routing table D : 0 [Local] A : 1 [North] D=0 ; A=1 D=0 ; A=1
  • 45. Distance vector example (3) C D E Routing table A : 0 [ Local ] D : 1 [South] A B C D E Routing table B : 0 [Local] A : 1 [West] Routing table C : 0 [Local] Routing table E : 0 [Local] D : 1 [West] A : 2 [West] Routing table D : 0 [Local] A : 1 [North] C=0 C=0
  • 46. Distance vector example (4) C D E Routing table A : 0 [ Local ] D : 1 [South] A B C D E Routing table B : 0 [Local] A : 1 [West] C : 1 [East] Routing table C : 0 [Local] Routing table E : 0 [Local] D : 1 [West] A : 2 [West] C : 1 [North-East] Routing table D : 0 [Local] A : 1 [North] E=0;D=1;A=2;C=1 E=0;D=1;A=2;C=1 E=0;D=1;A=2;C=1
  • 47. Distance vector example (5) C D E Routing table A : 0 [ Local ] D : 1 [South] A B C D E Routing table B : 0 [Local] A : 1 [West] C : 1 [East] E : 1 [South] D : 2 [South] Routing table C : 0 [Local] E : 1 [South-West] D : 2 [South-West] A : 3 [South-West] Routing table E : 0 [Local] D : 1 [West] A : 2 [West] C : 1 [North-East] Routing table D : 0 [Local] A : 1 [North] E : 1 [East] C : 2 [East] B=0;A=1;C=1;D=2;E=1 B=0;A=1;C=1;D=2;E=1
  • 48. Distance vector example (6) C D E Routing table A : 0 [ Local ] D : 1 [South] B : 1 [East] C : 2 [East] E : 2 [East] A B C D E Routing table B : 0 [Local] A : 1 [West] C : 1 [East] E : 1 [South] D : 2 [South] Routing table C : 0 [Local] E : 1 [South-West] D : 2 [South-West] A : 2 [West] B : 1 [West] Routing table E : 0 [Local] D : 1 [West] A : 2 [West] C : 1 [North-East] B : 1 [North] Routing table D : 0 [Local] A : 1 [North] E : 1 [East] C : 2 [East] A=0;B=1;C=2;D=1;E=2
  • 49. Distance vector example (7) C D E Routing table A : 0 [ Local ] D : 1 [South] B : 1 [East] C : 2 [East] E : 2 [East] A B C D E Routing table B : 0 [Local] A : 1 [West] C : 1 [East] E : 1 [South] D : 2 [South] Routing table C : 0 [Local] E : 1 [South-West] D : 2 [South-West] A : 2 [West] B : 1 [West] Routing table E : 0 [Local] D : 1 [West] A : 2 [West] C : 1 [North-East] B : 1 [North] Routing table D : 0 [Local] A : 1 [North] E : 1 [East] C : 2 [East] B : 2 [North]
  • 50. Agenda • Reliable transmission • Building a network • Datagram organisation • Virtual circuit organisation • Distance vector routing • Link state routing
  • 51. Link state routing • Objectives of the routing protocol • Compute all forwarding tables • Principle • Each node detects its direct neighbors • Each node regularly sends the list of its direct neighbors to all nodes
  • 53. Link state packets • How to reliably send LSPs to all nodes ? C D E Links A-B : 1 A-D : 1 A B C D E Links B-C : 1 C-E : 1 Links E-D : 1 E-B : 1 E-C : 1 Links A-D : 1 D-E : 1 Links A-B : 1 B-E : 1 B-C : 1 Links A-D : 1 D-E : 1 LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1]
  • 54. Distributing LSPs • Naive approach • Forward received LSP to all neighbors C D E Links A-B : 1 A-D : 1 A B C D E Links B-C : 1 C-E : 1 B-E : 1 D-E : 1 Links E-D : 1 E-B : 1 E-C : 1 Links A-B : 1 B-E : 1 B-C : 1 E-D : 1 E-C : 1 Links A-D : 1 D-E : 1 B-E : 1 E-C : 1 LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1] With this approach, LSPs will loop forever...
  • 55. Flooding C D E Links A-B : 1 A-D : 1 A B C D E Links B-C : 1 C-E : 1 Links E-D : 1 E-B : 1 E-C : 1 Links A-D : 1 D-E : 1 Links A-B : 1 B-E : 1 B-C : 1 Links A-D : 1 D-E : 1 LSP : E-0 [D:1];[B:1];[C:1] LSP : E-0 [D:1];[B:1];[C:1] LSP : E-0 [D:1];[B:1];[C:1] LSPs LSPs LSPs E-0 [D:1];[B:1];[C:1] LSPs LSPs New LSP, flood ! New LSP, flood ! New LSP, flood !
  • 56. Flooding C D E Links A-B : 1 A-D : 1 A B C D E Links B-C : 1 C-E : 1 B-E : 1 D-E : 1 Links E-D : 1 E-B : 1 E-C : 1 Links A-B : 1 B-E : 1 B-C : 1 E-D : 1 E-C : 1 Links A-D : 1 D-E : 1 B-E : 1 E-C : 1 LSP : E-0 [D:1];[B:1];[C:1] LSP : E-0 [D:1];[B:1];[C:1] LSPs E-0 [D:1];[B:1];[C:1] LSPs E-0 [D:1];[B:1];[C:1] LSPs E-0 [D:1];[B:1];[C:1] LSPs E-0 [D:1];[B:1];[C:1] LSPs LSP : E-0 [D:1];[B:1];[C:1] A already knows E-0 C already knows E-0
  • 57. After flooding • Each node knows full network topology • computes shortest paths from graph C D E A B C D E Links A-B, B-A : 1 B-E, E-B : 1 B-C, C-B : 1 E-D, D-E : 1 E-C, C-E : 1 A-D, D-A : 1 LSPs E-0 [D:1];[B:1];[C:1] A-0 [D:1];[B:1] B-0 [A:1] [C:1] [E:1] C-0 [B:1] [E:1] D-0 [A:1] [E:1] Links A-B, B-A : 1 B-E, E-B : 1 B-C, C-B : 1 E-D, D-E : 1 E-C, C-E : 1 A-D, D-A : 1 LSPs E-0 [D:1];[B:1];[C:1] A-0 [D:1];[B:1] B-0 [A:1] [C:1] [E:1] C-0 [B:1] [E:1] D-0 [A:1] [E:1] Links A-B, B-A : 1 B-E, E-B : 1 B-C, C-B : 1 E-D, D-E : 1 E-C, C-E : 1 A-D, D-A : 1 LSPs E-0 [D:1];[B:1];[C:1] A-0 [D:1];[B:1] B-0 [A:1] [C:1] [E:1] C-0 [B:1] [E:1] D-0 [A:1] [E:1] Links A-B, B-A : 1 B-E, E-B : 1 B-C, C-B : 1 E-D, D-E : 1 E-C, C-E : 1 A-D, D-A : 1 LSPs E-0 [D:1];[B:1];[C:1] A-0 [D:1];[B:1] B-0 [A:1] [C:1] [E:1] C-0 [B:1] [E:1] D-0 [A:1] [E:1] Links A-B, B-A : 1 B-E, E-B : 1 B-C, C-B : 1 E-D, D-E : 1 E-C, C-E : 1 A-D, D-A : 1 LSPs E-0 [D:1];[B:1];[C:1] A-0 [D:1];[B:1] B-0 [A:1] [C:1] [E:1] C-0 [B:1] [E:1] D-0 [A:1] [E:1]