Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.

Similar presentations


Presentation on theme: "Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer."— Presentation transcript:

1 Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer

2 2 Topics l Design Issues l Routing Algorithms l Congestion Control l Internetworking

3 Network Layer Design Issues Concern: How to get packets from source to destination Issues Store-and-forward packet switching Services provided to transport layer Implementation of connectionless service Implementation of connection-oriented service Comparison of virtual-circuit and datagram networks 3

4 4 Store-and-Forward Packet Switching l The environment of the network layer protocols ISP’s equipment

5 5 Services Provided to Transport Layer l Designing goals  Independent of subnet technology  Transport layer shielded from number, type, and topology of subnets  Uniform network address numbering  Even across LANs and WANs l Two Types of Services  Connectionless, e.g., IP  Connection-oriented, e.g., ATM

6 6 Implementation of Connectionless Service l Routing within a diagram subnet ISP’s equipment A’s table (initially) A’s table (later) C’s Table E’s Table

7 7 Implementation of Connection-Oriented Service l Routing within a virtual-circuit subnet. ISP’s equipment A’s table C’s Table E’s Table

8 8 Implementation of Connection-Oriented Service l Routing within a virtual-circuit subnet.

9 9 Comparison of Virtual-Circuit and Datagram Subnets

10 10 Routing Algorithms l Network layer software l Deciding which output line an incoming packet should be transmitted to  Datagram: made for each packet  VC: made for new VC setup

11 11 Routing Algorithms l Desirable Properties  Correctness  Simplicity  Robustness  Stability  Fairness  Optimality

12 12 Routing Algorithms - Optimality l What to optimize?  Minimizing mean packet delay  Maximizing total network throughput  Problem  The above two are in conflicts (see next slide) l Compromise  Minimizing number of hops a packet must take from source to destination

13 Fairness vs. Efficiency Network with a conflict between fairness and efficiency.

14 14 Classes of Routing Algorithm l Two major classes  Non-adaptive  Adaptive

15 15 Two Major Classes of Routing Algorithm l Adaptive  Algorithms differ in  where to get information, e.g.,  Locally  From adjacent routers  From all routers  when to change routes, e.g.,  Every T sec  When the load changes  When the topology changes  what metric used for optimization, e.g.,  Distance  Number of hops  Estimated transit time

16 16 Routing Algorithms to be Studied l Static (i.e., nonadaptive) routing  Shortest path routing  Flooding l Dynamic (i.e., adaptive) routing  Distance vector routing  Link state routing

17 17 Optimality Principle l If router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route. l Proof? I K J L

18 18 Sink Tree l Direct consequence of optimality principle l Network graph  Node/vertice: router  Edge: link l The set of optimal routes from all sources to a given destination form a tree rooted at the destination l Might not be unique l Goal of routing algorithms  Discover and use the sink tree for all routers

19 19 Sink Tree l Example  Distance metric: number of hops NetworkSink tree

20 20 Shortest Path Algorithm l Given a pair of routers, find the shortest path between them l Network graph  Node/vertice: router  Edge: link  Labels of edges  Function of factors  Weighting function changed for different criteria

21 21 Dijkstra's Algorithm l Each node labeled with  (distance from source, best known path)  Initially  distance: infinity  best known path: unknown  Label might change to reflect better paths l Node is either tentative or permanent  Initially tentative  As a path from source to that node discovered, label becomes permanent and never gets changed

22 22 First six steps to compute shortest path from A to D

23 23 Dijkstra's Algorithm l How do we find the path? l The algorithm given in the book works from destination to source  Why?

24 24 Flooding l Every incoming packet is sent out on every outgoing line except for the input line l Problem  Large number of packets are generated l Solutions  Hop counter  Avoiding duplicates  Selective flooding

25 25 Flooding - Conclusion l Optimal  Shortest path is always chosen  No other algorithm can produce a shorter delay l Robust l Easy to set up  Only need to know its neighbors l Not practical in most applications l Useful in some applications  Military application: robustness  Wireless networks  Metric of other routing algorithms

26 26 Distance Vector Routing l Table in each router  Giving  Best known distance to each destination  Which line to use to get there  Indexed by each router  Each entry contains two parts  Preferred outgoing line to use for that destination  Estimate of "distance" to go there  Best known distance to each destination  Updated by exchanging information with neighbors

27 27 Distance Vector Routing l Router  Knows "distance" to each neighbor  Sends list to each neighbor every T msec  Receives lists from neighbors every T msec  If neighbor X knows  Distance from X to I is X I, and  Distance from the router to X is m then delay from router to I via X is (X I + m)  Performs calculation for each neighbor to find the best  Old table not used in calculation

28 28 A network. Input from A, I, H, K, and the new routing table for J.

29 29 Distance Vector Routing l Count-to-Infinity Problem  Good news spread fast, bad news leisurely  Infinity has to be defined

30 30 Link State Routing l A router 1.Discovers its neighbors and learn their network addresses - HELLO 2.Measures the delay or cost to each neighbor - ECHO 3.Constructs a packet telling all it has just learned – link state packet 4.Sends this packet to all other routers – flooding w/ duplicate avoidance 5.Computes the shortest path to every other router – Dijkstra’s algorithm

31 31 Link State Routing l In effect  Complete topology and all delays are experimentally measured and distributed to every router  Construct network topology from link state packets  Dijkstra's algorithm is applied to find the shortest path

32 Building Link State Packets (a) A network. (b) The link state packets for this network.

33 33 Hierarchical Routing l Problem  Network size grows  Routing tables grow l Solution  Hierarchical routing l Idea  Routers are divided into "regions"  Router knows detail about routing within its region  Router knows nothing about internal structure of other region

34 34 Path length from 1A to 5C?


Download ppt "Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer."

Similar presentations


Ads by Google