Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia...

22
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University

Transcript of Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia...

Page 1: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Network and Communications

Ju Wang

Chapter 5

Routing Algorithm

Adopted from Choi’s notes

Virginia Commonwealth University

Page 2: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Design Issues

Store-and Forward packet Switching

Services Provided to the Transport layer

Implementation of Connectionless Service

Implementation of Connection oriented Service

Comparison of Virtual Circuit and Datagram Subnet

Store and Forward Packet Switching

Page 3: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Design Issues

Services Provided to the Transport Layer

Goals

Independent on the router technology

Router information shielding(number, type and topology)

Global and uniform network address

Page 4: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Datagram Switching

Page 5: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Implementation of Connection Oriented Service

Virtual circuit subnet

Every packet carry virtual circuit id and follows same route

Label switching (virtual circuit)

Page 6: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Design IssuesComparison of Virtual Circuits and Datagram subnet

Page 7: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing Algorithms

Routing algorithm is desirable if…

Correctness, simplicity, robustness, stability,fairness, optimality

NL Goal: Routing packets from the source to destination

Algorithm and data structure ?

Decision per packets

Why? Best route

What about VC?

Session routing

Page 8: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Correctness?

Simplicity

Stability

Need to converge to equilibrium

Fairness and optimality? Contradictory goals

Robustness

To topology and traffic change

What to optimize?

Mean packet delay? Network throughput?

Minimize the number of hop

Page 9: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsPrinciple of optimality

If J is on the optimal path from I to K, then the optimal path from J to K also falls along the same route

Proof:

So what?

Sink tree

No cycles guarantee the bounded-hop delivery in real life?

Page 10: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsShortest path Routing

Page 11: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsFlooding

Send packet to every outgoing line except the one it arrives

– duplicated redundant packet

- hop count

Page 12: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsDistance Vector Routing (Bellman Ford)

Problem?

Table giving the best known distance to each destination and line to use

Page 13: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Count to Infinity problem

Page 14: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsLink State Routing

Each router must do the following:

1. Discover its neighbors, learn their network address.

2. Measure the delay or cost to each of its neighbors.

3. Construct a packet telling all it has just learned.

4. Send this packet to all other routers.

5. Compute the shortest path to every other router

Computing the New Route using Dijkstra

Page 15: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Building Link State Packets

Page 16: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsHierarchical Routing

Save space! At the cost of path length (1A to 5C)

Page 17: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Routing AlgorithmsBroadcasting, Multicasting

Spanning tree

•Given–Graph G = (V,E)–Edge weights w: w(e) is weight for edge e.

•Find a spanning tree T which has minimum weight, i.e., minimum spanning tree

Recall, a spanning tree is a subgraph that is a tree that includes all the nodes.

Page 18: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Examples

4

8

11

71

6

24

8 7

2

14

9

10

1 2

4

8

11

76

24

8 7

14

9

10

Min SpanningTree = 37

SpanningTree = 42

Page 19: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Kruskal’s Algorithm: Basic Idea

• Start with a collection of subtrees Actually, each node is a subtree

• Find the lightest edge joining two subtrees• Keep doing this until there is a single subtree

Page 20: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

4

8

11

71

6

24

8 7

2

14

9

10

Kruskal’s Algorithm: Basic Idea

Page 21: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

Prim’s Algorithm: Basic Idea

• Start with a single subtree of ONE node• Grow this subtree by adding the lightest

edge coming out of it.• Keep doing this until the subtree is a

spanning tree.

Page 22: Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.

4

8

11

71

6

24

8 7

2

14

9

10

Prim’s Algorithm: Basic Idea