CEN445 Network Protocols and Algorithms. Chapter 2. Routing Algorithms. Dr. Ridha Ouni

Similar documents
5.2 Routing Algorithms

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Chapter 5 (Week 9) The Network Layer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP BLM431 Computer Networks Dr.

Routing. 4. Mar INF-3190: Switching and Routing

Lecture 4 Wide Area Networks - Routing

CSC 4900 Computer Networks: Routing Algorithms

Telecommunication Protocols Laboratory Course. Lecture 3

Network Layer (Routing)

06/02/ Local & Metropolitan Area Networks. Overview. Routing algorithm ACOE322. Lecture 6 Routing

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

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

Alternate Routing Diagram

IP Forwarding Computer Networking. Routes from Node A. Graph Model. Lecture 10: Intra-Domain Routing

II. Principles of Computer Communications Network and Transport Layer

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

COMP/ELEC 429/556 Introduction to Computer Networks

Third Generation Routers

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Chapter 12. Routing and Routing Protocols 12-1

UNIT 2 ROUTING ALGORITHMS

Routing Algorithm Classification. A Link-State Routing Algorithm

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Computer Networks. Routing

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 4: Network Layer

C13b: Routing Problem and Algorithms

IP Forwarding Computer Networking. Graph Model. Routes from Node A. Lecture 11: Intra-Domain Routing

Computer Networks. Routing Algorithms

CS 43: Computer Networks. 23: Routing Algorithms November 14, 2018

Chapter 4: Network Layer

DATA COMMUNICATOIN NETWORKING

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE! 1. Link state flooding topology information finding the shortest paths (Dijkstra)

Chapter 4: Network Layer, partb

CSC 4900 Computer Networks: Routing Protocols

Chapter 4 Network Layer. Network Layer 4-1

CSCE 463/612 Networks and Distributed Processing Spring 2018

We will discuss about three different static routing algorithms 1. Shortest Path Routing 2. Flooding 3. Flow Based Routing

Routing, Routing Algorithms & Protocols

The Internet Protocol

EE 122: Intra-domain routing

Foundations of Telematics

Introduction to Internet Routing

Chapter 4: Network Layer

How Routing Algorithms Work

THE INTERNET PROTOCOL INTERFACES

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Data and Computer Communications. Chapter 12 Routing in Switched Networks

COMP 3331/9331: Computer Networks and Applications

Computer Networks. Wenzhong Li. Nanjing University

ECE 435 Network Engineering Lecture 11

BLM6196 COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS

THE INTERNET PROTOCOL/1

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 4. The Network Layer (cont d)

Routing. Advanced Computer Networks: Routing 1

Lecture 9. Network Layer (cont d) Network Layer 1-1

VI. ROUTING. - "routing protocol" nodes exchange information to ensure consistent understanding of paths

Distance-Vector Routing: Distributed B-F (cont.)

Lecture 19: Network Layer Routing in the Internet

Network layer: Overview. Network layer functions Routing IP Forwarding

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

ICMP, ARP, RARP, IGMP

Distance vector and RIP

Network Layer, Part 2 Routing. Terminology

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Routers & Routing : Computer Networking. Binary Search on Ranges. Speeding up Prefix Match - Alternatives

Chapter IV: Network Layer

WAN Technology and Routing

2/16/2008. Outline Computer Networking Lecture 11 Routing. Sending Link States by Flooding. Link State Protocol Concept

Redes de Computadores. Shortest Paths in Networks

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Network Layer: Routing

Lecture 12. Introduction to IP Routing. Why introduction? Routing

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Interplay between routing, forwarding

Routing Outline. EECS 122, Lecture 15

ECE 435 Network Engineering Lecture 11

CSCD 330 Network Programming Spring 2018

Routing in packet-switching networks

CSCD 330 Network Programming Spring 2017

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Routing Protocols. The routers in an internet are responsible for receiving and. forwarding IP datagrams through the interconnected set of

Internet Architecture. Network Layer Overview. Fundamental Network Layer Function. Protocol Layering and Data. Computer Networks 9/23/2009

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Basic Idea. Routing. Example. Routing by the Network

Where we are in the Course

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

ITEC310 Computer Networks II

Routing by the Network

Routing in Switched Networks

Network Layer Chapter 5

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Transcription:

3/4/04 EN44 Network Protocols and lgorithms hapter Routing lgorithms Dr. Ridha Ouni Department of omputer Engineering ollege of omputer and Information Sciences King Saud University References Some slides are inspired from the following references M. Dahshan, notes EN44 Network protocols and algorithms, Dep. of omp. Eng. IS, KSU. S. Nasri, notes S34 Intro. to comp. networks, Dep. of omp. Eng. ollege of omputer, QU., notes EN3 omputer Networks, Dep. of omp. Eng. IS, KSU.

3/4/04 Outline Routing algorithms Introduction Optimality principle Non-daptive Routing lgorithms Dijkstra s lgorithm looding daptive Routing lgorithms Distance Vector Routing Link State Routing Hierarchical Routing 3 Routing lgorithms Routing main function of network layer Routing algorithm decides which output line incoming packet should be transmitted on fills up and updates routing tables orwarding look up the routing tables and put the packet in the appropriate output line 4

3/4/04 Routing lgorithms (cont d) In connection-oriented service, the routing algorithm is performed only during connection setup In connectionless service, the routing algorithm is performed as each packet arrives Desired Properties orrectness Simplicity Robustness: ability to handle failures Stability: converge to equilibrium airness Optimality Possible onflict 6 3

3/4/04 Types of routing algorithms Non-adaptive/static routing routing decisions not based on traffic, topology, current state of the network. routes are computed in advance daptive routing hange their decisions to reflect changes in the topology and traffic Differ in: information source, update frequency and optimization metrics Hierarchical Routing is used to make these algorithms scale to large networks 7 Optimality Principle If router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route M I Set of optimal routes from all sources to a given destination form a tree rooted at the destination sink tree Goal of all routing algorithms: discover and use sink tree for all routers J K 8 4

3/4/04 The Optimality Principle Each portion of a best path is also a best path; the union of them to a router is a tree called the sink tree est means fewest hops in the example Network Sink tree of best paths to router Non-daptive Routing lgorithms Examples: Shortest Path Routing looding 0

3/4/04 Shortest Path Routing uild a graph of network Each node represent a router Each arc represent a link ind shortest path between the two nodes Shortest Path Routing or a pair of communicating hosts, there is a shortest path between them Shortness may be defined by: number of hops geographic distance mean queuing/transmission delay bandwidth cost 6

3/4/04 Dijkstra s lgorithm inds shortest paths from given source node S to all other nodes Starts from the source node and finds the nearest adjacent node Runs in stages, each time adding node with next shortest path algorithm terminates when all nodes are processed by algorithm (in set T) 3 Dijkstra s lgorithm Step [Initialization] T = {s} Set of nodes so far incorporated L(n) = w(s, n) for n s initial path costs to neighboring nodes are simply link costs 4 7

3/4/04 Dijkstra s lgorithm Step [Get Next Node] find neighboring node not in T with least-cost path from s incorporate node x into T (node marked as permanent) also incorporate the edge that is incident on that node and a node in T that contributes to the path Step 3 [Update Least-ost Paths] L(n) = min[l(n), L(x) + w(x, n)] for all n T if latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n Dijkstra s lgorithm 3 3 D E 6 8

3/4/04 Dijkstra s lgorithm 0 3 3 T={} D E 7 Dijkstra s lgorithm # T D E 0 {},,,, -, - 3 T={} 3 D E 8 9

3/4/04 Dijkstra s lgorithm # T D E {},,,, -, - 0 4 3 3 {,D}, 4, D -, D, - T={,D} D E 9 Dijkstra s lgorithm # T D E {},,,, -, - 0 4 {,D}, 4, D -, D, - 3 {,D,} - 4, D -, D, - 3 T={,D,} 3 D E 0 0

3/4/04 Dijkstra s lgorithm # T D E {},,,, -, - {,D}, 4, D -, D, - 3 {,D,} - 4, D -, D, - 0 4 {,D,,E} - 3, E - - 4, E 3 3 4 T={,D,,E} 3 D E 0 Dijkstra s lgorithm 3 3 # T D E {},,,, -, - {,D}, 4, D -, D, - 3 {,D,} - 4, D -, D, - 4 {,D,,E} - 3, E - - 4, E 4 3 {,D,,E,} - - - - 4, E T={,D,,E,} D E

3/4/04 Dijkstra s lgorithm # T D E {},,,, -, - {,D}, 4, D -, D, - 3 {,D,} - 4, D -, D, - 4 {,D,,E} - 3, E - - 4, E {,D,,E,} - - - - 4, E 6 {,D,,E,,} - - - - - 0 3 3 3 4 T={,D,,E,,} D E 3 Dijkstra s lgorithm Sink tree based on shortest paths D E 4

3/4/04 Dijkstra s lgorithm # T D E {},,,, -, - {,D}, 4, D -, D, - 3 {,D,} - 4, D -, D, - 4 6 {,D,,E} {,D,,E,} {,D,,E,,} - 3, E - - 4, E - - - - 4, E - - - - - Dijkstra s lgorithm Dijktra nimation Source: Wikipedia http://en.wikipedia.org/wiki/ile:dijkstra_nimation.gif 6 3

3/4/04 looding Send every packet to all lines except the one it arrived on Large number of duplicate packets P P P P P P P P P P P P P P 7 Reducing looding lgorithm s Limited area Solution Have a hop counter in the packet header IMPs decrement each arriving packet s hop counter IMPs discard a packet with hop count=0 Ideally, the hop counter should be initialized to the length of the path from the source to the destination 8 4

3/4/04 Reducing looding lgorithm s Duplicate Packets (cont d) Solution Require the first IMP hop to put a sequence number in each packet it receives from its hosts Each IMP maintains a table listing the sequence numbers it has seen from each first-hop IMP. The IMP can then discard packets it has already seen. 9 looding: Possible pplications Military pplications Large number of IMPs is desirable If one IMP is taken out (by a bomb?) flooding will still get packets to their destinations Distributed Databases Simultaneous updates of multiple databases can be done with a single packet transmission Wireless Networks Inherently broadcasting/flooding 30

3/4/04 daptive Routing lgorithms Problems with non-adaptive algorithms If traffic levels in different parts of the subnet change dramatically and often, nonadaptive routing algorithms are unable to cope with these changes Lots of computer traffic is bursty, but nonadaptive routing algorithms are usually based on average traffic conditions daptive routing algorithms can deal with these situations 3 daptive Routing lgorithms Each IMP periodically exchanges routing information (e.g., estimated time delay, queue length, etc.) with its neighbors Examples: Distance Vector Routing original RP net routing scheme, often called RIP (route information protocol) Link State Routing base for the current Internet routing algorithm 3 6

3/4/04 Distance Vector Routing Each router maintains a table containing destination best known distance to that destination line to use to get there Uses ellman-ord algorithm Used in RPNET and now used in RIP Distance can be any metric: delay, hop count, queue length, etc. 33 Distance Vector Routing Each router exchange with its neighbors list of delays to each destination Router X estimates delay to router Z Router Y is a neighbor to router X D(X,Z) =D(X,Y)+ D(Y,Z) 34 7

3/4/04 ellman-ord lgorithm ind shortest paths from given node subject to constraint that paths contain at most one link ind the shortest paths with a constraint of paths of at most two links and so on 3 ellman-ord lgorithm Step [Initialization] L 0 (n) =, for all n s L h (s) = 0, for all h Step [Update] or each successive h 0 or each n s, compute: L h+ (n) = min(for each j) [L h (j)+w(j,n)] n: node number s: source node h: hop count L h (n): least cost to n with no more than h hops connect n with predecessor node j that gives min 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 36 8

3/4/04 ellman-ord lgorithm 3 3 D E 37 ellman-ord lgorithm h D E 0, -, -, -, -, - 0 3 3 h = 0 D E 38 9

3/4/04 ellman-ord lgorithm h D E 0, -, -, -, -, -,,,, -, - 0 3 3 h = D E 39 ellman-ord lgorithm h D E 0, -, -, -, -, -,,,, -, -, 4, D,, D 0, 0 4 3 3 0 h = D E 40 0

3/4/04 ellman-ord lgorithm h D E 0, -, -, -, -, -,,,, -, -, 4, D,, D 0, 3, 3, E,, D 4, E 0 3 3 3 4 h = 3 D E 4 ellman-ord lgorithm h D E 0, -, -, -, -, -,,,, -, -, 4, D,, D 0, 3, 3, E,, D 4, E 4, 3, E,, D 4, E 0 3 3 3 4 h = 4 D E 4

3/4/04 Distance Vector Routing (a) subnet (b) Input from, I, H, K, and the new routing table for J 43 The ount-to-infinity Problem ailures can cause DV to count to infinity while seeking a path to an unreachable node X Good news. a new path to spreads quickly etc to infinity; bad news travels slow

3/4/04 Link State Routing Discover neighbors and learn their network addresses Each router measures the distance (in delay, hop count, etc.) between itself and its adjacent routers The router builds a packet containing all these distances. The packet also contains a sequence number and an age field. Send this packet to all other routers Once a router receives all the link state packets from the network, it can reconstruct the complete topology and compute a shortest path between itself and any other node using Dijsktra s algorithm. 4 Learning about Neighbors Send HELLO packet on point-to-point lines If routers are connected to a LN, the LN can be represented as a node 46 3

3/4/04 Measuring Line ost S D In queue Send EHO packet Wait for response Measure round-trip-time To take load into account: start timer when packet is queued To ignore the load: start timer when packet reaches the front of the queue RTT time Echo Reply Echo 47 uilding Link State Packets 48 4

3/4/04 Distributing Link State Packets Use flooding Packet contains sequence number When packet is received If new, forward to all except coming from If duplicate, discard If old, rejected 49 Distributing Link State Packets Problems Sequence number wrap around Use 3-bit sequence numbers Router crashes, seq. no. starts over Seq. no. corrupted: 640 instead of 4 Include age, decremented once per second 0

3/4/04 Hierarchical Routing Our routing study thus far - idealization all routers identical network flat not true in practice scale: with 00 million destinations: can t store all dest s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network Hierarchical Routing Routing tables grow with network size More router memory More PU time to scan them More bandwidth to send updates or large networks, better to do routing hierarchically Hierarchy can be in multiple levels regions clusters zones groups 6

3/4/04 Hierarchical Routing Problems can be solved: aggregate routers into regions, autonomous systems (S) routers in same S run same routing protocol (LS, DV) Within S: intra-s routing protocol routers in different S can run different intra-s routing protocol Gateway router To connect different Ss: edge routers add task for being responsible for routing outside S inter-autonomous system routing protocol. 3/4/04 8:8 M 3 Hierarchical Routing ull routing table has 7 entries Hierarchical routing table has 7 entries 4 7

3/4/04 Hierarchical Routing The gain in space is not free Increased path length for some hosts Example best route from to is via R with hierarchical routing all traffic to R is via R3 because it is better for most dests in R Homework Problem: Prove! Multicast Routing Multicasting sending message to a group of nodes routing algorithm called multicast routing Why multicasting? distributed processing broadcasting is inefficient, sometimes insecure Require group management create, destroy groups processes to join, leave groups 6 8

3/4/04 Multicast Routing 7 External References Data and omputer ommunications, Stallings, 8/E Dijkstra and ellman-ord algorithm descriptions and examples 8 9