1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.

Slides:



Advertisements
Similar presentations
Network Layer – Routing 2 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Advertisements

Routing Protocol.
Courtesy: Nick McKeown, Stanford
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder
1 ELEN 602 Lecture 19 Routing. 2 Overview Forwarding vs Routing –forwarding: to select an output port based on destination address and routing table –routing:
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2011 Mike Freedman
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
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.
Routing and Routing Protocols Dynamic Routing Overview.
Interior Gateway Protocols: RIP & OSPF
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
Lecture Week 10 Link-State Routing Protocols. Objectives Describe the basic features & concepts of link-state routing protocols. List the benefits and.
Introduction to Routing and Routing Protocols By Ashar Anwar.
CS551: Unicast Routing Christos Papadopoulos (
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.
Packet-Switching Networks Routing in Packet Networks.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
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.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vector Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Link-State Routing Protocols Routing Protocols and Concepts – Chapter 10.
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.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
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.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vectore Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
1 Version 3.1 Module 6 Routed & Routing Protocols.
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Link-State Routing Protocols Routing Protocols and Concepts – Chapter 10.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
CS440 Computer Networks 1 Link State Routing and OSPF Neil Tang 10/31/2008.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Chapter 7 Packet-Switching Networks Shortest Path Routing.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
+ Dynamic Routing Protocols 2 nd semester
Computer Networks Routing Algorithms.
Routing Protocols and Concepts
Link-State Routing Protocols
CS 457 – Lecture 12 Routing Spring 2012.
Intra-Domain Routing Jacob Strauss September 14, 2006.
CS 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Intradomain Routing Outline Introduction to Routing
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Communication Networks
Advanced Computer Networks
Communication Networks
EE 122: Intra-domain routing: Link State
OSPF Protocol.
Presentation transcript:

1 Computer Networks Routing Algorithms

2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting the path to the destination layer-3 functionality –Forwarding

3 Routing Tables Routing Tables are built up by the routing algorithms with components: –Destination Network Address: The network portion of the IP address for the destination network –Subnet Mask: used to distinguish the network address from the host address –The IP address of the next hop to which the interface forwards the IP packet for delivery –The Interface with which the route is associated

4 Forwarding Tables After the routing lookup is completed and the next hop is determined, The IP packet is forwarded according to: Local delivery model –destination and host are on the same local network Remote delivery model –destination and host are on different networks

5 Static v.s. Dynamic Routing Static Routing Tables are entered manually Strengths of Static Routing –Ease of use –Control –Efficiency Weaknesses of Static Routing –Not Scalable –Not adaptable to link failures Dynamic Routing Tables are created through the exchange of information between routers on the availability and status of the networks to which an individual router is connected to. Two Types –Distance Vector Protocols RIP: Routing Information Protocol –Link State Protocols OSPF: Open Shortest Path First

6 Routing Metrics Used by dynamic routing protocols to establish preference for a particular route. Support Route Diversity and Load Balancing Most Common routing metrics: –Hop Count (minimum # of hops) –Bandwidth/Throughput (maximum throughput) –Load (actual usage) –Delay (shortest delay) –Cost

7 Dynamic Routing Protocols (1) Distance Vector (DV) Protocols –based on the Bellman-Ford algorithm –Each router on the network compiles a list of the networks it can reach (in the form of a distance vector) –exchange this list with its neighboring routers only –Upon receiving vectors from each of its neighbors, the router computes its own distance to each neighbor. –for every network X, router finds that neighbor who is closer to X than to any other neighbor. Router updates its cost to X.

8 Example: Initial Distances A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

9 Router E receives Router D Table A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

10 Router E updates cost to Router C A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

11 Router A receives Router B Table A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

12 Router A updates Cost to Router C A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

13 Router A receives Router E Table A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

14 Router A updates Costs to Routers C&D A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D 3 ~ 2 0 E ~ 2 0 E

15 Final Distances A BC D Info at node A B C D ABC Distance to node D E E E

16 Final Distances after a Link failure A BC D Info at node A B C D ABC Distance to node D E E E

Link Failure Causes “Bouncing” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost via A to infinity in distance table (not shown), & knows cost via C is 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

B Updates Distance to A A 25 1 B C Packet sent from C to A bounces between C and B until TTL=0! B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via

B Sends Dist. Vector to C A 25 1 B C C adds one to B’s advertised distance to A. (Why does C override its stored distance of 2 to A with 4, larger value?) B C2 1 destcost B B via A C1 3 destcost C C via A B1 4 destcost B B via

C Sends Dist. Vector to B A 25 1 B C B adds one to C’s advertised distance to A. (overrides its stored distance of 3 to A with 5, larger value) B C2 1 destcost B B via A C1 5 destcost C C via A B1 4 destcost B B via

Link Failure: Bad News Travels Slowly A 25 1 B C After 20+ exchanges, routing tables look like this: B C25 26 destcost C C via A C1 25 destcost C C via A B1 24 destcost B B via Assume A has advertised its link cost of 25 to C during B C exchanges. C stores this cost in its distance table (not shown)

Bad News Travels Slowly (2) A 25 1 B C C increments B’s update by 1, and chooses 25 via A to A, instead of 26 Via B to A B C25 26 destcost C C via A C1 25 destcost C C via A B1 25 destcost B A via

Bad News Travels Slowly (3) A 25 1 B C After 25 B-C exchanges, finally converge to stable routing B C25 26 destcost C C via A C1 26 destcost C C via A B1 25 destcost B A via

Link Failure Causes “Counting to Infinity” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost to 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

A-C Link Fails A 1 B C C detects link to A has failed, but no change in C’s routing table (why?) A C1 3 destcost C C via A B1 2 destcost B B via

Now, B and C Count to Infinity A 1 B C A C1 3 destcost C C via A B1 4 destcost B B via

B and C Count to Infinity (2) A 1 B C A C1 5 destcost C C via A B1 4 destcost B B via

32 Dynamic Routing Protocols (2) Link-State (LS) Protocols –Based on an algorithm by Dijkstra –Each router on the network is assumed to know the state of the links to all its neighbors –Each router will disseminate (via reliable flooding of link state packets, LSPs) the information about its link states to all routers in the network. –In this case, every router will have enough information to build a complete map of the network and therefore is able to construct a Shortest Path Spanning Tree from itself to every other router

33 Link State Packets The link state packets consist of the following information: –The address of the node creating the LSP –A list of directly connected neighbors to that node with the cost of the link to each neighbor –A sequence number to make sure it is the most recent one –A time-to-live to insure that an LSP doesn’t circulate indefinitely A node (router) will only send an LSP if there is a change of status to some of its links or if a timer expires

34 SPT algorithm (Dijkstra) SPT = {a} for all nodes v –if v is adjacent to a then D(v) = cost (a, v) –else D(v) = infinity Loop –find w not in SPT, where D(w) is min –add w in SPT –for all v adjacent to w and not in SPT D(v) = min (D(v), D(w) + C(w, v)) until all nodes are in SPT

Dijkstra’s Shortest Path Algorithm (1) Initialize shortest path tree SPT = {B} For each n not in SPT, C(n) = l(s,n) C(E) = 1, C(A) = 3, C(C) = 4, C(others) = infinity Add closest node to the tree: SPT = SPT U {E} since C(E) is minimum for all w not in SPT. No shorter path to E can ever be found via some other roundabout path. Shortest path tree SPT = {B, E}

Dijkstra’s Shortest Path Algorithm (2) Recalculate C(n) = MIN (C(n), C(E) + l(E,n)) for all nodes n not yet in SPT C(A) = MIN( C(A)=3, 1 + 1) = MIN(3,2) = 2 C(D) = MIN( infinity, 1 + 1) = 2 C(F) = MIN( infinity, 1 + 2) = 3 C(C ) = MIN( 4, 1 + infinity) = 4 Each new node in tree, could create a lower cost path, so redo costs

Dijkstra’s Shortest Path Algorithm (3) Loop again, select node with the lowest cost path: C(A) = 2, C(D) = 2, C(F) = 3, C(C ) = 4 SPT = SPT U {A} = {B, E, A} No shorter path can be found from B to A, regardless of any new nodes added to tree Recalc: C(n) = MIN (C(n), C(A) + l(A,n)) for all n not yet in SPT C(D) = MIN(2, 2+inf) = 2 C(F) = 3, C(C) = 4

Dijkstra’s Shortest Path Algorithm (4) Continue to loop, adding lowest cost node at each step and updating costs SPT crawls outward Remember to store the links in SPT as they are added (each node’s predecessor is stored) Each node has to store the entire topology, or database of link costs

39 Example AF B DE C BCDEF 1

40 Example (Continued) AF B DE C BCDEF 1

41 Example (Continued) AF B DE C BCDEF 5

42 Example (Continued) AF B DE C BCDEF

43 Example (Continued) AF B DE C BCDEF

44 Example (Continued) AF B DE C BCDEF