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

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

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

Third Generation Routers

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

CSCE 463/612 Networks and Distributed Processing Spring 2018

CSC 4900 Computer Networks: Routing Algorithms

Routing Algorithm Classification. A Link-State Routing Algorithm

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

Chapter 4: Network Layer, partb

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

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

Interplay between routing, forwarding

Chapter 4: Network Layer

Routing in a network

CS118 Discussion Week 7. Taqi

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

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

COMP/ELEC 429/556 Introduction to Computer Networks

CSC 401 Data and Computer Communications Networks

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

Dynamic Routing. The Protocols

EE 122: Intra-domain routing

CS4450. Computer Networks: Architecture and Protocols. Lecture 11 Rou+ng: Deep Dive. Spring 2018 Rachit Agarwal

Chapter 4: Network Layer

Important Lessons From Last Lecture Computer Networking. Outline. Routing Review. Routing hierarchy. Internet structure. External BGP (E-BGP)

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 5 Network Layer: The Control Plane

Redes de Computadores. Shortest Paths in Networks

CSE 461 Routing. Routing. Focus: Distance-vector and link-state Shortest path routing Key properties of schemes

Network Layer: Routing

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

DATA COMMUNICATOIN NETWORKING

CSc 450/550 Computer Networks Internet Routing

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

Chapter 4 Network Layer. Network Layer 4-1

Review: Routing in Packet Networks Shortest Path Algorithms: Dijkstra s & Bellman-Ford. Routing: Issues

Network Layer: Routing

COM-208: Computer Networks - Homework 6

Chapter 4 Network Layer

Network layer: Overview. Network layer functions Routing IP Forwarding

Lecture 4. The Network Layer (cont d)

Basic Idea. Routing. Example. Routing by the Network

Distance vector and RIP

Routing by the Network

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

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

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

Link-State Routing OSPF

CS 457 Networking and the Internet. What is Routing. Forwarding versus Routing 9/27/16. Fall 2016 Indrajit Ray. A famous quotation from RFC 791

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

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

Routing Outline. EECS 122, Lecture 15

Introduction to Internet Routing

CS118 Discussion 1A, Week 7. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

C13b: Routing Problem and Algorithms

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

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

Routing. Advanced Computer Networks: Routing 1

Youki Kadobayashi NAIST

Computer Networks. Instructor: Niklas Carlsson

Routing Unicast routing protocols

ETSF05/ETSF10 Internet Protocols Routing on the Internet

Intra-domain Routing

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

Chapter 4: Network Layer: Part II

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

TDC 363 Introduction to LANs

Overview. Problem: Find lowest cost path between two nodes Factors static: topology dynamic: load

RIP Configuration. RIP Overview. Operation of RIP. Introduction. RIP routing table. RIP timers

cs/ee 143 Communication Networks

Top-Down Network Design

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

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

Computer Networking Introduction

Routing. Outline. Algorithms Scalability

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

Youki Kadobayashi NAIST

Table of Contents 1 Static Routing Configuration RIP Configuration 2-1

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

Routing. Jens A Andersson Communication Systems

Routing Algorithms. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Topology. Youki Kadobayashi NAIST. Outline. Routing system: its function. Gateway Model Revisited. Routing system: its structure

Chapter 4: Network Layer

CS321: Computer Networks Unicast Routing

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

CSC 8560 Computer Networks: Control Plane

Routing Protocols. Autonomous System (AS)

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

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

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

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

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

Overview 4.2: Routing

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

Youki Kadobayashi NAIST

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

Why dynamic route? (1)

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

Transcription:

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

IP Forwarding The Story So Far IP addresses are structured to reflect Internet structure IP packet headers carry these addresses When Packet Arrives at Router Examine header to determine intended destination Look up in table to determine next hop in path Send packet out appropriate port This lecture How to generate the forwarding table Router

Graph Model Represent each router as node Direct link between routers represented by edge Symmetric links undirected graph Edge cost c(x,y) denotes measure of difficulty of using link delay, $ cost, or congestion level Task Determine least cost path from every node to every other node Path cost d(x,y) = sum of link costs E C F 6 A 4 D B

Routes from Node A Forwarding Table for A Dest Cost Next Hop A 0 A B 4 B C 6 E A E 6 4 F C D D 7 B B E E F 5 E Properties Some set of shortest paths forms tree Shortest path spanning tree Solution not unique E.g., A-E-F-C-D also has cost 7 4

Ways to Compute Shortest Paths Centralized Collect graph structure in one place Use standard graph algorithm Disseminate routing tables Link-state Every node collects complete graph structure Each computes shortest paths from it Each generates own routing table Distance-vector No one has copy of graph Nodes construct their own tables iteratively Each sends information about its table to neighbors 5

Outline Distance Vector Link State Routing Hierarchy 6

Distance-Vector Method Initial Table for A Dest Cost Next Hop E C A 0 A B 4 B C D A 6 4 F D E E B F 6 F Idea At any time, have cost/next hop of best known path to destination Use cost when no path known Initially Only have entries for directly connected nodes 7

Distance-Vector Update c(x,z) z d(z,y) x d(x,y) y Update(x,y,z) d c(x,z) + d(z,y) if d < d(x,y) else # Cost of path from x to y with first hop z # Found better path return d,z # Updated cost / next hop return d(x,y), nexthop(x,y) # Existing cost / next hop 8

Algorithm Bellman-Ford algorithm Repeat For every node x For every neighbor z For every destination y Until converge d(x,y) Update(x,y,z) 9

Start Optimum -hop paths Table for A Table for B E C A 0 A B 4 B C D E E F 6 F A 4 A B 0 B C D D E F F A 6 4 F B D Table for C Table for D Table for E Table for F A A A A A 6 A B B B B B B C 0 C C C C C C D D D 0 D D D E E E 0 E E E F F F F F F 0 F 0

Iteration # Optimum -hop paths Table for A Table for B E C A 0 A B 4 B C 7 F D 7 B E E F 5 E A 4 A B 0 B C F D D E 4 F F F A 6 4 F B D Table for C Table for D Table for E Table for F A 7 F A 7 B A A A 5 B B F B B B 4 F B B C 0 C C C C 4 F C C D D D 0 D D D C E 4 F E E 0 E E E F F F C F F F 0 F

Iteration # Optimum -hop paths Table for A Table for B E C A 0 A B 4 B C 6 E D 7 B E E F 5 E A 4 A B 0 B C F D D E 4 F F F A 6 4 F B D Table for C Table for D Table for E Table for F A 6 F A 7 B A A A 5 B B F B B B 4 F B B C 0 C C C C 4 F C C D D D 0 D D 5 F D C E 4 F E 5 C E 0 E E E F F F C F F F 0 F

Distance Vector: Link Cost Changes Link cost changes: Node detects local link cost change Updates distance table If cost change in least cost path, notify neighbors X 4 Y 50 Z good news travels fast algorithm terminates

Distance Vector: Link Cost Changes Link cost changes: Good news travels fast Bad news travels slow - count to infinity problem! 60 X 4 Y 50 Z algorithm continues on! 4

Distance Vector: Split Horizon If Z routes through Y to get to X : Z does not advertise its route to X back to Y 60 X 4 Y 50 Z algorithm terminates??? 5

Distance Vector: Poison 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) Immediate notification of unreachability, rather than split horizon timeout waiting for advertisement Will this completely solve count to infinity problem? 60 X 4 Y 50 Z algorithm terminates 6

Poison Reverse Failures Table for A Table for B Table for D Table for F C 7 F Table for A C Table for A C D C 8 A Forced Update Better Route C 9 B Forced Update C C Table for F C A 4 D 6 F B C Forced Update Table for B C 4 A Iterations don t converge Count to infinity Table for A C 9 D Forced Update Forced Update Table for D C 5 B Solution Make infinity smaller What is upper bound on maximum path length? 7

Routing Information Protocol (RIP) Earliest IP routing protocol (98 BSD) Current standard is version (RFC 7) Features Every link has cost Infinity = 6 Limits to networks where everything reachable within 5 hops Sending Updates Every router listens for updates on UDP port 50 RIP message can contain entries for up to 5 table entries 8

RIP Updates Initial When router first starts, asks for copy of table for every neighbor Uses it to iteratively generate own table Periodic Every 0 seconds, router sends copy of its table to each neighbor Neighbors use it to iteratively update their tables Triggered When every entry changes, send copy of entry to neighbors Except for one causing update (split horizon rule) Neighbors use it to update their tables Homework: (Graph Comp in Distr. Sys) Pregel: a system for large-scale graph processing 9

RIP Staleness / Oscillation Control Small Infinity Count to infinity doesn t take very long See Chuck Norris isn t the only one that can count to infinity (twice!) J (http://www.count-to-infinity.com/) Route Timer Every route has timeout limit of 80 seconds Reached when haven t received update from next hop for 6 periods If not updated, set to infinity Soft-state refresh à important concept! Behavior When router or link fails, can take minutes to stabilize 0

Outline Distance Vector Link State Routing Hierarchy

Link State Protocol Concept Every node gets complete copy of graph Every node floods network with data about its outgoing links Every node computes routes to every other node Using single-source, shortest-path algorithm Process performed whenever needed When connections die / reappear

Sending Link States by Flooding X Wants to Send Information Sends on all outgoing links When Node Y Receives Information from Z Send on all links other than Z X A C B D (a) X A C B D (c) X A C B D (b) X A C B D (d)

Dijkstra s Algorithm Given Graph with source node s and edge costs c(u,v) Determine least cost path from s to every node v Shortest Path First Algorithm Traverse graph in order of least cost from source 4

Dijkstra s Algorithm: Concept Source Node 0 Horizon Node Sets Done Already have least cost path to it Horizon: Reachable in hop from node in Done Unseen: Cannot reach directly from node in Done A E Done 6 5 F B C Label d(v) = path cost from s to v Path Keep track of last link in path D Unseen Current Path Costs 5

Dijkstra s Algorithm: Initially Source Node 0 A E 6 F C D Current Path Costs Horizon B Done Unseen No nodes done Source in horizon 6

Dijkstra s Algorithm: Initially Source Node 0 A E 6 6 F C D Current Path Costs Done Horizon B Unseen d(v) to node A shown in red Only consider links from done nodes 7

Dijkstra s Algorithm Source Node E 0 A Done 6 5 6 F Horizon B C D Unseen Current Path Costs Select node v in horizon with minimum d(v) Add link used to add node to shortest path tree Update d(v) information 8

Dijkstra s Algorithm Source Node 0 A E 6 Horizon 5 F C D Current Path Costs Done B Unseen Repeat 9

Dijkstra s Algorithm Source Node E 0 A Done 6 4 F B Unseen C Current Path Costs D 6 Horizon Update d(v) values Can cause addition of new nodes to horizon 0

Dijkstra s Algorithm E 4 C 5 Source Node 0 A 6 F B D 6 Final tree shown in green

Link State Characteristics With consistent LSDBs*, all nodes compute consistent loop-free paths Can still have transient loops *Link State Data Base A B D 5 C Packet from CàA may loop around BDC if B knows about failure and C & D do not

OSPF Routing Protocol Open Open standard created by IETF Shortest-path first Another name for Dijkstra s algorithm More prevalent than RIP

OSPF Reliable Flooding Transmit link state advertisements Originating router Typically, minimum IP address for router Link ID ID of router at other end of link Metric Cost of link Link-state age Incremented each second Packet expires when reaches 600 Sequence number Incremented each time sending new link information 4

OSPF Flooding Operation Node X Receives LSA from Node Y With Sequence Number q Looks for entry with same origin/link ID Cases No entry present Add entry, propagate to all neighbors other than Y Entry present with sequence number p < q Update entry, propagate to all neighbors other than Y Entry present with sequence number p > q Send entry back to Y To tell Y that it has out-of-date information Entry present with sequence number p = q Ignore it 5

Flooding Issues When should it be performed Periodically When status of link changes Detected by connected node What happens when router goes down & back up Sequence number reset to 0 Other routers may have entries with higher sequence numbers Router will send out LSAs with number 0 Will get back LSAs with last valid sequence number p Router sets sequence number to p+ & resends 6

Adoption of OSPF RIP viewed as outmoded Good when networks small and routers had limited memory & computational power OSPF Advantages Fast convergence when configuration changes 7

Comparison of LS and DV Algorithms Message complexity LS: with n nodes, E links, O(nE) messages DV: exchange between neighbors only Speed of Convergence LS: Relatively fast Complex computation, but can forward before computation may have transient loops DV: convergence time varies may have routing loops count-to-infinity problem faster with triggered updates Space requirements: LS maintains entire topology DV maintains only neighbor state Robustness: router malfunctions LS: Node can advertise incorrect link cost Each node computes its own table DV: Node can advertise incorrect path cost Each node s table used by others (error propagates) 8

Outline Distance Vector Link State Routing Hierarchy 9

Routing Hierarchies Flat routing doesn t scale Storage à Each node cannot be expected to store routes to every destination (or destination network) Convergence times increase Communication à Total message count increases Key observation Need less information with increasing distance to destination Need lower diameters networks Solution: area hierarchy 40

Areas Divide network into areas Areas can have nested sub-areas Hierarchically address nodes in a network Sequentially number top-level areas Sub-areas of area are labeled relative to that area Nodes are numbered relative to the smallest containing area 4

Routing Hierarchy Area-Border Router Backbone Areas Lower-level Areas Partition Network into Areas Within area Each node has routes to every other node Outside area Each node has routes for other top-level areas only Inter-area packets are routed to nearest appropriate border router Constraint: no path between two sub-areas of an area can exit that area 4

Area Hierarchy Addressing.............. 4

Path Sub-optimality Can result in sub-optimal paths...... start end.... hop red path vs. hop green path.. 44

Extension: BGP How to connect together different ISPs 45

EXTRA SLIDES The rest of the slides are FYI

RIP Table Processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated 47

Dijsktra s Algorithm Initialization: N = {A} for all nodes v 4 if v adjacent to A 5 then D(v) = c(a,v) 6 else D(v) = infinity 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 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N 48

49 Dijkstra s algorithm: example Step 0 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B),A,A,A D(C),p(C) 5,A 4,D,E,E D(D),p(D),A D(E),p(E) infinity,d D(F),p(F) infinity infinity 4,E 4,E 4,E A E D C B F 5 5