Computer Networking Lecture 10: Intra-Domain Routing

Slides:



Advertisements
Similar presentations
Courtesy: Nick McKeown, Stanford
Advertisements

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.
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.
Computer Networking Lecture 9: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) Basically ripped off from.
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)
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
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)
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.
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
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.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
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)
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.
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.
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.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
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.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing Networks: Routing.
Network Layer.
The network layer: routing
CS 5565 Network Architecture and Protocols
CMPT 371 Data Communications and Networking Routing in the Internet
CSE390 – Advanced Computer Networks
Routing Information Protocol (RIP)
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Dynamic Routing Protocols part2
Network Layer Introduction Datagram networks IP: Internet Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
Distance Vector Routing: overview
Dan LI CS Department, Tsinghua University
Road Map I. Introduction II. IP Protocols III. Transport Layer
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS 4700 / CS 5700 Network Fundamentals
Routers Routing algorithms
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
Network Layer Routing Networks: Routing.
Communication Networks
COS 461: Computer Networks
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Communication Networks
Routing Outline Algorithms Scalability Spring 2003 CS 332.
Network Layer.
Computer Networks Protocols
Routing.
CSE 461: Link State Routing
Chapter 4: Network Layer
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

15-441 Computer Networking Lecture 10: Intra-Domain Routing RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Lecture 10: Intra-Domain Routing 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 Routing

Lecture 10: Intra-Domain Routing 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 3 1 F 1 2 6 1 D 3 A 4 B 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing Routes from Node A Forwarding Table for A Dest Cost Next Hop A B 4 C 6 E D 7 2 F 5 E C 3 1 F 1 2 6 1 D 3 A 4 B 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 9/28/2006 Lecture 10: Intra-Domain Routing

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 Routing

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

Distance-Vector Method Initial Table for A Dest Cost Next Hop A B 4 C  – D E 2 F 6 E C 3 1 F 1 2 6 1 D 3 A 4 B 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 9/28/2006 Lecture 10: Intra-Domain Routing

Distance-Vector Update z d(z,y) c(x,z) y x d(x,y) 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 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing 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 Routing

Lecture 10: Intra-Domain Routing Start Optimum 1-hop paths Table for A Dst Cst Hop A B 4 C  – D E 2 F 6 Table for B Dst Cst Hop A 4 B C  – D 3 E F 1 E C 3 1 F 1 2 6 1 D 3 A 4 B Table for C Dst Cst Hop A  – B C D 1 E F Table for D Dst Cst Hop A  – B 3 C 1 D E F Table for E Dst Cst Hop A 2 B  – C D E F 3 Table for F Dst Cst Hop A 6 B 1 C D  – E 3 F 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing Iteration #1 Optimum 2-hop paths Table for A Dst Cst Hop A B 4 C 7 F D E 2 5 Table for B Dst Cst Hop A 4 B C 2 F D 3 E 1 E C 3 1 F 1 2 6 1 D 3 A 4 B Table for C Dst Cst Hop A 7 F B 2 C D 1 E 4 Table for D Dst Cst Hop A 7 B 3 C 1 D E  – F 2 Table for E Dst Cst Hop A 2 B 4 F C D  – E 3 Table for F Dst Cst Hop A 5 B 1 C D 2 E 3 F 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing Iteration #2 Optimum 3-hop paths Table for A Dst Cst Hop A B 4 C 6 E D 7 2 F 5 Table for B Dst Cst Hop A 4 B C 2 F D 3 E 1 E C 3 1 F 1 2 6 1 D 3 A 4 B Table for C Dst Cst Hop A 6 F B 2 C D 1 E 4 Table for D Dst Cst Hop A 7 B 3 C 1 D E 5 F 2 Table for E Dst Cst Hop A 2 B 4 F C D 5 E 3 Table for F Dst Cst Hop A 5 B 1 C D 2 E 3 F 9/28/2006 Lecture 10: Intra-Domain Routing

Distance Vector: Link Cost Changes Node detects local link cost change Updates distance table If cost change in least cost path, notify neighbors X Z 1 4 50 Y algorithm terminates “good news travels fast” 9/28/2006 Lecture 10: Intra-Domain Routing

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

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

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 1 4 50 Y 60 algorithm terminates 9/28/2006 Lecture 10: Intra-Domain Routing

Poison Reverse Failures Table for A Dst Cst Hop C 7 F Table for B Dst Cst Hop C 8 A Table for D Dst Cst Hop C 9 B Table for F Dst Cst Hop C 1  F C 6 1 B D A 4 Table for A Dst Cst Hop C  – Table for F Dst Cst Hop C  – Forced Update Forced Update Table for A Dst Cst Hop C 13 D Better Route Table for B Dst Cst Hop C 14 A Forced Update Iterations don’t converge “Count to infinity” Solution Make “infinity” smaller What is upper bound on maximum path length? Table for D Dst Cst Hop C 15 B Forced Update Table for A Dst Cst Hop C 19 D • Forced Update 9/28/2006 Lecture 10: Intra-Domain Routing

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 Routing

Lecture 10: Intra-Domain Routing 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 every entry changes, send copy of entry to neighbors Except for one causing update (split horizon rule) Neighbors use to update their tables 9/28/2006 Lecture 10: Intra-Domain Routing

RIP Staleness / Oscillation Control Small Infinity Count to infinity doesn’t take very long Route Timer Every route has timeout limit of 180 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 Lots of subtlety to get good implementation (RFC 1058). 9/28/2006 Lecture 10: Intra-Domain Routing

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

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 Routing

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 X A C B D C B D (a) (b) X A X A C B D C B D (c) (d) 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing 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 Routing

Dijkstra’s Algorithm: Concept 2 5 3  Current Path Costs E C 3 1 F 2 2 6 1 Source Node D 3 A 3 B Done Unseen Horizon 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 9/28/2006 Lecture 10: Intra-Domain Routing

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

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

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

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

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

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

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

Lecture 10: Intra-Domain Routing OSPF Routing Protocol Open Open standard created by IETF Shortest-path first Another name for Dijkstra’s algorithm More prevalent than RIP 9/28/2006 Lecture 10: Intra-Domain Routing

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 3600 Sequence number Incremented each time sending new link information 9/28/2006 Lecture 10: Intra-Domain Routing

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 Routing

Lecture 10: Intra-Domain Routing 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 Routing

Lecture 10: Intra-Domain Routing 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 Routing

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 Routing

Lecture 10: Intra-Domain Routing Comparison of LS and DV Algorithms 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 9/28/2006 Lecture 10: Intra-Domain Routing

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

Lecture 10: Intra-Domain Routing 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 Routing

Lecture 10: Intra-Domain Routing 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 Routing

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

Area Hierarchy Addressing 1 2 2.2 1.1 2.1 2.2.2 1.2 2.2.1 1.2.1 1.2.2 3 3.2 3.1 9/28/2006 Lecture 10: Intra-Domain Routing

Lecture 10: Intra-Domain Routing Path Sub-optimality Can result in sub-optimal paths 1 2 2.1 2.2 1.1 1.2 2.2.1 1.2.1 start end 3.2.1 3 3 hop red path vs. 2 hop green path 3.2 3.1 9/28/2006 Lecture 10: Intra-Domain Routing

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