Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fundamentals of Computer Networks ECE 478/578

Similar presentations


Presentation on theme: "Fundamentals of Computer Networks ECE 478/578"— Presentation transcript:

1 Fundamentals of Computer Networks ECE 478/578
Lecture #16: Routing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona

2 What is Routing? Construct directions from starting point to destination

3 Forwarding vs. Routing Forwarding: data plane Routing: control plane
Directing a data packet to an outgoing link Individual router using a forwarding table Routing: control plane Computing paths the packets will follow Routers talking amongst themselves Individual router creating a forwarding table

4 Why Does Routing Matter?
End-to-end performance Quality of the path affects user performance Propagation delay, throughput, and packet loss Use of network resources Balance of the traffic over the routers and links Avoiding congestion by directing traffic to lightly-loaded links Transient disruptions during changes Failures, maintenance, and load balancing Limiting packet loss and delay during changes

5 Different Types of Routing
Routing in a GPS device Routing in computer networks Shortest path Smallest delay Highest reliability Avoid congested nodes

6 Routing as a Graph Problem
Network is mapped into a graph G(V,E), where each node has an associated cost Cost: delay, financial cost, probability of failure, etc.

7 Distance Vector Algorithm
Construct a one-dimensional array (vector) of distances to all other nodes Exchange info with immediate neighbors Update distances based on received information Stop sending updates as soon as no change occurs Example: Assume unit cost for each link

8 Distance Vector – Global View
Global view of the network A B C D E F G 1

9 Distance Vector – Local View
Dest Cost Next Hop B 1 C D E F G Dest Cost Next Hop A 1 C D E F G Dest Cost Next Hop A 1 B D E F G Dest Cost Next Hop A B C 1 E F G Dest Cost Next Hop A 1 B C D F G Dest Cost Next Hop A 1 B C D E G Dest Cost Next Hop A B C D 1 E F

10 Distance Vector – 1st Update
Dest Cost Next Hop B 1 C D 2 E F G Dest Cost Next Hop A 1 C D 2 E F G Dest Cost Next Hop A 1 B D E 2 F G Dest Cost Next Hop A 2 C B 1 E F G Dest Cost Next Hop A 1 B 2 C D F G Dest Cost Next Hop A 1 B 2 C D G E Dest Cost Next Hop A 2 F B C D 1 E

11 Distance Vector – 2nd Update
Dest Cost Next Hop B 1 C D 2 E F G Dest Cost Next Hop A 1 C D 2 E F G 3 Dest Cost Next Hop A 1 B D E 2 F G Dest Cost Next Hop A 2 C B 1 E 3 F G Dest Cost Next Hop A 1 B 2 C D 3 F G Dest Cost Next Hop A 1 B 2 C D G E Dest Cost Next Hop A 2 F B 3 D C 1 E

12 Failure of F – G Link

13 Failure of F – G Link Step 1
A/Dest Cost Next Hop B 1 C D 2 E F G B/Dest Cost Next Hop A 1 C D 2 E F G 3 C/Dest Cost Next Hop A 1 B D E 2 F G D/Dest Cost Next Hop A 2 C B 1 E 3 F G E/Dest Cost Next Hop A 1 B 2 C D 3 F G F/Dest Cost Next Hop A 1 B 2 C D E G G/Dest Cost Next Hop A B 3 D C 2 1 E F

14 Failure of F – G Link Step 2
A/Dest Cost Next Hop B 1 C D 2 E F G B/Dest Cost Next Hop A 1 C D 2 E F G 3 C/Dest Cost Next Hop A 1 B D E 2 F G D/Dest Cost Next Hop A 1 B 2 C E 3 F G E/Dest Cost Next Hop A 1 B 2 C D 3 F G F/Dest Cost Next Hop A 1 B 2 C D E G G/Dest Cost Next Hop A B 3 D C 2 1 E F

15 Failure of F – G Link Step 3
A/Dest Cost Next Hop B 1 C D 2 E F G 3 B/Dest Cost Next Hop A 1 C D 2 E F G 3 C/Dest Cost Next Hop A 1 B D E 2 F G D/Dest Cost Next Hop A 2 C B 1 E 3 F G E/Dest Cost Next Hop A 1 B 2 C D 3 F G F/Dest Cost Next Hop A 1 B 2 C D 4 E G G/Dest Cost Next Hop A 3 D B C 2 1 E 4 F

16 Failure of F – G Link Step 4
A/Dest Cost Next Hop B 1 C D 2 E F G 3 B/Dest Cost Next Hop A 1 C D 2 E F G 3 C/Dest Cost Next Hop A 1 B D E 2 F G D/Dest Cost Next Hop A 2 C B 1 E 3 F G E/Dest Cost Next Hop A 1 B 2 C D 3 F G 4 F/Dest Cost Next Hop A 1 B 2 C D 4 E G G/Dest Cost Next Hop A 3 D B C 2 1 E F 4

17 Count-to-Infinity Problem
A advertises a distance of infty to E and updates its neighbors C advertises a distance of 2 to E via A B advertises a distance of 3 to E via C A updates its table and advertises a distance of 4 via B C updates its table and advertises a distance of 5 via A…

18 Solutions for Count-to-Infinity Problem
Sol A: Use a maximum hop count instead of infinity Sol B: Split Horizon Do not send updates on the neighbor that provided the info for a particular route. E.g.: B does not send an update for E to A, since it learned about E from A Sol C: Split Horizon with Poison Reverse B advertises a route of cost infinity to E to ensure that B does not use B to get to E Solutions do not always work for loops with more than 3 nodes

19 Routing Information Protocol (RIP)
Distance-vector algorithm where vertices are networks and not hosts Valid hop count (distances) 1-15, with 16 representing infinity Limited to fairly small networks

20 Link-State Routing Path-selection model Destination-based
Flood information regarding immediate neighbors to all nodes Each node obtains a complete map of the network 2 1 3 1 4 2 1 5 4 3

21 Shortest-Path Problem
Given: network topology with link costs c(x,y): link cost from node x to node y Infinity if x and y are not direct neighbors Compute: least-cost paths to all nodes From a given source u to all other nodes p(v): predecessor node along path from source to v 2 1 3 1 4 u 2 1 5 p(v) 4 3 v

22 Dijkstra’s Shortest-Path Algorithm
Iterative algorithm After k iterations, know least-cost path to k nodes S: nodes whose least-cost path definitively known Initially, S = {u} where u is the source node Add one node to S in each iteration D(v): current cost of path from source to node v Initially, D(v) = c(u, v) for all nodes v adjacent to u … and D(v) = ∞ for all other nodes v Continuously update D(v) as shorter paths are learned

23 Dijsktra’s Algorithm 1 Initialization: 2 S = {u} 3 for all nodes v
if v adjacent to u { D(v) = c(u,v) else D(v) = ∞ 7 8 Loop 9 find w not in S with the smallest D(w) 10 add w to S 11 update D(v) for all v adjacent to w and not in S: D(v) = min{D(v), D(w) + c(w,v)} 13 until all nodes in S

24 Dijkstra’s Algorithm Example
3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5

25 Dijkstra’s Algorithm Example
3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5

26 Shortest-Path Tree Shortest-path tree from u Forwarding table at u
3 2 1 4 5 u v w x y z s t link v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) s (u,w) t (u,w)

27 Dijkstra Table Step S v w x y z s t u 3 2  1 u,w - 6 u, w, v 5
D(v) P(v) D(w) P(w) D(x) P(x) D(y) P(y) D(z) P(z) D(s) P(s) D(t) P(t) u 3 2 1 u,w - 6 u, w, v 5 u,w,v,x 8 4 u,w,v,x,y u,w,v,x,y,s,z u,w,v,x,y,s,z,t

28 Link-State Routing Each router keeps track of the state of its incident links Link-state: working or non-working Cost (delay, throughput) Each router floods the link state in the entire network Every router gets a complete view of the network Each router runs Dijkstra’s algorithm to obtain shortest paths to all other destinations Link-state protocols Open Shortest Path First (OSPF) Intermediate System – Intermediate System (IS-IS)

29 Determining the State of a Link
Beaconing Periodically exchange “hello” messages with neighbors Detect a failure after a threshold number of unanswered “hellos” HELLOB A HELLOB HELLOA HELLOC B C

30 Distributing Link-State Info
Flood the entire network Every node forwards link-state packet on all links but the incoming one

31 Link-State Packets Packets to be distributed Sequence number prevents nodes from using old messages Age determines a time to live for the packet (why do we need this?)

32 When to Initiate Flooding
Topology change Link or node failure Link or node recovery Configuration change Link cost change Periodically Refresh the link-state information Typically (say) 30 minutes Corrects for possible corruption of the data

33 Link State vs. Distance Vector
Tell every node in the network about your immediate neighbors Distance Vector Tell only to your neighbors about every node in the network

34 Open Shortest Path First Protocol
Format of an OSPF message Version: 1-4, 1:Hello msg, 2: request, 3:send, 4: Ack Area Id: area where node is connected in case of hierarchical routing Authentication type: 0:none, 1:simple pswd, 2: MAC

35 Link State Advertisements (LSA)
Type 1: cost of links Type 2: networks connected Other types: Hierarchy info LS Age: TTL Link-state ID, Advertising router: 32-bit address of router Length: length in bytes of the LSA Link ID, data, type: identify the link Type of Service (TOS): Allows assignment of different metrics for different services for the same link

36 Link Metrics Hop count: Assign a metric of one at every hop Delay:
Least-cost route  Least-hops route Delay: Delay= Tack – Tarr = (Td – Tarr) + Tt + 2 Tp Weight assigned to each link = average delay for packets passing through Problems with simply using delay Instability: A heavily loaded link would oscillate between busy and idle states Wide value range: a link could look hundreds of time more expensive than another – may cause very long routes

37 Suppression of the Dynamic Range
New metric based on link utilization Highly loaded link never shows a cost more than three times its idle cost The most expensive link is only seven times the cost of the least expensive A high–speed satellite link is more attractive than a low speed terrestrial link Cost is a function of link utilization only at moderate to high loads

38 Link Metrics in the Real World
For the most part metrics are static No dynamic adjustment, but hardcoded by network administrators Avoids route oscillation problems Most commonly used metric w = c/B, where c is a constant and B is the link bandwidth

39 Hierarchical Routing A scalable solution for very large networks Cluster routers into areas or regions

40 Hierarchical Routing Reduction in table size comes at a cost
The route between a particular node pair may not necessarily be the shortest For large networks, how many levels should the hierarchy have? Example: Network with 720 nodes 1 level: 720 entries 2 levels: 24 regions and 30 nodes per region 29 (local) + 23 (region) = 52 entries 3 levels: 8 clusters; 9 regions/cluster; 10 routers/region 9 (local) + 8 (region) + 7 (cluster) = 24 entries


Download ppt "Fundamentals of Computer Networks ECE 478/578"

Similar presentations


Ads by Google