15-441 Computer Networking Lecture 9: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) Basically ripped off from.

Slides:



Advertisements
Similar presentations
Courtesy: Nick McKeown, Stanford
Advertisements

Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Distance-Vector and Path-Vector Routing Sections , 4.3.2, COS 461: Computer Networks Spring 2011 Mike Freedman
Routing - I Important concepts: link state based routing, distance vector based routing.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Routing & IP Routing Protocols
Distance-Vector Routing COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2011 Mike Freedman
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
4: Network Layer4a-1 14: Intro to Routing Algorithms Last Modified: 7/12/ :17:44 AM.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Distance Vector Routing Protocols W.lilakiatsakun.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 10 - Intra-Domain Routing.
Intra-Domain Routing D.Anderson, CMU Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
CS551: Unicast Routing Christos Papadopoulos (
Computer Networking Lecture 10: Intra-Domain Routing
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Link-state routing  each node knows network topology and cost of each link  quasi-centralized: each router periodically broadcasts costs of attached.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vector Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Routing 2 CS457 Fall 2010.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Network Layer session 1 TELE3118: Network Technologies Week 6: Network Layer Intra-Domain Routing Protocols Some slides have been taken from: r.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Computer Networking Lecture 11: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 10: Intra-domain routing Slides used with.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Network Layer.
CS 5565 Network Architecture and Protocols
CSE390 – Advanced Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Distance Vector Routing: overview
Dan LI CS Department, Tsinghua University
Road Map I. Introduction II. IP Protocols III. Transport Layer
CS 4700 / CS 5700 Network Fundamentals
CS 3700 Networks and Distributed Systems
CS 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
EE 122: Intra-domain routing: Distance Vector
Network Layer.
EE 122: Intra-domain routing: Link State
Presentation transcript:

Computer Networking Lecture 9: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) Basically ripped off from slides used by Srini Seshan and Dave Anderson /Fall’06

9/28/2006 Lecture 10: Intra-Domain Routing2 Outline Review/Overview Routing Hierarchy Distance Vector Link State

9/28/2006 Lecture 10: Intra-Domain Routing3 IP Forwarding The Story So Far… IP addresses are structure 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/next lecture How to generate the forwarding table Router

9/28/2006 Lecture 10: Intra-Domain Routing4 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 A E F C D B

9/28/2006 Lecture 10: Intra-Domain Routing5 Routes from Node A 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 A E F C D B Forwarding Table for A DestCostNext Hop A0A B4B C6E D7B E2E F5E

9/28/2006 Lecture 10: Intra-Domain Routing6 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

9/28/2006 Lecture 10: Intra-Domain Routing7 Outline Review/Overview Routing Hierarchy Distance Vector Link State

9/28/2006 Lecture 10: Intra-Domain Routing8 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

9/28/2006 Lecture 10: Intra-Domain Routing9 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

9/28/2006 Lecture 10: Intra-Domain Routing10 Routing Hierarchy 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 Backbone Areas Lower-level Areas Area-Border Router

9/28/2006 Lecture 10: Intra-Domain Routing11 Area Hierarchy Addressing

9/28/2006 Lecture 10: Intra-Domain Routing12 Path Sub-optimality hop red path vs. 2 hop green path start end Can result in sub-optimal paths

9/28/2006 Lecture 10: Intra-Domain Routing13 Outline Review/Overview Routing Hierarchy Distance Vector Link State

9/28/2006 Lecture 10: Intra-Domain Routing14 Distance-Vector Method 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 A E F C D B Initial Table for A DestCostNext Hop A0A B4B C  – D  – E2E F6F

9/28/2006 Lecture 10: Intra-Domain Routing15 Distance-Vector Update Update(x,y,z) d  c(x,z) + d(z,y) # Cost of path from x to y with first hop z if d < d(x,y) # Found better path return d,z # Updated cost / next hop else return d(x,y), nexthop(x,y) # Existing cost / next hop x z y c(x,z) d(z,y) d(x,y)

9/28/2006 Lecture 10: Intra-Domain Routing16 Algorithm Bellman-Ford algorithm Repeat For every node x For every neighbor z For every destination y d(x,y)  Update(x,y,z) Until converge

9/28/2006 Lecture 10: Intra-Domain Routing17 Start A E F C D B Table for A DstCstHop A0A B4B C  – D  – E2E F6F Table for B DstCstHop A4A B0B C  – D3D E  – F1F Table for C DstCstHop A  – B  – C0C D1D E  – F1F Table for D DstCstHop A  – B3B C1C D0D E  – F  – Table for E DstCstHop A2A B  – C  – D  – E0E F3F Table for F DstCstHop A6A B1B C1C D  – E3E F0F Optimum 1-hop paths

9/28/2006 Lecture 10: Intra-Domain Routing18 Iteration #1 Table for A DstCstHop A0A B4B C7F D7B E2E F5E Table for B DstCstHop A4A B0B C2F D3D E4F F1F Table for C DstCstHop A7F B2F C0C D1D E4F F1F Table for D DstCstHop A7B B3B C1C D0D E  – F2C Table for E DstCstHop A2A B4F C4F D  – E0E F3F Table for F DstCstHop A5B B1B C1C D2C E3E F0F Optimum 2-hop paths A E F C D B

9/28/2006 Lecture 10: Intra-Domain Routing19 Iteration #2 Table for A DstCstHop A0A B4B C6E D7B E2E F5E Table for B DstCstHop A4A B0B C2F D3D E4F F1F Table for C DstCstHop A6F B2F C0C D1D E4F F1F Table for D DstCstHop A7B B3B C1C D0D E5C F2C Table for E DstCstHop A2A B4F C4F D5F E0E F3F Table for F DstCstHop A5B B1B C1C D2C E3E F0F Optimum 3-hop paths A E F C D B

9/28/2006 Lecture 10: Intra-Domain Routing20 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 Z Y 1 algorithm terminates “good news travels fast”

9/28/2006 Lecture 10: Intra-Domain Routing21 Distance Vector: Link Cost Changes Link cost changes: Good news travels fast Bad news travels slow - “count to infinity” problem! X Z Y 60 algorithm continues on!

9/28/2006 Lecture 10: Intra-Domain Routing22 Distance Vector: Split Horizon If Z routes through Y to get to X : Z does not advertise its route to X back to Y algorithm terminates X Z Y 60 ???

9/28/2006 Lecture 10: Intra-Domain Routing23 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) Eliminates some possible timeouts with split horizon Will this completely solve count to infinity problem? X Z Y 60 algorithm terminates

9/28/2006 Lecture 10: Intra-Domain Routing24 Poison Reverse Failures Iterations don’t converge “Count to infinity” Solution Make “infinity” smaller What is upper bound on maximum path length? Table for A DstCstHop C7F Table for B DstCstHop C8A Table for F DstCstHop C1C Table for F DstCstHop C  – Table for A DstCstHop C  – Forced Update Table for B DstCstHop C14A Forced Update FC B D A 4  Table for D DstCstHop C9B Forced Update Table for A DstCstHop C13D Better Route Table for D DstCstHop C15B Table for A DstCstHop C19D Forced Update Forced Update

9/28/2006 Lecture 10: Intra-Domain Routing25 Routing Information Protocol (RIP) Earliest IP routing protocol (1982 BSD) Current standard is version 2 (RFC 1723) Features Every link has cost 1 “Infinity” = 16 Limits to networks where everything reachable within 15 hops Sending Updates Every router listens for updates on UDP port 520 RIP message can contain entries for up to 25 table entries

9/28/2006 Lecture 10: Intra-Domain Routing26 RIP Updates Initial When router first starts, asks for copy of table for every neighbor Uses it to iteratively generate own table Periodic Every 30 seconds, router sends copy of its table to each neighbor Neighbors use to iteratively update their tables Triggered When ever an entry changes, send copy of entry to neighbors Except for one causing update (split horizon rule) (*NOTE*) Neighbors use to update their tables Not immediate, but slight delay to prevent cascading updates

9/28/2006 Lecture 10: Intra-Domain Routing27 RIP Staleness / Oscillation Control Small Infinity Count to infinity doesn’t take very long Timers Update: 30 seconds (Periodic advertisements Time-out: 180s (Route is dead if update not heard within this period) Flush: 120s (Wait after time-out before deleting, during this time advertised as infinity) Hold-down [Not standard]: 90s, typical (Freeze unreachable route to prevent receiving dated information) Behavior When router or link fails, can take minutes to stabilize

9/28/2006 Lecture 10: Intra-Domain Routing28 Outline Review/Overview Routing Hierarchy Distance Vector Link State

9/28/2006 Lecture 10: Intra-Domain Routing29 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

9/28/2006 Lecture 10: Intra-Domain Routing30 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 CBD (a) XA C BD (b) X A CB D (c) XA CBD (d)

9/28/2006 Lecture 10: Intra-Domain Routing31 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

9/28/2006 Lecture 10: Intra-Domain Routing32 Dijkstra’s Algorithm: Concept Node Sets Done Already have least cost path to it Horizon: Reachable in 1 hop from node in Done Unseen: Cannot reach directly from node in Done Label d(v) = path cost From s to v Path Keep track of last link in path A E F C D B Source Node Done Horizon Unseen   Current Path Costs

9/28/2006 Lecture 10: Intra-Domain Routing33 Dijkstra’s Algorithm: Initially No nodes done Source in horizon A E F C D B Source Node Done Horizon Unseen 0      Current Path Costs

9/28/2006 Lecture 10: Intra-Domain Routing34 Dijkstra’s Algorithm: Initially d(v) to node A shown in red Only consider links from done nodes A E F C D B Source Node Done Horizon Unseen   Current Path Costs

9/28/2006 Lecture 10: Intra-Domain Routing35 Dijkstra’s Algorithm Select node v in horizon with minimum d(v) Add link used to add node to shortest path tree Update d(v) information A E F C D B Source Node Done Horizon Unseen   Current Path Costs 65

9/28/2006 Lecture 10: Intra-Domain Routing36 Dijkstra’s Algorithm Repeat… A C Source Node Done Horizon Unseen   Current Path Costs F B D E

9/28/2006 Lecture 10: Intra-Domain Routing37 Dijkstra’s Algorithm Update d(v) values Can cause addition of new nodes to horizon Source Node Done Horizon Unseen  6 Current Path Costs A C 3 D B E F

9/28/2006 Lecture 10: Intra-Domain Routing38 Dijkstra’s Algorithm Final tree shown in green Source Node A C 3 D B E F

9/28/2006 Lecture 10: Intra-Domain Routing39 Link State Characteristics With consistent LSDBs*, all nodes compute consistent loop-free paths Can still have transient loops A B C D Packet from C  A may loop around BDC if B knows about failure and C & D do not X *Link State Data Base

9/28/2006 Lecture 10: Intra-Domain Routing40 OSPF Routing Protocol Open Open standard created by IETF Shortest-path first Another name for Dijkstra’s algorithm More prevalent than RIP Uses IP directly, not UDP Multicast to reduce network load

9/28/2006 Lecture 10: Intra-Domain Routing41 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 [Unlike RIP can be anything] Link-state age Incremented each second Packet expires when reaches 3600 Sequence number Incremented each time sending new link information

9/28/2006 Lecture 10: Intra-Domain Routing42 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

9/28/2006 Lecture 10: Intra-Domain Routing43 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+1 & resends

9/28/2006 Lecture 10: Intra-Domain Routing44 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

9/28/2006 Lecture 10: Intra-Domain Routing45 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: Complex computation But…can forward before computation may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem (faster with triggered updates) Space requirements: LS maintains entire topology DV maintains only neighbor state

9/28/2006 Lecture 10: Intra-Domain Routing46 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 errors propagate thru network Other tradeoffs Making LSP flood reliable Comparison of LS and DV Algorithms

9/28/2006 Lecture 10: Intra-Domain Routing47 Next Lecture: BGP How to connect together different ISPs

EXTRA SLIDES The rest of the slides are FYI

9/28/2006 Lecture 10: Intra-Domain Routing49 RIP Table Processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated

9/28/2006 Lecture 10: Intra-Domain Routing50 Dijsktra’s Algorithm 1 Initialization: 2 N = {A} 3 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 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

9/28/2006 Lecture 10: Intra-Domain Routing51 Dijkstra’s algorithm: example Step start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F