Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE453 – Introduction to Computer Networks

Similar presentations


Presentation on theme: "ECE453 – Introduction to Computer Networks"— Presentation transcript:

1 ECE453 – Introduction to Computer Networks
Lecture 9 - The Network Layer (I) - Routing

2 Recap Framing Error detection and correction
Reliable or unreliable data transfer Channel allocation protocol

3 Network Core and Network Edge
application transport network data link physical network data link physical network data link physical logical end-end transport Network edge application transport network data link physical

4 Network Core – Information Transmission
Circuit switching Telephone system Message switching Mail delivery The message travels as a complete unit. At any one time, it completely exists in one place. Packet switching The Internet

5 Design Issues Store-and-forward packet switching
Services to the transport layer Connection-oriented vs. Connectionless Quality of service (QoS)

6 Network Layer Services
Connectionless Best-effort No guarantee The Internet No advance setup is needed Datagram subnet Connection-oriented Guaranteed delivery ATM A path from the source router to the destination router is established before any data packets can be sent Virtual circuit

7 The Internet Network Layer
Transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions Routing protocols path selection RIP, OSPF, BGP Network layer routing table ICMP protocol error reporting router “signaling” Link layer physical layer

8 Routing - In the Middle of Intersection …
Route in your life

9 Different Strategies Nonadaptive algorithms (or static routing)
Adaptive algorithms (or dynamic routing) Global algorithm (have a global knowledge – a map) Decentralized algorithm (get information only from neighbor) You have to put certain trust on the information from others.

10 Graph Abstraction for Routing Algorithms
Graph nodes  Routers Graph edge  Physical links Edge weight  Link cost Link cost Delay, power consumption, congestion level, $cost, etc. Good path or optimal path Minimum link cost V, E, G=VE metric A E D C B F 2 1 3 5

11 Two Fundamental Routing Algorithms
Link state routing A global algorithm Distance vector routing (or Bellman-Ford routing, Ford-Fulkerson routing) A decentralized algorithm The original ARPANET routing algorithm, replaced by LS routing in 1979

12 A Link State Routing Algorithm
Dijkstra’s algorithm Net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have the same info computes least cost paths from the source to all other nodes Iterative algorithm

13 Dijkstra’s Algorithm: An Example
Step 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D C B F 2 1 3 5

14 Dijkstra’s Algorithm: Discussion
Algorithm complexity: n nodes each iteration: need to check all nodes, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic A A D C B 2+e 1+e 1 A A D C B 2+e e 1+e 1 1 1+e Link cost can change very fast The route is always changing 2+e D B D B e 1 C 1+e C 1 1 e … recompute routing … recompute … recompute initially

15 D () A B C D 1 7 6 4 14 8 9 11 5 2 E cost to destination via destination DV Routing Each router maintains a distance table Initialization 0 for itself Infinity for non-neighbor Link cost for neighbor Message exchange between neighbors When a neighbor first comes up When information changes (e.g. change in link cost) Distance vector calculation Minimize cost to each destination D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = Iterative routing Distributed routing

16 DV: Example Y X Z 1 2 7 Y X Z Red arrow: broadcast to neighbors

17 DV: Link Cost Changes “good news travels fast” Y Z X Y X Z 4 1 50
algorithm terminates

18 DV: Link Cost Changes “bad news travels slow”
Count to infinity problem X Z 1 4 50 Y 60 algorithm continues on!

19 Distance Table: An Example
7 8 1 2 D () A B C D 1 7 6 4 14 8 9 11 5 2 E cost to destination via destination D (C,D) E c(E,D) + min {D (C,w)} D w = 2+2 = 4 D (A,D) E c(E,D) + min {D (A,w)} D w = 2+3 = 5 Your information is totally from your neighbor loop! D (A,B) E c(E,B) + min {D (A,w)} B w = 8+6 = 14 loop!


Download ppt "ECE453 – Introduction to Computer Networks"

Similar presentations


Ads by Google