CS 3251- Computer Networks 1: Routing Algorithms



Similar documents
value in arriving packet s header routing algorithm local forwarding table header value output link

Network layer functions. Chapter 4 Network Layer. Connection setup. Interplay between routing and forwarding

Based on Computer Networking, 4 th Edition by Kurose and Ross

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Lecture 13: Distance-vector Routing. Lecture 13 Overview. Bellman-Ford Algorithm. d u (z) = min{c(u,v) + d v (z), c(u,w) + d w (z)}

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

6.263 Data Communication Networks

Route Discovery Protocols

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

Computer Networks. Main Functions

Chapter 4. Distance Vector Routing Protocols

Introduction to LAN/WAN. Network Layer

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

Internet Control Message Protocol (ICMP)

CS 5480/6480: Computer Networks Spring 2012 Homework 3 Due by 1:25 PM MT, Monday March 5 th 2012

CS335 Sample Questions for Exam #2

Inter-domain Routing. Outline. Border Gateway Protocol

Border Gateway Protocol (BGP)

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Routing Protocols (RIP, OSPF, BGP)

Chapter 10 Link-State Routing Protocols

Routing in packet-switching networks

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

Lecture 2.1 : The Distributed Bellman-Ford Algorithm. Lecture 2.2 : The Destination Sequenced Distance Vector (DSDV) protocol

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

10CS64: COMPUTER NETWORKS - II

Routing with OSPF. Introduction

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

Assignment #3 Routing and Network Analysis. CIS3210 Computer Networks. University of Guelph

Link-State Routing Protocols

Internet inter-as routing: BGP

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

IP addressing and forwarding Network layer

Answers to Sample Questions on Network Layer

O /27 [110/129] via , 00:00:05, Serial0/0/1

GregSowell.com. Mikrotik Routing

College 5, Routing, Internet. Host A. Host B. The Network Layer: functions

Exterior Gateway Protocols (BGP)

Faculty of Engineering Computer Engineering Department Islamic University of Gaza Network Chapter# 19 INTERNETWORK OPERATION

Network layer: Overview. Network layer functions IP Routing and forwarding

Introduction to TCP/IP

COMP 631: COMPUTER NETWORKS. Internet Routing. Jasleen Kaur. Fall Forwarding vs. Routing: Local vs. Distributed

Transport and Network Layer

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Border Gateway Protocol (BGP-4)

Router and Routing Basics

Layer 3 Routing User s Manual

Lecture 12: Link-state Routing"

Chapter 4 Network Layer

Routing and Packet Forwarding

Introduction to Dynamic Routing Protocols

IP Multicasting. Applications with multiple receivers

Active measurements: networks. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis Georgios Smaragdakis, Ph.D.

Routing Protocols OSPF CHAPTER. The following topics describe supported routing protocols. Topics include OSPF, page 9-1 IS-IS Protocol, page 9-3

Route Optimization. rek Petr Grygarek, VSB-TU Ostrava, Routed and Switched Networks 1

Chapter 5: Sample Questions, Problems and Solutions Bölüm 5: Örnek Sorular, Problemler ve Çözümleri Örnek Sorular (Sample Questions):

The Network Layer. Raj Jain. Washington University in St. Louis

WAN Wide Area Networks. Packet Switch Operation. Packet Switches. COMP476 Networked Computer Systems. WANs are made of store and forward switches.

OSPF Routing Protocol

Scalable Source Routing

Introduction to LAN/WAN. Network Layer (part II)

Module 2 Overview of Computer Networks

The Internet. Internet Technologies and Applications

Administrative Distance

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

How To Understand Bg

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

The Network Layer. Raj Jain. Washington University in St. Louis

Using the Border Gateway Protocol for Interdomain Routing

Ausgewählte Kapitel der Rechnernetze

Understanding Virtual Router and Virtual Systems

Table of Contents. Cisco How Does Load Balancing Work?

KT The Value Networking Company

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

Simulation of Heuristic Usage for Load Balancing In Routing Efficiency

Introduction to IP v6

A REPORT ON ANALYSIS OF OSPF ROUTING PROTOCOL NORTH CAROLINA STATE UNIVERSITY

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Internet inter-as routing: BGP

Lesson 5-3: Border Gateway Protocol

Lesson 13: MPLS Networks

Evaluation And Implementation Of The Open Shortest Path First (OSPF) Routing Protocol

Computer Networks II Master degree in Computer Engineering Exam session: 11/02/2009 Teacher: Emiliano Trevisani. Student Identification number

Internet Protocol: IP packet headers. vendredi 18 octobre 13

8.2 The Internet Protocol

IP Routing Configuring Static Routes

Internetworking and Internet-1. Global Addresses

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Transcription:

CS 35- Computer Networks : Routing Algorithms Professor Patrick Tranor 0//3 Lecture 3

Reminders The due date for Homework was moved to Thursda. Reason: Allow ou to attend toda s lecture. Project is still due in one week. Absolutel no etensions will be given.

Last Time Subnets provide granularit for address assignment and ease management. What is 9.68.8.0? 9.68.3.0? 9.68.8.0: 000000 00000 0000000 00000000 9.68.3.0: 000000 00000 0000000 00000000 What is NAT? DHCP? What are some securit issues associated with ICMP messages? 3

Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram networks 4.3 What s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing 4

Interpla between routing and forwarding routing algorithm routing algorithm determines end-end-path through network local forwarding table header 000 00 0 00 output link 3 forwarding table determines local forwarding at this router value in arriving packet s header 0 3 5

Graph abstraction 5 u v 3 3 w 5 Graph: G = (N,E) N = set of routers = { u, v, w,,, } E = set of links ={ (u,v), (u,), (v,), (v,w), (,w), (,), (w,), (w,), (,) } Aside: Graph abstraction is useful in other network contets Eample: PP, where N is set of peers and E is set of TCP connections 6

Graph abstraction: costs u 5 v 3 3 w 5 c(, ) = cost of link (, ) - e.g., c(w,) = 5 cost could alwas be, or inversel related to bandwidth, or inversel related to congestion Cost of path (,, 3,, p ) = c(, ) + c(, 3 ) + + c( p-, p ) Question: What s the least-cost path between u and? Routing algorithm: algorithm that finds least-cost path 7

What are the costs? We will speak ver generall about the idea of link cost. Some potential eamples include: Bandwidth/Speed Phsical Length Monetar Cost Polic Configurations 8

Routing Algorithm classification Global or decentralied information? Global: all routers have complete topolog, link cost info link state algorithms Decentralied: router knows phsicallconnected neighbors, link costs to neighbors iterative process of computation, echange of info with neighbors Static or dnamic? Static: routes change slowl over time Dnamic: routes change more quickl periodic update in response to link cost changes Load Sensitive or Insensitive Respond to traffic conditions distance vector algorithms 9

Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram networks 4.3 What s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing IPv6 0

A Link-State Routing Algorithm Dijkstra s algorithm net topolog, link costs known to all nodes accomplished via link state broadcast all nodes have same info computes least cost paths from one node ( source ) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest. s Notation: c(,): link cost from node to ; = if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitivel known

Dijsktra s Algorithm Initialiation: N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in N' such that D(w) is a minimum 0 add w to N' update D(v) for all v adjacent to w and not in N' : D(v) = min( D(v), D(w) + c(w,v) ) 3 /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N' Notation: c(,): link cost from node to ; = if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitivel known

Dijkstra s algorithm: eample Step 0 3 4 5 N' u u u uv uvw uvw D(v),p(v),u,u,u D(w),p(w) 5,u 4, 3, 3, D(),p(),u D(),p(), D(),p() 4, 4, 4, 5 u v 3 3 w 5 3

Dijkstra s algorithm: eample () Resulting shortest-path tree from u: v w u Resulting forwarding table in u: destination v w link (u,v) (u,) (u,) (u,) (u,) 4

Dijkstra s algorithm, discussion Algorithm compleit: n nodes each iteration: need to check all nodes, w, not in N n(n+)/ comparisons: O(n ) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic D A +e 0 0 0 e B C A +e 0 D 0 +e C 0 B D A 0 +e 0 0 C +e B A +e 0 D 0 +e C 0 B e initiall given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs given these costs, find new routing. resulting in new costs 5

Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram networks 4.3 What s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing IPv6 6

Distance Vector Algorithm Bellman-Ford Equation (dnamic programming) Define d () := cost of least-cost path from to Then: d () = min {c(,v) + d v () } v cost from neighbor v to destination cost to neighbor v min taken over all neighbors v of 7

Bellman-Ford eample 5 Clearl, d v () = 5, d () = 3, d w () = 3 u v 3 3 w Node that achieves minimum is net hop in shortest path forwarding table 5 B-F equation sas: d u () = min { c(u,v) + d v (), c(u,) + d (), c(u,w) + d w () } = min { + 5, + 3, 5 + 3} = 4 8

Distance Vector Algorithm D () = estimate of least cost from to Node knows cost to each neighbor v: c(,v) Node maintains distance vector D = [D (): є N ] Node also maintains its neighbors distance vectors For each neighbor v, maintains D v = [D v (): є N ] 9

Distance vector algorithm (4) Basic idea: Each node periodicall sends its own distance vector estimate to neighbors When a node receives new DV estimate from neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N Under natural conditions, the estimate D () converge to the actual least cost d () 0

Distance Vector Algorithm (5) Iterative, asnchronous: each local iteration caused b: local link cost change DV update message from neighbor Distributed: each node notifies neighbors onl when its DV changes neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to an dest has changed, notif neighbors

D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = node table from cost to 0 7 from cost to 0 3 0 7 0 D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 3 node table from cost to 0 7 node table cost to from 7 0 time

D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 3 node table cost to cost to cost to from 0 7 from 0 3 0 7 0 from 0 3 0 3 0 node table from cost to 0 from cost to 0 7 0 7 0 from cost to 0 3 0 3 0 7 node table cost to cost to cost to 0 7 0 3 from 7 0 from 0 3 0 from 0 3 0 3

Distance Vector: link cost changes Link cost changes: node detects local link cost change updates routing info, recalculates distance vector if DV changes, notif neighbors 4 50 good news travels fast At time t 0, detects the link-cost change, updates its DV, and informs its neighbors. At time t, receives the update from and updates its table. It computes a new least cost to and sends its neighbors its DV. At time t, receives s update and updates its distance table. s least costs do not change and hence does not send an message to. 4

Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slowl - count to infinit problem! 44 iterations before algorithm stabilies: see tet 60 4 50 Poisoned reverse: If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) will this completel solve count to infinit problem? 5

The DV Convergence Problem Before the link cost changes, costs are: D()=4, D()=, D()=, D()=5 What does see as the shortest route to when c(,)=60? Georgia Tech 60 4 50 D() = min{c(,) + D(), c(,) + D()} = min{60+0, +5} = 6 What happens at node after this? D() = min{c(,) + D(), c(,) + D()} = min{50+0, +6} = 7 Round and round it goes (44 times, to be eact) US Falcon - Information Assurance 6

Comparison of LS and DV algorithms Message compleit LS: with n nodes, E links, O(nE) msgs sent DV: echange between neighbors onl convergence time varies Speed of Convergence LS: O(n ) algorithm requires O(nE) msgs ma have oscillations DV: convergence time varies ma be routing loops Robustness: what happens if router malfunctions? LS: DV: node can advertise incorrect link cost each node computes onl its own table DV node can advertise incorrect path cost each node s table used b others error propagate thru network count-to-infinit problem 7

Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram networks 4.3 What s inside a router 4.4 IP: Internet Protocol Datagram format IPv4 addressing ICMP 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing IPv6 8

Hierarchical Routing Our routing stud thus far - idealiation all routers identical network flat not true in practice scale: with 600 million destinations: can t store all dest s in routing tables! administrative autonom Internet = network of networks each network admin ma want to control routing in its own network routing table echange would swamp links! 9

Hierarchical Routing aggregate routers into regions, autonomous sstems (AS) routers in same AS run same routing protocol Gatewa router Direct link to router in another AS intra-as routing protocol routers in different AS can run different intra-as routing protocol 30

Interconnected ASes 3c 3a 3b AS3 a c d b Intra-AS Routing algorithm AS Inter-AS Routing algorithm a c AS b Forwarding table is configured b both intraand inter-as routing algorithm Forwarding table Intra-AS sets entries for internal dests Inter-AS & Intra-As sets entries for eternal dests 3

Inter-AS tasks Suppose router in AS receives datagram for which the dest is outside of AS Router should forward packet towards one of the gatewa routers, but which one? AS needs:. to learn which dests are reachable through AS and which through AS3. to propagate this reachabilit info to all routers in AS Job of inter-as routing! 3c other networks 3b 3a AS3 a AS c d b a AS c b other networks 3

Eample: Setting forwarding table in router d Suppose AS learns (via inter-as protocol) that subnet is reachable via AS3 (gatewa c) but not via AS. Inter-AS protocol propagates reachabilit info to all internal routers. Router d determines from intra-as routing info that its interface I is on the least cost path to c. Puts in forwarding table entr (,I). other networks 3c 3a 3b AS3 a AS c d b a AS c b other networks 33

Eample: Choosing among multiple ASes Now suppose AS learns from the inter-as protocol that subnet is reachable from AS3 and from AS. To configure forwarding table, router d must determine towards which gatewa it should forward packets for dest. This is also the job on inter-as routing protocol! 3c other networks 3b 3a AS3 a AS c d? b a AS c b other networks 34

Eample: Choosing among multiple ASes Now suppose AS learns from the inter-as protocol that subnet is reachable from AS3 and from AS. To configure forwarding table, router d must determine towards which gatewa it should forward packets for dest. This is also the job on inter-as routing protocol! Hot potato routing: send packet towards closest of two routers. Learn from inter-as protocol that subnet is reachable via multiple gatewas Use routing info from intra-as protocol to determine costs of least-cost paths to each of the gatewas Hot potato routing: Choose the gatewa that has the smallest least cost Determine from forwarding table the interface I that leads to least-cost gatewa. Enter (,I) in forwarding table 35

Net Time Read Sections 4.6 and 4.7 Internet Routing and Multicast Project - Due net Tuesda 36