Top Banner
12/28/21 © 2009 Raymond P. Jefferis III Lect 08 - 1 Internet Protocol - Continued
40

4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

Dec 14, 2015

Download

Documents

Edward Points
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 1

Internet Protocol - Continued

Page 2: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 2

Networks with Loops

• Learning strategies can fail, causing packets to circulate until maximum hop count

• Need method to generate a spanning tree– touches every node only once– has no closed loops

Page 3: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 3

Perlman Spanning Tree Algorithm

• Developed for LAN bridges

• Each bridge blocks redundant ports

• Deleted ports unblocked upon link failure

• Algorithm– node with lowest identifier is “root”– root node forwards through all ports– each LAN has designated port “nearest” root– smallest identifier breaks ties

Page 4: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 4

Example Network

50 60

70

80

30

20

10

B1

B2

B3B4

Page 5: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 5

Example Network

• The network has two loops– one through the “60” network– one through the “80” network

• Root distances to networks are as follows:– “10” (d=0) – “60” (d=2, 3)– “20” (d=1) – “70” (d=3)– “30” (d=2) – “80” (d=1, 3)– “50” (d=2)

Page 6: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 6

Procedure

• The longer route to the “60” network through B4 is “pruned” by designating Port 3 as the route from B3.

• The longer route to the “80” network through B4 is “pruned” by designating Port 3 as the route from B1 .

• Ports 3 and 4 of B4 are blocked

Page 7: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 7

Spanning Tree of Network

50 60

70

80

30

20

10

B1

B2

B3B4

1

2

3

1

11

2

22

343

Page 8: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 8

Routing Table for B1Destination Port Next Hop

N10 1 --N20 2 --N30 2 B2N50 2 B3N60 2 B3N70 2 B2N80 3 --

Page 9: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 9

Distance Vector Routing

• Typically used with RIP protocol

• Bellman-Ford algorithm

Page 10: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 10

Bellman-Ford Algorithm

• Find the shortest paths to the source vertex, given metric = 1

• Assign cost to node(s) contacted

• Find next shortest path, to unassigned node and assign cost to it

• Continue until all nodes have costs assigned

Page 11: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 11

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

Page 12: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 12

Initial Routing Table for R1R1 R2 R3 R4 R5

R1 0 1 1 16 16R2 1 0 16 1 1R3 1 16 0 1 16R4 16 1 1 0 1R5 16 1 16 1 0

Page 13: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 13

New Routing InformationR1 R2 R3 R4 R5

R1 0 2 1 -- --R2 2 0 -- 2 2R3 1 -- 0 2 --R4 -- 2 2 0 2R5 -- 2 -- 2 0

Page 14: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 14

Path of Length =1R1

R2 R3

R5

R4

2 1

2

2

2

2

1

Page 15: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 15

Path of Length =2R1

R2 R3

R5

R4

2 1

2

2

2

2

12

Page 16: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 16

Path of Length =3R1

R2 R3

R5

R4

2 1

2

2

2

2

12

3

Page 17: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 17

Path of Length =4R1

R2 R3

R5

R4

2 1

2

2

2

2

12

3

4

Page 18: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 18

Link State Routing

• Typically used with OSPF

• Dijkstra algorithm

Page 19: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 19

Dijkstra’s Algorithm

• Computes shortest path from “root” node to all other nodes (routers)

• Method:– maintain list U of nodes with shortest paths

assigned– maintain list V of neighbors of U list (1-hop)– choose shortest path from V and move to U

Page 20: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 20

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

Page 21: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 21

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

1

Page 22: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 22

Dijkstra Algorithm - Step 1

U-List (cost, next) V-List (cost, prev)

R1 (0, -- ) R3 (1, R2)R2 (2, R2)

Page 23: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 23

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

12

Page 24: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 24

Dijkstra Algorithm - Step 2

U-List (cost, next) V-List (cost, next)

R1 (0, -- )

R3 (1, R3) R2 (2, R2)R4 (3, R3)

Page 25: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 25

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

12

3

Page 26: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 26

Dijkstra Algorithm - Step 3

U-List (cost, next) V-List (cost, next)

R1 (0, -- )

R3 (1, R3)

R2 (2, R2) R4 (3, R3)R4 (4, R2)R5 (4, R2)

Page 27: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 27

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

12

3

4

Page 28: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 28

Dijkstra Algorithm - Step 4

U-List (cost, next) V-List (cost, next)

R1 (0, -- )

R3 (1, R3)

R2 (2, R2)

R4 (3, R3) R5 (4, R2)R5 (5, R3)

Page 29: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 29

Example NetworkR1

R2 R3

R5

R4

2 1

2

2

2

2

12

3

4

Page 30: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 30

Dijkstra Algorithm - Step 4

U-List (cost, next) V-List (cost, next)

R1 (0, -- )

R3 (1, R3)

R2 (2, R2)

R4 (3, R3)

R5 (4, R2)

Page 31: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 31

Reverse Path Forwarding• Assumptions

– each router stores shortest paths to all nodes– each router stores next-hop to all nodes

• Algorithm– source broadcasts multicast packet– each router retransmits packets

• on all outgoing ports except incoming

• only if incoming packet was from next-hop node to source

Page 32: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 32

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

Page 33: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 33

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

1

1

Page 34: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 34

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

12

2

2

1

Page 35: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 35

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

12

2

2

3

31

Page 36: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 36

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

12

2

2

3

31

4

4

4

Page 37: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 37

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

12

2

2

3

31

4

4

45

Page 38: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 38

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

12

2

2

3

31

4

4

45

6

Page 39: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 39

Example

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

1

2

13

5

1 1

4

1

3

2

2

5

1

2

13

51

1

1

2

2

23

3

4

4

4

5

6

Page 40: 4/12/2015© 2009 Raymond P. Jefferis IIILect 08 - 1 Internet Protocol - Continued.

04/18/23 © 2009 Raymond P. Jefferis III Lect 08 - 40

RPF Tree from R11

2 3 8

4 5 6

9

11

12

7

10

9

11

12611

128

9

5 3

108

2

3

7 9

12

Solid links on minimal spanning treeDotted links not on spanning tree