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

Similar documents
Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

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

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Chapter 4: Network Layer, partb

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Chapter 4: Network Layer

Chapter 4: outline. Network Layer 4-1

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

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

Computer Networking Introduction

Link-State Routing OSPF

Chapter IV: Network Layer

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Chapter 5 Network Layer: The Control Plane

Topics for This Week

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

CSc 450/550 Computer Networks Internet Routing

Chapter 4: Network Layer

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

Chapter 4 Network Layer

CSC 4900 Computer Networks: Routing Protocols

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Routing in the Internet

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

Chapter 4 Network Layer. Network Layer 4-1

DATA COMMUNICATOIN NETWORKING

Chapter 4: Network Layer: Part II

CSC 401 Data and Computer Communications Networks

Interplay between routing, forwarding

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

Network layer: Overview. Network layer functions Routing IP Forwarding

CSC 4900 Computer Networks: Routing Algorithms

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

Network Layer: Routing

Network layer: Overview. Network layer functions Routing IP Forwarding

COMP 3331/9331: Computer Networks and Applications

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter 4: Network Layer

Chapter 4: Network Layer

Lecture 4. The Network Layer (cont d)

DATA COMMUNICATOIN NETWORKING

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

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

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

EE 122: Intra-domain routing

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

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

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

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

Routing. Outline. Algorithms Scalability

Link State Rou.ng Reading: Sec.ons 4.2 and 4.3.4

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Routing. Jens A Andersson Communication Systems

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

CSC 8560 Computer Networks: Control Plane

Chapter 4: Network Layer

UNIT III THE NETWORK LAYER

COMP/ELEC 429/556 Introduction to Computer Networks

Link State Rou.ng Reading: Sec.ons 4.2 and 4.3.4

Redes de Computadores. Shortest Paths in Networks

More Routing. EE122 Fall 2012 Scott Shenker

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

Routing Unicast routing protocols

Computer Networks. Instructor: Niklas Carlsson

Why dynamic route? (1)

Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

Basic Idea. Routing. Example. Routing by the Network

Lecture 12: Link-state Routing. Lecture 12 Overview. Router Tasks. CSE 123: Computer Networks Chris Kanich. Routing overview

Routing by the Network

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Network layer functions

Chapter 4 Network Layer

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Dynamic Routing. The Protocols

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

EECS 122, Lecture 16. Link Costs and Metrics. Traffic-Sensitive Metrics. Traffic-Sensitive Metrics. Static Cost Metrics.

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

Routing. Advanced Computer Networks: Routing 1

CSCI Topics: Internet Programming Fall 2008

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

Network Layer: Routing

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

ETSF05/ETSF10 Internet Protocols Routing on the Internet

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

HY 335 Φροντιστήριο 8 ο

ICS 351: Today's plan. distance-vector routing game link-state routing OSPF

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Network Layer: Control Plane 5-2

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Lecture 19: Network Layer Routing in the Internet

Internet Routing Protocols Tuba Saltürk

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

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

Transcription:

9/9/6 S 7 Networking and the Internet Fall 06 Shortest-Path Problem Given: network topology with link costs c(x,y): link cost from node x to node y Infinity if x and y are not direct neighbors ompute: least-cost paths to all nodes From a given source u to all other nodes p(v): predecessor node along path from source to v u p(v) v Dijkstra s Shortest-Path lgorithm Iterative algorithm fter k iterations, know least-cost path to k nodes S: nodes whose least-cost path definitively known Initially, S = {u} where u is the source node dd one node to S in each iteration D(v): current cost of path from source to node v Initially, D(v) = c(u,v) for all nodes v adjacent to u and D(v) = for all other nodes v ontinually update D(v) as shorter paths are learned

9/9/6 Dijsktra s Shortest Path lgorithm Notation: Initialization: c(x,y): link cost from node x to y; = if not direct neighbors N' = {u} D(v): current value of cost of path for all nodes v from source to dest. v if v adjacent to u p(v): predecessor node along path then D(v) = c(u,v) from source to v 6 else D(v) = N': set of nodes whose least cost path is definitively known 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) ) /* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */ until all nodes in N' Dijkstra s lgorithm Example Dijkstra s lgorithm Example

9/9/6 Shortest-Path Tree Shortest-path tree from u u v w x s y t Forwarding table at u link z v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) s (u,w) t (u,w) Dijkstra s lgorithm Limitations lgorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n(n+)/ comparisons: O(n ) more efficient implementations possible: O(mlogn) Oscillations possible when link costs change: e.g., link cost = amount of carried traffic +e D 0 0 B 0 e e initially +e 0 D B 0 +e 0 recompute routing 0 +e D 0 B 0 +e recompute +e 0 D B 0 +e e recompute Link-State Routing Each router keeps track of its incident links Whether the link is up or down The cost on the link Each router broadcasts the link state To give every router a complete view of the graph Each router runs Dijkstra s algorithm To compute the shortest paths and construct the forwarding table Example protocols Open Shortest Path First (OSPF) Intermediate System Intermediate System (IS-IS)

9/9/6 Detecting Topology hanges Beaconing Periodic hello messages in both directions Detect a failure after a few missed hellos hello Performance trade-offs Detection speed Overhead on link bandwidth and PU Likelihood of false detection Broadcasting the Link State Flooding Node sends link-state information out its links nd then the next node sends out all of its links except the one where the information arrived X X B D (a) B D (b) X X B D (c) B D (d) Broadcasting the Link State Reliable flooding Ensure all nodes receive link-state information and that they use the latest version hallenges Packet loss Out-of-order arrival Solutions cknowledgments and retransmissions Sequence numbers Time-to-live for each packet

9/9/6 When to Initiate Flooding Topology change Link or node failure Link or node recovery onfiguration change Link cost change Periodically Refresh the link-state information Typically (say) 0 minutes orrects for possible corruption of the data onvergence Getting consistent routing information to all nodes E.g., all nodes having the same link-state database onsistent forwarding after convergence ll nodes have the same link-state database ll nodes forward packets on shortest paths The next router on the path forwards to the next hop Transient Disruptions Detection delay node does not detect a failed link immediately and forwards data packets into a blackhole Depends on timeout for detecting lost hellos

9/9/6 Transient Disruptions Inconsistent link-state database Some routers know about failure before others The shortest paths are no longer consistent an cause transient forwarding loops onvergence Delay Sources of convergence delay Detection latency Flooding of link-state information Shortest-path computation reating the forwarding table Performance during convergence period Lost packets due to blackholes and TTL expiry Looping packets consuming resources Out-of-order packets reaching the destination Very bad for VoIP, online gaming, and video Reducing onvergence Delay Faster detection Smaller hello timers Link-layer technologies that can detect failures Faster flooding Flooding immediately Sending link-state packets with high-priority Faster computation Faster processors on the routers Incremental Dijkstra algorithm Faster forwarding-table update Data structures supporting incremental updates 6

9/9/6 omparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) messages sent DV: exchange between neighbors only onvergence time varies Speed of onvergence LS: O(n ) algorithm requires O(nE) messages DV: convergence time varies May be routing loops ount-to-infinity problem Robustness: what happens if router malfunctions? LS: Node can advertise incorrect link cost Each node computes only its own table DV: DV node can advertise incorrect path cost Each node s table used by others (error propagates) Summary Routing is a distributed algorithm React to changes in the topology ompute the shortest paths Two main shortest-path algorithms Dijkstra à link-state routing (e.g., OSPF and IS-IS) Bellman-Ford à distance vector routing (e.g., RIP) onvergence process hanging from one topology to another Transient periods of inconsistency across routers Routing in Practice 7

9/9/6 RIP (Routing Information Protocol) Distance vector algorithm Included in BSD-UNIX Distribution in 98 Distance metric: # of hops (max = hops) Distance vectors: exchanged among neighbors every 0 sec via Response Message (also called advertisement) Each advertisement: list of up to destination nets RIP: Example w x y D B z Destination Network Next Router Num. of hops to dest. w y B z B 7 x --..... Routing table in D RIP: Example Dest Next hops w - - x - - z.... dvertisement from to D w x y D B z Destination Network Next Router Num. of hops to dest. w y B z B 7 x --..... Routing table in D 8

9/9/6 RIP: Link Failure and Recovery If no advertisement heard after 80 sec --> neighbor/link declared dead routes via neighbor invalidated new advertisements sent to neighbors neighbors in turn send out new advertisements (if tables changed) link failure info quickly propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 6 hops) RIP Table processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated routed routed Transport (UDP) Network (IP) Link Physical Forwarding Table Forwarding Table Transport (UDP) Network (IP) Link Physical RIP Table example (continued) Router: giroflee.eurocom.fr Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 7.0.0. 7.0.0. UH 0 69 lo0 9.68.. 9.68.. U fa0 9... 9...6 U 80 le0 9.68.. 9.68.. U qaa0.0.0.0 9...6 U 0 le0 default 9...9 UG 0 Three attached networks (LNs) Router only knows routes to attached LNs Default router used to go up Route multicast address:.0.0.0 Loopback interface (for debugging) 9

9/9/6 OSPF (Open Shortest Path First) open : publicly available Uses Link State algorithm LS packet dissemination Topology map at each node Route computation using Dijkstra s algorithm OSPF advertisement carries one entry per neighbor router dvertisements disseminated via flooding arried in OSPF messages directly over IP (rather than TP or UDP OSPF advanced features (not in RIP) Security: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed (only one path in RIP) For each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains. 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 0

9/9/6 Hierarchical Routing aggregate routers into regions, autonomous systems (S) routers in same S run same routing protocol intra-s routing protocol routers in different S can run different intra-s routing protocol gateway routers special routers in S run intra-s routing protocol with all other routers in S also responsible for routing to destinations outside S run inter-s routing protocol with other gateway routers Routing in the Internet The Global Internet consists of utonomous Systems (S) interconnected with each other: Stub S: small corporation: one connection to other S s Multihomed S: large corporation (no transit): multiple connections to other S s Transit S: provider, hooking many S s together Two-level routing: Intra-S: administrator responsible for choice of routing algorithm within network Inter-S: unique standard for inter-s routing: BGP Internet S Hierarchy Intra-S border (exterior gateway) routers Inter-S interior (gateway) routers Network Layer -

9/9/6 Intra-S Routing lso known as Interior Gateway Protocols (IGP) Most common Intra-S routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (isco proprietary) Intra-S and Inter-S routing a Host h.b b.a.c a d b c Intra-S routing within S Inter-S routing between and B B.a a B c b Intra-S routing within S B Host h We ll examine specific inter-s and intra-s Internet routing protocols shortly Intra-S and Inter-S routing a.b b d.a a b.c c B.a a B c Gateways: perform inter-s routing amongst themselves b perform intra-s routers with other routers in their S inter-s, intra-s routing in gateway.c network layer link layer physical layer

9/9/6 Hierarchical OSPF -7 Hierarchical OSPF Two-level hierarchy: local area, backbone. Link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. rea border routers: summarize distances to nets in own area, advertise to other rea Border routers. Backbone routers: run OSPF routing limited to backbone. Boundary routers: connect to other S s. Network ddress Translation

9/9/6 NT: Network ddress Translation rest of Internet 8.76.9.7 local network (e.g., home network) 0.0.0/ 0.0.0. 0.0.0. 0.0.0. 0.0.0. ll datagrams leaving local network have same single source NT IP address: 8.76.9.7, different source port numbers Datagrams with source or destination in this network have 0.0.0/ address for source, destination (as usual) NT: Network ddress Translation Motivation: local network uses just one IP address as far as outside word is concerned: no need to be allocated range of addresses from ISP: - just one IP address is used for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus). NT: Network ddress Translation Implementation: NT router must: outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NT IP address, new port #)... remote clients/servers will respond using (NT IP address, new port #) as destination addr. remember (in NT translation table) every (source IP address, port #) to (NT IP address, new port #) translation pair incoming datagrams: replace (NT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NT table

9/9/6 NT: Network ddress Translation : NT router changes datagram source addr from 0.0.0., to 8.76.9.7, 00, updates table NT translation table WN side addr LN side addr 8.76.9.7, 00 0.0.0., S: 8.76.9.7, 00 D: 8.9.0.86, 80 8.76.9.7 S: 8.9.0.86, 80 D: 8.76.9.7, 00 : Reply arrives dest. address: 8.76.9.7, 00 0.0.0. S: 0.0.0., D: 8.9.0.86, 80 S: 8.9.0.86, 80 D: 0.0.0., : host 0.0.0. sends datagram to 8.9.0, 80 0.0.0. 0.0.0. 0.0.0. : NT router changes datagram dest addr from 8.76.9.7, 00 to 0.0.0., NT: Network ddress Translation 6-bit port-number field: 60,000 simultaneous connections with a single LN-side address! NT is controversial: routers should only process up to layer violates end-to-end argument NT possibility must be taken into account by app designers, eg, PP applications address shortage should instead be solved by IPv6