Successfully reported this slideshow.

Part 2 : reliable transmission and building a network

0

Share

Upcoming SlideShare
2 reliability-network
2 reliability-network
Loading in …3
×
1 of 57
1 of 57

Part 2 : reliable transmission and building a network

0

Share

Download to read offline

Description

Slides supporting the "Computer Networking: Principles, Protocols and Practice" ebook. The slides can be freely reused to teach an undergraduate computer networking class using the open-source ebook.

Transcript

  1. 1. Week 2 Reliable transmission Building a network
  2. 2. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  3. 3. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  4. 4. Checksums • How to verify that a transmission has not been affected by random errors • Checksum • CRC
  5. 5. Question • Which of these two techniques provides the best error detection capability ? • CRC • Internet checksum
  6. 6. Question • Where should we place the CRC/checksum ? Payload Header Trailer
  7. 7. Question • Should the Checksum/CRC also protect the header ? Payload Header Trailer
  8. 8. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  9. 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. 10. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  11. 11. Alternating bit : sender
  12. 12. Go-back-n
  13. 13. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  14. 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. 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. 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. 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. 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. 19. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  20. 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. 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. 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. 23. Take back lessons • Usage of Checksums/CRCs • Finite State Machines • Cumulative acknowledgements • Maximum window size with GBN/SR • Bandwidth x delay product
  24. 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. 25. How to transfert information ? • Divide it in small blocks called packets which can be sent independently ABCDEFGHIJKLMNOPQRSTUVWXYZ1234 ABCDEFGHIJKLM NOPQRSTUVW XYZ1234
  26. 26. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  27. 27. How to organise a network ? Source: wikipedia : https://en.wikipedia.org/wiki/Post_office and https://en.wikipedia.org/wiki/Telephone_exchange
  28. 28. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  29. 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. 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. 31. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  32. 32. Datagram organisation • Principles • Two types of devices • Hosts • Routers • Packet • Source and destination addresses
  33. 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. 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. 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. 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. 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. 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. 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. 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. 41. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  42. 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. 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. 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. 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. 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. 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. 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. 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. 50. Agenda • Reliable transmission • Building a network • Datagram organisation • Virtual circuit organisation • Distance vector routing • Link state routing
  51. 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
  52. 52. Discovering neighbours • Manually • Automatically E A B E B:HELLO A:HELLO E:HELLO
  53. 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. 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. 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. 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. 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]

Description

Slides supporting the "Computer Networking: Principles, Protocols and Practice" ebook. The slides can be freely reused to teach an undergraduate computer networking class using the open-source ebook.

Transcript

  1. 1. Week 2 Reliable transmission Building a network
  2. 2. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  3. 3. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  4. 4. Checksums • How to verify that a transmission has not been affected by random errors • Checksum • CRC
  5. 5. Question • Which of these two techniques provides the best error detection capability ? • CRC • Internet checksum
  6. 6. Question • Where should we place the CRC/checksum ? Payload Header Trailer
  7. 7. Question • Should the Checksum/CRC also protect the header ? Payload Header Trailer
  8. 8. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  9. 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. 10. Agenda • Reliable transmission • Checksums • Framing • Finite State Machines • Go-back-n • Selective repeat • Building a network
  11. 11. Alternating bit : sender
  12. 12. Go-back-n
  13. 13. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  14. 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. 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. 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. 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. 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. 19. Agenda • Reliable transmission • Checksums • Framing • Go-back-n • Selective repeat • Building a network
  20. 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. 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. 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. 23. Take back lessons • Usage of Checksums/CRCs • Finite State Machines • Cumulative acknowledgements • Maximum window size with GBN/SR • Bandwidth x delay product
  24. 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. 25. How to transfert information ? • Divide it in small blocks called packets which can be sent independently ABCDEFGHIJKLMNOPQRSTUVWXYZ1234 ABCDEFGHIJKLM NOPQRSTUVW XYZ1234
  26. 26. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  27. 27. How to organise a network ? Source: wikipedia : https://en.wikipedia.org/wiki/Post_office and https://en.wikipedia.org/wiki/Telephone_exchange
  28. 28. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  29. 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. 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. 31. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  32. 32. Datagram organisation • Principles • Two types of devices • Hosts • Routers • Packet • Source and destination addresses
  33. 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. 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. 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. 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. 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. 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. 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. 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. 41. Agenda • Reliable transmission • Building a network • Virtual circuit organisation • Datagram organisation • Distance vector routing • Link state routing
  42. 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. 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. 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. 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. 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. 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. 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. 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. 50. Agenda • Reliable transmission • Building a network • Datagram organisation • Virtual circuit organisation • Distance vector routing • Link state routing
  51. 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
  52. 52. Discovering neighbours • Manually • Automatically E A B E B:HELLO A:HELLO E:HELLO
  53. 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. 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. 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. 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. 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]

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

×