William Stallings Data and Computer Communications 7 th Edition Chapter 12 Routing.

Slides:



Advertisements
Similar presentations
Ch. 12 Routing in Switched Networks
Advertisements

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.
Ch. 12 Routing in Switched Networks Routing in Packet Switched Networks Routing Algorithm Requirements –Correctness –Simplicity –Robustness--the.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 12 – Routing in Switched Networks.
Data and Computer Communications
1 Chapter 6 Dynamic Programming Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
DIJKSTRA’s Algorithm. Definition fwd search Find the shortest paths from a given SOURCE node to ALL other nodes, by developing the paths in order of increasing.
1 Chapter-2: Routing Algorithms: Shortest Path and Widest Path Deep Medhi and Karthik Ramasamy August © D. Medhi & K.
Data and Computer Communications Ninth Edition by William Stallings Chapter 12 – Routing in Switched Data Networks Data and Computer Communications, Ninth.
Routing Basics What’s going on the back … Faisal Karim Shaikh DEWSNet Group Dependable Embedded Wired/Wireless Networks.
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Routing Strategies Fixed Routing
1 Routing Lesson 10 NETS2150/2850 School of Information Technologies.
EE 4272Spring, 2003 Chapter 10 Packet Switching Packet Switching Principles  Switching Techniques  Packet Size  Comparison of Circuit Switching & Packet.
Computer Networks The Data Link / Network Layer Functions: Routing
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
1 Routing Algorithms. 2 Outline zBellaman-Ford Algorithm zDijkstra Algorithm.
Routing Protocol Pertemuan 21 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
1 Shortest Path Algorithms. 2 Routing Algorithms Shortest path routing What is a shortest path? –Minimum number of hops? –Minimum distance? There is a.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
The Internet: Packet Switching and Other Big Ideas Ian Foster.
William Stallings Data and Computer Communications 7th Edition (Selected slides used for lectures at Bina Nusantara University) Routing.
ROUTING ON THE INTERNET COSC Aug-15. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
NETWORK LAYER (2) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Chapter 12 Routing in Switched Networks. Routing in Packet Switched Network  key design issue for (packet) switched networks  select route across network.
Computer Networks with Internet Technology William Stallings Chapter 11 Interior Routing Protocols.
Distributed Asynchronous Bellman-Ford Algorithm
WAN technologies and routing Packet switches and store and forward Hierarchical addresses, routing and routing tables Routing table computation Example.
TCP Traffic and Congestion Control in ATM Networks
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
CIS Routing in IP. Introduction Routers forward IP datagrams from one router to another on path from source to destination Router must have idea.
13 – Routing Algorithms Network Layer.
Data and Computer Communications Ninth Edition by William Stallings Unit 12 – Routing in Switched Data Networks Data and Computer Communications, Ninth.
Data Communications and Networking Chapter 11 Routing in Switched Networks References: Book Chapters 12.1, 12.3 Data and Computer Communications, 8th edition.
Advance Computer Networks Lecture#08 Instructor: Engr. Muhammad Mateen Yaqoob.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Networking and internetworking devices. Repeater.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
William Stallings Data and Computer Communications 7th Edition
Computer Networks with Internet Technology William Stallings Chapter 11 Interior Routing Protocols.
Shortest Path Algorithm
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.
Network-Layer Routing Routing tasks are methods of finding the paths for packet from their sources to their destinations. Routers are responsible mainly.
Distance Vector Routing
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
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.
William Stallings Data and Computer Communications
Centralized vs Distributed Routing
Routing on the internet
Routing on the internet
Dijkstra’s shortest path Algorithm
COMP 3270 Computer Networks
What is a router? A router is a device that connects multiple computers together. Not to be confused with a switch Routers transmit packets of data across.
Network Layer – Routing 1
CS 457 – Lecture 12 Routing Spring 2012.
Routing: Distance Vector Algorithm
Routing in Packet Networks Shortest Path Routing
Intradomain Routing Outline Introduction to Routing
Shortest Path Algorithm
Communication Networks
Network Layer (contd.) Routing
Shortest Path Algorithm
CSCI 465 Data Communications and Networks Lecture 16
Presentation transcript:

William Stallings Data and Computer Communications 7 th Edition Chapter 12 Routing

Performance Criteria Used for path selection —Minimum hop count —Minimum cost

Packet Switched Network example

Least Cost Algoritm Routing decision —Number of hops —link cost reflects capacity Network with bidirectional links Each link has a cost associated in both directions Path cost equal to sum of link costs Least cost path searched for each pair of nodes Costs can be different on diff. directions

Dijkstra Algorithm Definitions Searches the least cost path from a source node to all other nodes by examining paths of increasing length or number of hops N =set of nodes of the network s = source node T =setul of nodes incorporated in the algorithm w(i, j) = cost of link from node i to node j —w(i, i) = 0 —w(i, j) =  if not directly connected —w(i, j)  0 if directly connected L(n) = least cost path from node s to n known —At finish, L(n) is the least cost from s to all n

Dijkstra Algorithm Method Step 1 [Initialization] —T = {s} Source Node —L(n) = w(s, n) for n ≠ s —Initialy only link costs Step 2 [Next Node] —Searches neighbour node not incorporated in T with minimum cost to s —Incorporate nod in T Step 3 [Update least cost path] —L(n) = min[L(n), L(x) + w(x, n)] for all n  T —If second term is min. update path by concatenation [Finish ] Algorithm ends when all nodes incorporated in T

Algoritm Dijkstra Observations At finish, value L(x) asociated to each node x is the cost (lenght) of least cost path from s to x. T defines the least cost path from s to every other node One iteration of steps 2 and 3 adds a new node to T

Example Algorithm Dijkstra

Results for Dijkstra Algorithm Ite rat ion TL(2)PathL(3)PathL(4)PathL(5)PathL(6 ) Path 1{1}21– –4  -  - 2{1,4}21– –421-4–5  - 3{1, 2, 4}21– –421-4–5  - 4{1, 2, 4, 5} 21– –311–421-4– –6 5{1, 2, 3, 4, 5} 21– –311–421-4– –6 6{1, 2, 3, 4, 5, 6} –

Algoritm Bellman-Ford Definitions Find shortest paths from source node such that paths contain at most one link Find shortest paths such that paths have at most two links And so on s = source node w(i, j) = link cost from node i to node j w(i, i) = 0 w(i, j) =  if nodes are directly connected w(i, j)  0 if nodes directly connected h = maximum number of links in path at current stage L h (n) =cost of least-cost path from s to n such that no more than h links

Algorithm Bellman-Ford [Initialization] step 1 L 0 (n) = , for all n  s L h (s) = 0, for all h [Update] step 2 For each successive h  0: For each n ≠ s, compute L h+1 (n)= min j [L h (j)+w(j,n)] Connect n with predecessor node j that achieves minimum Eliminate any connection of n with different predecessor node formed during an earlier iteration Path from s to n terminates with link from j to n

Observaţii Algoritm Bellman- Ford At each iteration of step 2 for h=K and each destination node n, the algorithm compares paths from source s to n of length K+1 with the path from previous iteration The path with lesser cost is maintained as best cost path

Bellman-Ford Ex.

Bellman-Ford Results hL h (2)PathL h (3)PathL h (4)PathL h (5)PathL h (6)Path 0  -  -  -  -   - 

B.-F. vs. Dijkstra Dijkstra —Each node must know link costs of all links —Information must be exchanged with all other nodes Both converge under static conditions to same solution If costs change algorithm will attempt to catch up If cost depends on traffic Depends on routes chosen then feedback condition exists Bellman-Ford —Link cost to all neighboring nodes to node n [i.e., w(j, n)] plus total path cost to those neighboring nodes from a particular source node s [i.e., L h (j)] —Each node can maintain set of costs and associated paths for every other node and exchange information with direct neighbors —Each node can use Bellman-Ford based only on information from neighbors and knowledge of its link costs —Instabilities may result