Chapter 4 Distributed Bellman-Ford Routing

Slides:



Advertisements
Similar presentations
1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Advertisements

4/12/2015© 2009 Raymond P. Jefferis IIILect Internet Protocol - Continued.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Berkeley slides were used for this tutorial 1 Internet Networking Spring 2003 Tutorial 3 DUAL Algorithm.
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
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder
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.
Berkeley slides were used for this tutorial1 Internet Networking Spring 2006 Tutorial 2 DUAL Algorithm.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 21 Introduction to Computer Networks.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—3-1 Determining IP Routes Introducing Distance Vector Routing.
Lecture Week 10 Link-State Routing Protocols. Objectives Describe the basic features & concepts of link-state routing protocols. List the benefits and.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
Count to infinity problem
1 Chapter 22 Network layer Delivery, Forwarding and Routing (part2)
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
Distance Vector Local Signpost Direction Distance Routing Table For each destination list: Next Node Distance Table Synthesis Neighbors exchange table.
Distance Vector Routing Protocols Dynamic Routing.
An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many.
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
Graph Algorithms Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
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.
Distance Vector Routing
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
6/12/2016© 2010 Raymond P. Jefferis IIILect The Network Layer.
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.
+ Dynamic Routing Protocols 2 nd semester
Network Layer.
The network layer: routing
CS 5565 Network Architecture and Protocols
Centralized vs Distributed Routing
(How the routers’ tables are filled in)
Routing Information Protocol (RIP)
Routing Protocols and Concepts
Link-State Routing Protocols
THE NETWORK LAYER.
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
ECE 544 Protocol Design Project 2016
Routing in Packet Networks Shortest Path Routing
CS 4700 / CS 5700 Network Fundamentals
Routers Routing algorithms
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Intradomain Routing Outline Introduction to Routing
Dynamic Routing and OSPF
RFC 1058 & RFC 2453 Routing Information Protocol
ECE453 – Introduction to Computer Networks
Communication Networks NETW 501
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Communication Networks
Advanced Computer Networks
EE 122: Intra-domain routing: Distance Vector
Communication Networks
Network Layer.
Distributed Systems CS
Presentation transcript:

Chapter 4 Distributed Bellman-Ford Routing Professor Rick Han University of Colorado at Boulder rhan@cs.colorado.edu

Prof. Rick Han, University of Colorado at Boulder Announcements Reminder: Programming assignment #1 is due Feb. 19 Homework #2 available on Web site, due Feb. 26 Hand back HW #1 next week OH cancelled yesterday, send me email to meet Next, more on IP routing, … Prof. Rick Han, University of Colorado at Boulder

Recap of Previous Lecture ARP IP Forwarding Tables Destination and Output Port IP Routing Distributed algorithm to create Forwarding Tables Calculate shortest path to each node Distance Vector (RIP) Presentation should have been better by me, textbook, etc. Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Equation Distance vector & RIP based on distributed implementation of Bellman-Ford algorithm Bellman-Ford equation: Label routers i=A, B, C, … Let D(i,j) = distance for best route from i to remote j Let d(i,j) = distance from router i to neighbor j Set to infinity if i=j or i and j not immediate neighbors Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Equation (2) D(i,j) = min {d(i,k) + D(k,j)} for all i<>j k neighbors Ex. D(B,F) = min {d(B,k) + D(k,F)} k=A,C,E Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Algorithm Bellman-Ford equation: D(i,j) = min {d(i,k) + D(k,j)} for all i<>j k neighbors Bellman-Ford Algorithm solves B-F Equation: To calculate D(i,j), node i only needs d(i,k)’s and D(k,j)’s from neighbors Problem: don’t know D(k,j)’s Solution: For each node i, first find shortest distance path from i to j using one link, D(i,j)[1] Shortest distance path using two or fewer links, D(i,j)[2], must depend on the shortest distance path using one link, namely D(i,j)[2] = min {d(i,j) + D(i,j)[1]} Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Algorithm (2) Key observation: By induction, the best (h+1 or fewer)-hop path between nodes i and j must be arise from an i-to-neighbor link connected with a (h or fewer)-hop path from neighbor to j : D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} Bellman-Ford Algorithm: D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} for all i<>j, h=0,1, … k neighbors Iterate h=0,1,2, … until reach diameter DM of graph D(i,j)[DM] is the originally desired B-F solution D(i,j) ! At each h, calculate D(i,j)[h+1] for all i<>j At h=0, D(i,j)[0] = {0 for i=j, infinity otherwise} D(i,i)[h] = link cost on which dist. vector is sent - 1 Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Algorithm Example Suppose C wants to find shortest path to each destination First, calculate shortest one-link paths from each node: easy, D(i,j)[1]=d(i,j) D(C,B)[1], D(C,D)[1], and D(B,A)[1], D(B,E)[1], D(B,C)[1], and D(D,E)[1], D(D,C)[1], and D(A,B)[1], D(A,E)[1], D(A,F)[1], and D(E,A)[1], D(E,B)[1], D(E,D)[1], D(E,F)[1], and D(F,A)[1], D(F,E)[1] Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Algorithm Example (2) Second, calculate shortest 2-or-fewer hop paths from each node: Example: for node C to F D(C,F)[2] = min (d(C,k) + D(k,F)[1]) for all j k neighbors = min {d(C,B) + D(B,F)[1], d(C,D) + D(D,F)[1]} No one-link path from B to F, so D(B,F)[1] is infinity, same for D(D,F)[1] Calculate D(i,j)[2] for all other combinations of i<>j Prof. Rick Han, University of Colorado at Boulder

Bellman-Ford Algorithm Example (3) Third, calculate shortest 3-or-fewer hop paths from each node: Example: for node C to F D(C,F)[3] = min {d(C,B) + D(B,F)[2], d(C,D) + D(D,F)[2]} No more unknowns: D(B,F)[2] is known by now and was calculated in the last iteration, = min{d(B,k) + D(k,F)[1]} D(D,F)[2] is also known Since diameter = 3, we’re done and have found all shortest distance paths D(i,j) Prof. Rick Han, University of Colorado at Boulder

Distributed Bellman-Ford Algorithm D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} for all i<>j, h=0,1, … k neighbors One way to implement in a real network: Flood d(i,j) first to every router in the network Calculate B-F Algorithm in each router Drawbacks: Generates lots of overhead Requires much computation on each router Duplication of many of calculations on each router Consider an alternative to distribute calculations Prof. Rick Han, University of Colorado at Boulder

Distributed Bellman-Ford Algorithm (2) D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} for all i<>j, h=0,1, … k neighbors Key observations: We had to calculate D(i,j)[h] for each node i in the graph, at each step h in the iteration At every iteration h, we only needed information about the h-1 or fewer hop paths to calculate D(i,j)[h] Prof. Rick Han, University of Colorado at Boulder

Distributed Bellman-Ford Algorithm (3) Therefore, in a real network, Physically distribute the calculation of D(i,j)[h] to router i only, and No duplication Less calculation Exchange the results of your D(i,j)[h] with neighboring routers at each iteration h Less overhead Satisfies condition that D(i,j)[h] only needs info on h-1 or less hop paths. At iteration h, d(i,j) within radius h-1 will be propagated to all routers within radius h-1 Prof. Rick Han, University of Colorado at Boulder

Distributed Bellman-Ford Algorithm (4) In practice, convergence will eventually occur even if different routers are slow to propagate or calculate their D(i,j)[h] and/or d(i,j) Bertsekas and Gallagher proved this, in the absence of topology changes Distributed routing algorithm where each router only performs a small but sufficient part of the overall B-F algorithm Node i calculates and sends D(i,j)[h] to its neighbors – this is a distance vector Distributed Bellman-Ford Algorithm = Distance Vector Algorithm Prof. Rick Han, University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Distance Table Bellman-Ford Algorithm: D(i,j)[h+1] = min {d(i,k) + D(k,j)[h]} for all i<>j, h=0,1, … k neighbors Each router i must maintain a “distance table”: Must store d(i,k), D(k,j)[h] for each neighbor k and destination j Costs D(k,j)[h] Neighbors k Destinations j k1 k2 k3 j1 D(k1,j1)[h] … j2 Prof. Rick Han, University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Distance Table (2) In reality, each cell in distance table stores d(i,k) + D(k,j)[h], not just D(k,j)[h] Must store d(i,k) or receive it within a neighbor’s distance vector advertisement If d(i,k) is a hop, then d(i,j)=1 always, so no need to store Costs D(k,j)[h] Neighbors k Destinations j k1 k2 k3 j1 d(i,k1) + D(k1,j1)[h] … j2 Prof. Rick Han, University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Routing Table Easy to derive a Routing Table from a distance table: choose the minimum distance in the row Costs D(k,j)[h] Neighbors k Destinations j k1 k2 k3 j1 d(i,k1) + D(k1,j1)[h] … j2 Routing Table At Router i Destinations j Outgoing link/port Cost j1 k2 j2 k3 Prof. Rick Han, University of Colorado at Boulder

Routing Information Protocol (RIP) RIP is a specific realization of the distance vector or distributed Bellman-Ford routing algorithm Distance vectors are carried over UDP over IP RIP uses hop count as its shortest path metric, so d(i,j)=1 Distance vectors are sent every 30 seconds When a routing table changes, a router can send triggered updates to neighbors before 30 sec Can lead to network storms, so limit rate: wait 5 seconds between sending new routing update and the update that caused routing table to change Prof. Rick Han, University of Colorado at Boulder

Alternative Shortest Path Calc. Compute a shortest path tree Observation: shortest path to nodes further from the root must go through a branch of the shortest path tree closer to the root Strategy: expand outwards, calculating the shortest path tree from the root Prof. Rick Han, University of Colorado at Boulder