2. Agenda
ā¢ Reliable transmission
ā¢ Checksums and hash functions
ā¢ Framing
ā¢ Go-back-n
ā¢ Selective repeat
ā¢ Building a network
3. Agenda
ā¢ Reliable transmission
ā¢ Checksums and hash functions
ā¢ Framing
ā¢ 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
ā¢ Should the Checksum/CRC also cover the
header ?
5. Hash functions
ā¢ What is the role of hash functions like MD5
or SHA-1 ?
ā¢ Do they play the same role as CRCs and
checksums ?
6. Agenda
ā¢ Reliable transmission
ā¢ Checksums and hash functions
ā¢ Framing
ā¢ Go-back-n
ā¢ Selective repeat
ā¢ Building a network
7. Bit stuffing
ā¢ How to combine bit stuffing and checksums
?
ā¢ Stuffing first and then compute checksum
or
ā¢ Compute checksum and then stuffing
8. Character stuffing
ā¢ What are the advantages/drawbacks of
character stuffing compared to bit stuffing ?
9. Agenda
ā¢ Reliable transmission
ā¢ Checksums and hash functions
ā¢ Framing
ā¢ Go-back-n
ā¢ Selective repeat
ā¢ Building a network
10. Go-back-n
ā¢ What are the key principles behind go-back-
n ?
ā¢ How does it deal with losses/errors ?
ā¢ How does it deal with losses of
acknowledgements ?
ā¢ How to set the retransmission timer ?
11. 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(a)
Data.req(e)
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
0 1 2 3
0 1 2 3
Sending window is full
D(1,b)
Data.ind(b)
Data.req(d)
D(3,d)
Data.ind(d)
D(2,c)
Data.ind(c)
12. Maximum window
ā¢ What is the maximum window size that
can be used with go-back-n ?
ā¢ Sequence numbers are encoded in N bits
13. Agenda
ā¢ Reliable transmission
ā¢ Checksums and hash functions
ā¢ Framing
ā¢ Go-back-n
ā¢ Selective repeat
ā¢ Building a network
14. Selective repeat
ā¢ What are the key principles behind
selective repeat ?
ā¢ How does it deal with losses/errors ?
ā¢ How does it deal with losses of
acknowledgements ?
ā¢ How to inform about losses ?
ā¢ How to set the retransmission timer ?
16. Maximum window
ā¢ What is the maximum window size that
can be used with selective repeat ?
ā¢ Sequence numbers are encoded in N bits
17. Performance with
losses ā¢ What is the minimum window size required
to achieve high throughput
ā¢ When there are no losses ?
ā¢ When a few frames are errored/lost ?
ā¢ Go-back-n
ā¢ Selective repeat
18. Take back lessons
ā¢ Usage of Checksums/CRCs
ā¢ Cumulative acknowledgements
ā¢ Maximum window size with gbn/sr
ā¢ Bandwidth x delay product
19. ā¢ Reliable tranAsmigsseionnda
ā¢ Building a network
ā¢ Datagram organisation
ā¢ Virtual circuit organisation
ā¢ Distance vector routing
ā¢ Link state routing
21. Forwarding table
ā¢ Contents of the forwarding table
ā¢ Destination, nexthop/outgoing if
ā¢ How to compute the forwarding table ?
22. Port-station table
ā¢ When a node boots, its forwarding table is
empty, is it possible to learn automatically
the forwarding table from the packets ?
ā¢ Tree-shaped networks only !
24. 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
25. A network
B
A R1
R2
R3
How can A discover the paths towards B ?
26. ā¢ Reliable tranAsmigsseionnda
ā¢ Building a network
ā¢ Datagram organisation
ā¢ Virtual circuit organisation
ā¢ Distance vector routing
ā¢ Link state routing
27. Virtual circuit
ā¢ Basic idea
ā¢ Create circuits through the network to
transfer data divided in packets
ā¢ Packet contains one label
ā¢ Simpler forwarding table
ā¢ incoming label, nexthop, outgoing label
28. Virtual circuit
B
A R1
R2
R3
Create one virtual circuit from A to B
C
29. ā¢ Reliable tranAsmigsseionnda
ā¢ Building a network
ā¢ Datagram organisation
ā¢ Virtual circuit organisation
ā¢ Distance vector routing
ā¢ Link state routing
30. Computing forwarding
tables
ā¢ How to compute the forwarding tables for
all nodes in a network ?
C
A B C
E
D E
31. Computing forwarding
tables
ā¢
ā¢ A B C
C
E
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
Cost=1
Cost=1 Cost=1
Cost=1
Cost=1
Cost=1
32. Distance vector routing
ā¢ Objectives of the routing protocol
ā¢ Compute forwarding tables so that all
nodes can reach all nodes in the network
ā¢ Principle
ā¢ Each node regularly sends a summary of
its forwarding table to its neighbours
33. Distance vector
Routing table
B : 0 [Local] Routing table
C
D E
Routing table
A : 0 [ Local ]
A B C
D E
C : 0 [Local]
Routing table
E : 0 [Local]
Routing table
D : 0 [Local]
34. Distance vector
example (2)
C
Routing table
B : 0 [Local]
A : 1 [West]
D E
Routing table
A : 0 [ Local ]
A B C
D E
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
35. Distance vector
example (3)
C
Routing table
B : 0 [Local]
A : 1 [West]
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
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
36. Distance vector
example (4)
C
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E=0;D=1;A=2;C=1
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
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
37. Distance vector
example (5)
C
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
D E
Routing table
A : 0 [ Local ]
D : 1 [South]
A B C
D E
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
38. Distance vector
example (6)
C
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
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
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
39. Distance vector
example (7)
C
Routing table
B : 0 [Local]
A : 1 [West]
C : 1 [East]
E : 1 [South]
D : 2 [South]
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
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]
40. ā¢ Reliable tranAsmigsseionnda
ā¢ Building a network
ā¢ Datagram organisation
ā¢ Virtual circuit organisation
ā¢ Distance vector routing
ā¢ Link state routing
41. Link state routing
ā¢ Objectives of the routing protocol
ā¢ Compute all forwarding tables
ā¢ Principle
ā¢ Each node detects its neighbours
ā¢ Each node regularly sends list of its
neighbours to all nodes
43. Link state packets
C
Links
A-B : 1
B-E : 1
B-C : 1
A B C
LSP : E [D:1];[B:1];[C:1] LSP : E [D:1];[B:1];[C:1]
D E
Links
A-B : 1
A-D : 1
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
LSP : E [D:1];[B:1];[C:1]
ā¢ How to reliably send LSPs to all nodes ?
44. Flooding
ā¢ Naive approach
ā¢ Send received LSP to all neighbours
C
D E
Links
A-B : 1
A-D : 1
LSP : E [D:1];[B:1];[C: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]
45. Flooding
LSPs LSPs
C
LSP : E-0 [D:1];[B:1];[C:1] LSP : E-0 [D:1];[B:1];[C:1]
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
LSPs
Links
A-D : 1
D-E : 1
Links
A-B : 1
B-E : 1
B-C : 1
LSP : E-0 [D:1];[B:1];[C:1]
LSPs
LSPs
E-0 [D:1];[B:1];[C:1]