ECE 4450:427/527 - Computer Networks Spring 2017

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Courtesy: Nick McKeown, Stanford
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Routing - I Important concepts: link state based routing, distance vector based routing.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
Routing So how does the network layer do its business?
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Delivery, Forwarding and
Routing Concepts Warren Toomey GCIT. Introduction Switches need to know the link address and location of every station. Doesn't scale well, e.g. to several.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.3: Routing Dr. Nghi Tran (ECE-University.
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
13 – Routing Algorithms Network Layer.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Routing and Routing Protocols CCNA 2 v3 – Module 6.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing Networks: Routing.
Network Layer.
Chapter 4: Network Layer
CS 5565 Network Architecture and Protocols
Routing: Link State Algorithm
CSE390 – Advanced Computer Networks
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Chapter 4: Network Layer
CS 457 – Lecture 12 Routing Spring 2012.
Introduction to Internet Routing
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
Fundamentals of Computer Networks ECE 478/578
Chapter 5: Dynamic Routing
Dan LI CS Department, Tsinghua University
Routing in Packet Networks Shortest Path Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
Dynamic Routing and OSPF
Chapter 4: Network Layer
CS 3700 Networks and Distributed Systems
Chapter 4: Network Layer
Network Layer Routing Networks: Routing.
Computer Networking Lecture 10: Intra-Domain Routing
Chapter 4: Network Layer
Communication Networks
Network Layer (contd.) Routing
Routing: Link State Algorithm
EE 122: Intra-domain routing: Distance Vector
Routing Outline Algorithms Scalability Spring 2003 CS 332.
Routing.
CSE 461: Link State Routing
EE 122: Intra-domain routing: Link State
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Dijkstra’s Algorithm: Implementation 1 Initialization: 2 S = {u} 3 for all nodes {a} 4 If a adjacent to u { 5 D(a) = c(u,a) 6 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: 12 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

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

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

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

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

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

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

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

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

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

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