Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 4450:427/527 - Computer Networks Spring 2017

Similar presentations


Presentation on theme: "ECE 4450:427/527 - Computer Networks Spring 2017"— Presentation transcript:

1 ECE 4450:427/527 - Computer Networks Spring 2017
Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.3: Routing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

2 Internetworking: Discussions
For Internetworking, we shall look at few sub-problems: Interconnect links of the same type: Switches We consider an important of class switch: Bridges to interconnect Ethernet segments. We also look a way to interconnect disparate networks and links: Gateways, or now mostly known as routers. We shall focus on the IP Once we are able to interconnect a whole lot of links and networks with switches and routers, we will look at a way to find a suitable path, or route through a network: Paths that are efficient, loop free, etc.: Routing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

3 Recall: IP Routing Table
Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

4 What is Routing? Construct directions from starting point to destination Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

5 Forwarding vs Routing Forwarding: data plane Routing: control plane
Directing a data packet to an outgoing link Individual router using a forwarding/routing table Routing: control plane Computing paths the packets will follow Routers talking amongst themselves Individual router creating a forwarding table Routing can be simply understood as a process by which routing table is built 5 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

6 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

7 Different Types of Routing
Routing in a GPS device Routing in computer networks Shortest path Smallest delay Highest reliability Avoid congested nodes Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

8 Routing Network as a Graph
The basic problem of routing is to find the lowest-cost path between any two nodes The cost of a path equals the sum of the costs of all the edges that make up the path Cost: delay, financial cost, probability of failure, etc. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

9 Routing For a simple network, we can calculate all shortest paths and load them into some nonvolatile storage on each node. Such a static approach has several shortcomings It does not deal with node or link failures It does not consider the addition of new nodes or links It implies that edge costs cannot change What is the solution? Need a distributed and dynamic protocol Two main classes of protocols Distance Vector Link State Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

10 Distance Vector: Algorithm
Construct a one-dimensional array (vector) of distances to all other nodes, with assumption that each node knows the cost of the link to each of its directly connected neighbors Exchange info with immediate neighbors Update distances based on received information Stop sending updates as soon as no change occurs Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

11 Distance Vector Initial distances stored at each node (global view) (assume unit cost for each link) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

12 Distance Vector Dest Cost Next Hop B 1 C D E F G Initial routing table at node A, assume unit cost for each link Now, how about node B? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

13 Distance Vector: Local View (initial)
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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

14 Distance Vector – 1st Update for A
1st Update: Every node sends to its directly connected neighbors its personal list of distances Dest Cost Next Hop B 1 C D E F G 1st Update for A Dest Cost Next Hop B 1 C D 2 E F G Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

15 Distance Vector – 1st Update for B?
Dest Cost Next Hop A 1 C D 2 E F G Dest Cost Next Hop A 1 C D E F G Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

16 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

17 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

18 Distance Vector: Global View
Final distances stored at each node (global view) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

19 Distance Vector The other common name for this class of algorithm is Bellman-Ford, after its inventors. As we can see, it usually takes a number of exchanges/updates between neighbors before each node has complete routing table. The process of getting consistent routing information to all nodes is called convergence: vary We have two different circumstances under which a node decides to send a routing update Periodic update Triggered update Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

20 Failure of Link F-G When a node detects a link failure
F detects that link to G has failed (how?) F sets distance to G to infinity and sends update to A A sets distance to G to infinity since it uses F to reach G A receives periodic update from C with 2-hop path to G A sets distance to G to 3 and sends update to F F decides it can reach G in 4 hops via A Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

21 Failure of Link F-G: Updated Tables
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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

22 Drawback Suppose the link from A to E goes down
In the next round of updates, A advertises a distance of infinity to E, but C advertise a distance of 2 to E Depending on the exact timing of events, the following might happen Node B, upon hearing that E can be reached in 2 hops from C, concludes that it can reach E in 3 hops and advertises this to A Node A concludes it can reach E in 4 hops and advertises this to C Node C concludes that it can reach E in 5 hops; and so on. This cycle stops only when the distances reach some number that is large enough to be considered infinite Count-to-infinity problem Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

23 Solutions One technique to improve the time to stabilize routing is called split horizon When a node sends a routing update to its neighbors, it does not send those routes it learned from each neighbor back to that neighbor For example, if B has the route (E, 2, A) in its table, then it knows it must have learned this route from A, and so whenever B sends a routing update to A, it does not include the route (E, 2) in that update In a stronger version of split horizon, called split horizon with poison reverse B actually sends that back route to A, but it puts negative information in the route to ensure that A will not eventually use B to get to E For example, B sends the route (E, ∞) to A Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

24 Routing Information Protocol (RIP)
Early routing protocol for IP networks 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

25 Metric/Cost in Real World
Can we just assign a cost of 1 to all links? Certainly, there are so many ways to define cost: Number of packets queued waiting to be transmitted Consider both bandwidth and latency In the current real world Common approach: a constant/link bandwidth It means metric changes rarely if at all and only under the control of network administrator Why? i) Dynamically changing metrics are too unstable; ii) Many networks today lack the great disparity of speeds and latencies Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

26 Distance Vector vs. Link-State
each node talks only to its directly connected neighbors … but it tell them everything it has learned, i.e., distance to all nodes Link-state: each node talks to all other nodes… but it tells them only what it knows for sure, i.e., state of its directly connected links Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

27 Link-State Routing Strategy: Send to all nodes (not just neighbors) information about directly connected links (not entire routing table) and associated cost. Rely on two key mechanisms: Reliable flooding: Make sure all nodes get the above information of other nodes Route calculation: Once a node has a copy of the information from every other node, it is able to compute a complete map of the network, and then can decide the best route to each destination Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

28 Reliable Flooding Objective: Make sure all nodes get the link-state information of other nodes: Knowledge of directly connected neighbors and associated cost for each node Each node creates an update packet called link-state packet (LSP) with the following information: ID of the node that created LSP Cost of link to each directly connected neighbor Sequence number (SEQNO) Time-to-live for this packet Reliable flooding: Make sure all nodes get LSP from the other nodes. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

29 Reliable Flooding Transmission of LSPs between adjacent routers using ACK and transmission. But how to send an LSP to all nodes? We need some more steps to reliably flood an LSP to all nodes: controlled flooding A node x receives a copy of LSP originated from y. x then needs to check if it has already had a copy. If not, store it. If it has, compare sequence number, keep a newer one. If the received LSP is new, x sends a copy of LSP to all neighbors, except the one from which LSP was received (why?). Neighbors then turn around and do the same thing: most recent copy of LSP reaches all nodes. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

30 Reliable Flooding Reliable Flooding Flooding of link-state packets.
(a) LSP arrives at node X; (b) X floods LSP to A and C; (c) A and C flood LSP to B (but not X); (d) flooding is complete Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

31 Route Calculation Now, assume a given node has copies of LSPs from every other node: it is able to compute a complete map for the topology of the network and from this map it is able to decide the best routes to each destination But how to decide/calculate the best route to each destination? The solution is based on a well-known algorithm from graph theory – Dijkstra’s shortest-path algorithm Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

32 Shortest-Path Problem: Statement
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 For each node a: u stores a’s predecessor node along path from u to a, & cost. 2 1 3 1 4 u a 2 1 5 4 3 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

33 Dijkstra’s Algorithm: Overview
Iterative algorithm for a given source node u: After k iterations, know least-cost path to k nodes S: set of nodes whose least-cost path known Initially, S = {u} where u is the source node Add one node to S in each iteration D(a): current cost of path from source to node a Initially, D(a) = c(u, a) for all nodes a adjacent to u … and D(a) = ∞ for all other nodes a Continuously update D(a) as shorter paths are learned Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

34 Dijkstra’s Algorithm: Implementation
1 Initialization: 2 S = {u} 3 for all nodes {a} If a adjacent to u { D(a) = c(u,a) else D(v) = ∞ 7 8 Loop 9 Find b not in S with the smallest D(b) 10 Add b to S, store D(b) and P(b) (predecessor node) 11 update D(a) for all {a} adjacent to b and not in S: D(a) = min{D(a), D(b) + c(b,a)} 13 until all nodes in S Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

35 Example 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

36 Example (Cont.) 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

37 Dijkstra’s Table Step S v w x y z s t . 7 u,w,v,x,y,z,s,t 3 u 2 5 6 8
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) . 7 u,w,v,x,y,z,s,t 3 u 2 5 6 8 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

38 Shortest-Path Tree Shortest-path tree from u Routing table at u v
w (u,w) x y z link s t 3 2 1 4 5 u v w x y z s t Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

39 Open Shortest First Path (OSPF)
It is the most widely used link-state routing protocols in practice Open: Publicly available SPF: Alternative name for link-state OSPF adds a number of features to the basic link-state Authentication: Make sure all nodes can be trusted Additional hierarchy: Network domain divided further in to areas: a router might just need to get to a right area Load balancing: Allow multiple routes to the same place to be assigned the same cost: traffic distributed evenly to those routers Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

40 Distance Vector vs. Link-State
Distance vector: each node talks only to its directly connected neighbors, but it tell them everything it has learned, i.e., distance to all nodes Link-state: each node talks to all other nodes, but it tells them only what it knows for sure, i.e., state of its directly connected links Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

41 Distance Vector vs. Link-State
Who is the winner? Robustness: what happens if router malfunctions, misbehaves? LS: node can advertise incorrect link cost each node computes only its own table, providing a degree of robustness DV: DV node can advertise incorrect path cost each node’s table used by others , error propagate thru network Message complexity LS: with n nodes, E links, O(nE) msgs sent . A lot of information needs to be stored. DV: exchange between neighbors only Speed of Convergence LS: O(n2) algorithm requires O(nE) msgs DV: convergence time varies may be routing loops count-to-infinity problem Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

42 Routing in the Internet
Routing protocols we have learned so far: idealization, all routers identical, flat network Internet: Network of hundreds of thousands of networks: Not possible to directly using those protocols: they do not scale to those kinds of numbers!!! We need something else!!! Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

43 Routing in the Internet
Internet is organized as autonomous systems (AS) each of which is under the control of a single administrative entity Autonomous System (AS) corresponds to an administrative domain examples: University, company, backbone network, as may the network of a single ISP AS chooses its own routing protocol, e.g., distance-vector or link-state Divide routing problem in two parts: Intra-domain: We have already learned Inter-domain: Border Gateway Protocol (BGP) (BGP-v4) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

44 BGP Few books dedicated to BGP Key points:
Assumes the Internet is an arbitrarily interconnected set of AS‘s Impossible to define optimal path Advertise only reachability: complete paths as an enumerated lists of ASs to reach a particular network Does not belong to either distance-vector or link-state For further discussions (high points), see Chapter 4.1.2 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527


Download ppt "ECE 4450:427/527 - Computer Networks Spring 2017"

Similar presentations


Ads by Google