R OUTING P ROTOCOLS 1. P LAN Aug 16 – Routing (CCNA2) Aug 23 – LAB Aug 30- Transport L. Sep 6– Application L. Sep 13 – Presentation Sep 20 – Packet Tracer.

Slides:



Advertisements
Similar presentations
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Advertisements

Courtesy: Nick McKeown, Stanford
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
Routing & IP Routing Protocols
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing with.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer (Routing) Shivkumar.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
4: Network Layer4a-1 14: Intro to Routing Algorithms Last Modified: 7/12/ :17:44 AM.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Routing Algorithm March 3 rd, Routing Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links  link cost:
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
Intra-Domain Routing D.Anderson, CMU Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Computer Networking Lecture 10: Intra-Domain Routing
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.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
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.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
The Network Layer Part 1: Routing EE 122, Fall 2013 Sylvia Ratnasamy
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Routing 2 CS457 Fall 2010.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
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.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
Computer Networking Lecture 11: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 10: Intra-domain routing Slides used with.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Routing Link-State, Distance-Vector CS168 Section 2.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Network Layer.
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Network layer functions
Chapter 4 – The Network Layer & 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
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Network Layer.
EE 122: Intra-domain routing: Link State
Presentation transcript:

R OUTING P ROTOCOLS 1

P LAN Aug 16 – Routing (CCNA2) Aug 23 – LAB Aug 30- Transport L. Sep 6– Application L. Sep 13 – Presentation Sep 20 – Packet Tracer Exam Sep 27 – Final 1.Bluetooth () 2.xDSL() 3.RFID () 4.Ad Hoc Networks () 5.3G/4G evolution ScheduleReport Topic 2

V IEWING R OUTING AS A P OLICY Given multiple alternative paths, how to route information to destinations should be viewed as a policy decision What are some possible policies? Shortest path (RIP, OSPF) Load Balanced Power Aware QoS routing (satisfies app requirements) etc A E D CB F

D IFFERENT A PPROACHES Centralized vs distributed Centralized simpler, but not practical – central management, congestion, hard to scale… Source-based vs hop by hop Source puts path in header, can be more robust, but difficult to scale Single vs multiple path Router keeps multiple paths for each destination State-dependent vs state-independent Compute routes based on current network load (e.g. delay) Periodic versus On-demand On-demand proposed for wireless networks

I NTERNET R OUTING Internet topology roughly organized as a two level hierarchy First lower level – autonomous systems (AS’s) AS: region of network under a single administrative domain Each AS runs an intra-domain routing protocol Distance Vector, e.g., Routing Information Protocol (RIP) Link State, e.g., Open Shortest Path First (OSPF) Possibly others Second level – inter-connected AS’s Between AS’s runs inter-domain routing protocols, e.g., Border Gateway Routing (BGP) Standard today, BGP-4 5

E XAMPLE AS-1 AS-2 AS-3 Interior router BGP router 6

W HY DO WE N EED THE C ONCEPT OF AS OR D OMAIN ? Routing algorithms are not efficient enough to deal with the size of the entire Internet Different organizations may want different internal routing policies Allow organizations to hide their internal network configurations from outside Allow organizations to choose how to route across multiple organizations (BGP) Basically, easier to compute routes, more flexibility, more autonomy/independence 7

O UTLINE Two intra-domain routing protocols Both try to achieve the “shortest path” routing policy Quite commonly used OSPF: Based on Link-State routing algorithm RIP: Based on Distance-Vector routing algorithm 8

I NTRA - DOMAIN R OUTING P ROTOCOLS Based on unreliable datagram delivery Distance vector Routing Information Protocol (RIP), based on Bellman- Ford algorithm Each neighbor periodically exchange reachability information to its neighbors Minimal communication overhead, but it takes long to converge, i.e., in proportion to the maximum path length Link state Open Shortest Path First (OSPF), based on Dijkstra’s algorithm Each router periodically floods immediate reachability information to other routers Fast convergence, but high communication and computation overhead 9

R OUTING ON A G RAPH Goal: determine a “good” path through the network from source to destination Good often means the shortest path Network modeled as a graph Routers  nodes Link  edges Edge cost: delay, congestion level,… A E D CB F

L INK S TATE R OUTING (OSPF): F LOODING Each node knows its connectivity and cost to a direct neighbor Every node tells every other node this local connectivity/cost information Via flooding In the end, every node learns the complete topology of the network E.g. A floods message A E D CB F A connected to B cost 2 A connected to D cost 1 A connected to C cost 5 11

L INK S TATE F LOODING E XAMPLE

A L INK S TATE R OUTING A LGORITHM Dijkstra’s algorithm Net topology, link costs known to all nodes Accomplished via “link state flooding” All nodes have same info Compute least cost paths from one node (‘source”) to all other nodes Repeat for all sources Notations c(i,j): link cost from node i to j ; cost infinite if not direct neighbors D(v): current value of cost of path from source to node v p(v): path from source to v S: set of nodes whose least cost path definitively known 13

D IJSKTRA ’ S A LGORITHM (A “G REEDY ” A LGORITHM ) 1 Initialization: 2 S = {A}; 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v); 6 else D(v) = ; 7 8 Loop 9 find w not in S such that D(w) is a minimum; 10 add w to S; 11 update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); // new cost to v is either old cost to v or known // shortest path cost to w plus cost from w to v 13 until all nodes in S; 14

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A D(B),p(B) 2,AB D(C),p(C) 5,AC D(D),p(D) 1,AD D(E),p(E) D(F),p(F) A E D CB F Initialization: 2 S = {A}; 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v); 6 else D(v) = ; … 15

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A AD D(B),p(B) 2,AB D(C),p(C) 5,AC 4,ADC D(D),p(D) 1,AD D(E),p(E) 2,ADE D(F),p(F) A E D CB F … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 16

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A AD ADE D(B),p(B) 2,AB D(C),p(C) 5,AC 4,ADC 3,ADEC D(D),p(D) 1,AD D(E),p(E) 2,ADE D(F),p(F) 4,ADEF A E D CB F … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 17

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A AD ADE ADEB D(B),p(B) 2,AB D(C),p(C) 5,AC 4,ADC 3,ADEC D(D),p(D) 1,AD D(E),p(E) 2,ADE D(F),p(F) 4,ADEF A E D CB F … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 18

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A AD ADE ADEB ADEBC D(B),p(B) 2,AB D(C),p(C) 5,AC 4,ADC 3,ADEC D(D),p(D) 1,AD D(E),p(E) 2,ADE D(F),p(F) 4,ADEF A E D C B F … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 19

E XAMPLE : D IJKSTRA ’ S A LGORITHM Step start S A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,AB D(C),p(C) 5,AC 4,ADC 3,ADEC D(D),p(D) 1,AD D(E),p(E) 2,ADE D(F),p(F) 4,ADEF A E D CB F … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; 11update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 20

D ISTANCE V ECTOR R OUTING (RIP) What is a distance vector? Current best known cost to get to a destination Idea: Exchange distance vectors among neighbors to learn about lowest cost paths Dest.Cost A7 B1 D2 E5 F1 G3 Node C Note no vector entry for C itself At the beginning, distance vector only has information about directly attached neighbors, all other dests have cost  Eventually the vector is filled 21

D ISTANCE V ECTOR R OUTING Each local iteration caused by: Local link cost change Message from neighbor: its least cost path change from neighbor to destination Each node notifies neighbors only when its least cost path to any destination changes Neighbors then notify their neighbors if necessary wait for (change in local link cost or msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node: 22

D ISTANCE V ECTOR A LGORITHM ( CONT ’ D ) 1 Initialization: 2 for all nodes V do 3 if V adjacent to A 4 D( A, V, V ) = c( A,V ); /* Distance from A to V via neighbor V */ 5 else D( A, V, * ) = ∞; loop: 8 wait (until A sees a link cost change to neighbor V 9 or until A receives update from neighbor V ) 10 if (c( A, V ) changes by d ) 11 for all destinations Y through V do 12 D( A,Y, V ) = D( A,Y,V ) + d 13 else if (update D( V, Y ) received from V ) /* shortest path from V to some Y has changed */ 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new minimum for destination Y) 16 send D( A, Y ) to all neighbors /* D(A,Y) denotes the min D(A,Y,*) */ 17 forever 23

E XAMPLE : D ISTANCE V ECTOR A LGORITHM A C B D 3 1 Dest.CostNextHop B2B C7C D∞- Node A Dest.CostNextHop A2A C1C D3D Node B Dest.CostNextHop A7A B1B D1D Node C Dest.CostNextHop A∞- B3B C1C Node D 1 Initialization: 2 for all nodes V do 3 if V adjacent to A 4 D( A, V, V ) = c( A,V ); 5else 6 D( A, V, * ) = ∞; … 24

Dest.CostNextHop B2B C7C D8C Node A E XAMPLE : 1 ST I TERATION (C  A) A C B D 3 1 Dest.CostNextHop A2A C1C D3D Node B Dest.CostNextHop A7A B1B D1D Node C Dest.CostNextHop A∞- B3B C1C Node D D(A,D,C) = c(A, C) + D(C,D) = = 8 (D(C,A), D(C,B), D(C,D)) 7loop: … 13 else if (update D( V, Y ) received from V ) 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new min. for destination Y) 16 send D( A, Y ) to all neighbors 17 forever 25

Dest.CostNextHop B2B C3B D5B Node A E XAMPLE : 1 ST I TERATION (B  A, C  A) A C B D 3 1 Dest.CostNextHop A2A C1C D3D Node B Dest.CostNextHop A7A B1B D1D Node C Dest.CostNextHop A∞- B3B C1C Node D D(A,D,B) = c(A,B) + D(B,D) = = 5 D(A,C,B) = c(A,B) + D(B,C) = = 3 7 loop: … 13 else if (update D( V, Y ) received from V ) 14 D(A,Y,V) = c( A,V ) + D( V, Y ) 15 if (there is a new min. for destination Y) 16 send D( A, Y ) to all neighbors 17 forever 26

E XAMPLE : E ND OF 1 ST I TERATION A C B D 3 1 Dest.CostNextHop B2B C3B D5B Node A Dest.CostNextHop A2A C1C D2C Node B Dest.CostNextHop A3B B1B D1D Node C Dest.CostNextHop A5B B2C C1C Node D 7loop: … 13 else if (update D( V, Y ) received from V ) 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new min. for destination Y) 16 send D( A, Y ) to all neighbors 17 forever 27

E XAMPLE : E ND OF 2 ND I TERATION A C B D 3 1 Dest.CostNextHop B2B C3B D4B Node A Dest.CostNextHop A2A C1C D2C Node B Dest.CostNextHop A3B B1B D1D Node C Dest.CostNextHop A4C B2C C1C Node D 7 loop: … 13 else if (update D( V, Y ) received from V ) 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new min. for destination Y) 16 send D( A, Y ) to all neighbors 17 forever 28

E XAMPLE : E ND OF 3 RD I TERATION A C B D 3 1 Dest.CostNextHop B2B C3B D4B Node A Dest.CostNextHop A2A C1C D2C Node B Dest.CostNextHop A3B B1B D1D Node C Dest.CostNextHop A4C B2C C1C Node D Nothing changes  algorithm terminates 7 loop: … 13 else if (update D( V, Y ) received from V ) 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new min. for destination Y) 16 send D( A, Y ) to all neighbors 17 forever 29

D ISTANCE V ECTOR : L INK C OST C HANGES A C B 1 “good news travels fast” DCN A4A C1B Node B DCN A5B B1B Node C DCN A1A C1B DCN A5B B1B DCN A1A C1B DCN A2B B1B DCN A1A C1B DCN A2B B1B Link cost changes here time 7 loop: 8 wait (until A sees a link cost change to neighbor V 9 or until A receives update from neighbor V ) 10 if (c( A, V ) changes by d ) 11 for all destinations Y through V do 12 D( A,Y,V ) = D( A,Y,V ) + d 13 else if (update D( V, Y ) received from V ) 14 D(A,Y,V) = c( A,V ) + D( V, Y ); 15 if (there is a new minimum for destination Y) 16 send D( A, Y ) to all neighbors 17 forever Algorithm terminates 30

D ISTANCE V ECTOR : C OUNT TO I NFINITY P ROBLEM A C B 60 “bad news travels slowly” DCN A4A C1B Node B DCN A5B B1B Node C DCN A6C C1B DCN A5B B1B DCN A6C C1B DCN A7B B1B DCN A8C C1B DCN A7B B1B Link cost changes here ; recall that B also maintains shortest distance to A through C, which is 6. Thus D(B, A) becomes 6 ! time 7 loop: 8 wait (until A sees a link cost change to neighbor V 9 or until A receives update from neighbor V ) 10 if (c( A, V ) changes by d ) 11 for all destinations Y through V do 12 D( A,Y,V ) = D( A,Y,V ) + d ; 13 else if (update D( V, Y ) received from V ) 14 D( A,Y,V ) = c( A,V ) + D( V, Y ); 15 if (there is a new minimum for destination Y) 16 send D( A, Y ) to all neighbors 17 forever … 31

L INK S TATE VS. D ISTANCE V ECTOR Per node message complexity LS: O(n*d) messages; n – number of nodes; d – degree of node DV: O(d) messages; where d is node’s degree Complexity LS: O(n 2 ) with O(n*d) messages (with naïve priority queue) DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: node can advertise incorrect path cost each node’s table used by others; error propagate through network 32

Practice Problem 1. Run Dijkstra from Node B 2. Run Bellman-Ford fromNode B

D IJKSTRA FROM N ODE B Ite rati on T L(A) PathL(C) PathL(D) PathL(E) PathL(F) PathL(G) PathL(H) Path 1{B}1 BA2 BC9 BD  BG2 BH

D ISTANCE V ECTOR AT N ODE B 35 H L(A) PathL(C) PathL(D) PathL(E) PathL(F) PathL(G) PathL(H) Path 0 

H OMEWORK : T O BE HAND IN NEXT WEEK 1. Explain the following methods used to solve the Count-to-Infinity problem - Split Horizon - -Poison Reverse 2. Run Dijkstra from Node D and H 3. Run Bellman-Ford from Node D and H 36

D IJKSTRA FROM N ODE D Ite rati on T L(A) PathL(B) PathL(C) PathL(E) PathL(F) PathL(G) PathL(H) Path 1 {D}

D ISTANCE V ECTOR AT N ODE D 38 h L(A) PathL(B) PathL(C) PathL(E) PathL(F) PathL(G) PathL(H) Path 1 

D IJKSTRA FROM N ODE H Ite rati on T L(A) PathL(B) PathL(C) PathL(D) PathL(E) PathL(F) PathL(G) Path 1 {H}  HB  HG

D ISTANCE V ECTOR AT N ODE H 40 h L(A) PathL(B) PathL(C) PathL(D) PathL(E) PathL(F) PathL(G) Path 1 