2 reliability-network
DESCRIPTION
Second lesson of the computer networks course given at UCL on the basis of the 'Computer Networking : Principles and Practice' ebookTRANSCRIPT
![Page 1: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/1.jpg)
Week 2Reliable transmissionBuilding a network
![Page 2: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/2.jpg)
Agenda
•Reliable transmission
•Checksums and hash functions
•Framing
•Go-back-n
•Selective repeat
•Building a network
![Page 3: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/3.jpg)
Agenda
•Reliable transmission
•Checksums and hash functions
•Framing
•Go-back-n
•Selective repeat
•Building a network
![Page 4: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/4.jpg)
Checksums
•How to verify that a transmission has not been affected by random errors
•Checksum
•CRC
•Should the Checksum/CRC also cover the header ?
![Page 5: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/5.jpg)
Hash functions
•What is the role of hash functions like MD5 or SHA-1 ?
•Do they play the same role as CRCs and checksums ?
![Page 6: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/6.jpg)
Agenda
•Reliable transmission
•Checksums and hash functions
•Framing
•Go-back-n
•Selective repeat
•Building a network
![Page 7: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/7.jpg)
Bit stuffing
•How to combine bit stuffing and checksums ?
•Stuffing first and then compute checksum or
•Compute checksum and then stuffing
![Page 8: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/8.jpg)
Character stuffing
•What are the advantages/drawbacks of character stuffing compared to bit stuffing ?
![Page 9: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/9.jpg)
Agenda
•Reliable transmission
•Checksums and hash functions
•Framing
•Go-back-n
•Selective repeat
•Building a network
![Page 10: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/10.jpg)
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 ?
![Page 11: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/11.jpg)
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
Retransmissiontimer 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)
![Page 12: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/12.jpg)
Maximum window
•What is the maximum window size that can be used with go-back-n ?
•Sequence numbers are encoded in N bits
![Page 13: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/13.jpg)
Agenda
•Reliable transmission
•Checksums and hash functions
•Framing
•Go-back-n
•Selective repeat
•Building a network
![Page 14: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/14.jpg)
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 ?
![Page 15: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/15.jpg)
Selective repeatA 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 segment
Segment stored
D(1,b)
Retransmissiontimer expires0 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. window0 1 2 3
0 1 2 3
![Page 16: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/16.jpg)
Maximum window
•What is the maximum window size that can be used with selective repeat ?
•Sequence numbers are encoded in N bits
![Page 17: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/17.jpg)
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
![Page 18: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/18.jpg)
Take back lessons
•Usage of Checksums/CRCs
•Cumulative acknowledgements
•Maximum window size with gbn/sr
•Bandwidth x delay product
![Page 19: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/19.jpg)
Agenda
•Reliable transmission
•Building a network
•Datagram organisation
•Virtual circuit organisation
•Distance vector routing
•Link state routing
![Page 20: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/20.jpg)
Datagram organisation
•Principles
•Nodes
•Hosts
•Routers
•Packet
![Page 21: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/21.jpg)
Forwarding table
•Contents of the forwarding table
•Destination, nexthop/outgoing if
•How to compute the forwarding table ?
![Page 22: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/22.jpg)
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 !
![Page 23: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/23.jpg)
A network
B
A R1
R2
R3
![Page 24: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/24.jpg)
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
![Page 25: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/25.jpg)
A network
B
A R1
R2
R3
How can A discover the paths towards B ?
![Page 26: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/26.jpg)
Agenda
•Reliable transmission
•Building a network
•Datagram organisation
•Virtual circuit organisation
•Distance vector routing
•Link state routing
![Page 27: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/27.jpg)
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
![Page 28: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/28.jpg)
Virtual circuit
B
A R1
R2
R3
Create one virtual circuit from A to B
C
![Page 29: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/29.jpg)
Agenda
•Reliable transmission
•Building a network
•Datagram organisation
•Virtual circuit organisation
•Distance vector routing
•Link state routing
![Page 30: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/30.jpg)
Computing forwarding tables•How to compute the forwarding
tables for all nodes in a network ?
C
E
A B C
D E
![Page 31: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/31.jpg)
Computing forwarding tables
•
•
C
E
A B C
D E
Routing tableA : LocalD : SouthB : East
C : East [via B]
E: East [via B]
Routing tableA : WestB : LocalC : EastD : South [via E]
E : South
Routing tableA : West [via
B]B : WestC : Local
D : West [via B]
E : South West
Routing tableA : NorthB : North [via A]
C : East [via E]
D : LocalE : East
Routing tableA : North [via B]B : NorthC : North-
EastD : WestE : Local
Cost=1
Cost=1 Cost=1
Cost=1
Cost=1Cost=1
![Page 32: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/32.jpg)
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
![Page 33: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/33.jpg)
Distance vector
C
D E
Routing tableA : 0 [ Local
]
A B C
D E
Routing tableB : 0 [Local] Routing table
C : 0 [Local]
Routing table
E : 0 [Local]
Routing tableD : 0 [Local]
![Page 34: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/34.jpg)
Distance vector
example (2)
C
D E
Routing tableA : 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
![Page 35: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/35.jpg)
Distance vector
example (3)
C
D E
Routing tableA : 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
![Page 36: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/36.jpg)
Distance vector
example (4)
C
D E
Routing tableA : 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 tableE : 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
![Page 37: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/37.jpg)
Distance vector
example (5)
C
D E
Routing tableA : 0 [ Local
]D : 1 [South]
A B C
D E
Routing tableB : 0 [Local]A : 1 [West]C : 1 [East]E : 1 [South]D : 2 [South]
Routing tableC : 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
![Page 38: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/38.jpg)
Distance vector
example (6)
C
D E
Routing tableA : 0 [ Local
]D : 1 [South]B : 1 [East]C : 2 [East]E : 2 [East]
A B C
D E
Routing tableB : 0 [Local]A : 1 [West]C : 1 [East]E : 1 [South]D : 2 [South]
Routing tableC : 0 [Local]E : 1 [South-
West]D : 2 [South-
West]A : 2 [West]B : 1 [West]
Routing tableE : 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
![Page 39: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/39.jpg)
Distance vector
example (7)
C
D E
Routing tableA : 0 [ Local
]D : 1 [South]B : 1 [East]C : 2 [East]E : 2 [East]
A B C
D E
Routing tableB : 0 [Local]A : 1 [West]C : 1 [East]E : 1 [South]D : 2 [South]
Routing tableC : 0 [Local]E : 1 [South-
West]D : 2 [South-
West]A : 2 [West]B : 1 [West]
Routing tableE : 0 [Local]D : 1 [West]A : 2 [West]C : 1 [North-
East]B : 1 [North]
Routing tableD : 0 [Local]A : 1 [North]E : 1 [East]C : 2 [East]B : 2 [North]
![Page 40: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/40.jpg)
Agenda
•Reliable transmission
•Building a network
•Datagram organisation
•Virtual circuit organisation
•Distance vector routing
•Link state routing
![Page 41: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/41.jpg)
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
![Page 42: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/42.jpg)
Discovering neighbours
•Manually
•Automatically
E
A B
E
B:HELLO
A:HELLO
E:HELLO
![Page 43: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/43.jpg)
Link state packets
•How to reliably send LSPs to all nodes ?
C
D E
LinksA-B : 1A-D : 1
A B C
D E
LinksB-C : 1C-E : 1
LinksE-D : 1E-B : 1E-C : 1
LinksA-D : 1D-E : 1
LinksA-B : 1B-E : 1B-C : 1
LinksA-D : 1D-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]
![Page 44: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/44.jpg)
Flooding•Naive approach
•Send received LSP to all neighbours
C
D E
LinksA-B : 1A-D : 1
A B C
D E
LinksB-C : 1C-E : 1B-E : 1D-E : 1
LinksE-D : 1E-B : 1E-C : 1
LinksA-B : 1B-E : 1B-C : 1E-D : 1E-C : 1
LinksA-D : 1D-E : 1B-E : 1E-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]
![Page 45: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/45.jpg)
Flooding
C
D E
LinksA-B : 1A-D : 1
A B C
D E
LinksB-C : 1C-E : 1
LinksE-D : 1E-B : 1E-C : 1
LinksA-D : 1D-E : 1
LinksA-B : 1B-E : 1B-C : 1
LinksA-D : 1D-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
LSPsE-0 [D:1];[B:1];[C:1]
LSPsLSPs
![Page 46: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/46.jpg)
Flooding
C
D E
LinksA-B : 1A-D : 1
A B C
D E
LinksB-C : 1C-E : 1B-E : 1D-E : 1
LinksE-D : 1E-B : 1E-C : 1
LinksA-B : 1B-E : 1B-C : 1E-D : 1E-C : 1
LinksA-D : 1D-E : 1B-E : 1E-C : 1
LSP : E-0 [D:1];[B:1];[C:1]
LSP : E-0 [D:1];[B:1];[C:1]
LSPsE-0 [D:1];[B:1];[C:1]
LSPsE-0 [D:1];[B:1];[C:1]
LSPsE-0 [D:1];[B:1];[C:1]
LSPsE-0 [D:1];[B:1];[C:1]
LSPs
LSP : E-0 [D:1];[B:1];[C:1]
![Page 47: 2 reliability-network](https://reader033.vdocument.in/reader033/viewer/2022052315/55647adad8b42a5b318b54bb/html5/thumbnails/47.jpg)
After flooding•Each node knows full network topology
C
D E
A B C
D E
LinksA-B, B-A :
1B-E, E-B :
1B-C, C-B :
1E-D, D-E :
1E-C, C-E :
1A-D, D-A :
1
LSPsE-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]
LinksA-B, B-A :
1B-E, E-B :
1B-C, C-B :
1E-D, D-E :
1E-C, C-E :
1A-D, D-A :
1
LSPsE-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]
LinksA-B, B-A :
1B-E, E-B :
1B-C, C-B :
1E-D, D-E :
1E-C, C-E :
1A-D, D-A :
1
LSPsE-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]
LinksA-B, B-A :
1B-E, E-B :
1B-C, C-B :
1E-D, D-E :
1E-C, C-E :
1A-D, D-A :
1
LSPsE-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]
LinksA-B, B-A :
1B-E, E-B :
1B-C, C-B :
1E-D, D-E :
1E-C, C-E :
1A-D, D-A :
1
LSPsE-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]