CSE390 – Advanced Computer Networks

Slides:



Advertisements
Similar presentations
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Advertisements

Courtesy: Nick McKeown, Stanford
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
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.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
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.
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.
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)
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
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.
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.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
4: Network Layer4b-1 OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map.
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:
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
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.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer.
The network layer: routing
CS 3700 Networks and Distributed Systems
CS 5565 Network Architecture and Protocols
Dynamic Routing Protocols II OSPF
CS 3700 Networks and Distributed Systems
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Dynamic Routing Protocols part2
Introduction to Internet Routing
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
Network layer functions
Dynamic Routing Protocols II OSPF
Routing in Packet Networks Shortest Path Routing
Chapter 4 – The Network Layer & Routing
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
CS 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
CS 3700 Networks and Distributed Systems
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
EE 122: Intra-domain routing: Distance Vector
Network Layer.
Computer Networks Protocols
Routing.
EE 122: Intra-domain routing: Link State
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

CSE390 – Advanced Computer Networks Christo Wilson 8/22/2012 CSE390 – Advanced Computer Networks Lecture 9: Intra Domain Routing Based on slides from D. Choffnes Northeastern U. Revised Fall 2014 by P. Gill Defense

Network Layer, Control Plane Function: Set up routes within a single network Key challenges: Distributing and updating routes Convergence time Avoiding loops Data Plane Application Presentation Session Transport Network RIP OSPF BGP Control Plane Data Link Physical

Internet Routing Internet organized as a two level hierarchy First level – autonomous systems (AS’s) AS – region of network under a single administrative domain Examples: Comcast, AT&T, Verizon, Sprint, etc. AS’s use intra-domain routing protocols internally Distance Vector, e.g., Routing Information Protocol (RIP) Link State, e.g., Open Shortest Path First (OSPF) Connections between AS’s use inter-domain routing protocols Border Gateway Routing (BGP) De facto standard today, BGP-4

AS Example AS-1 AS-3 Interior Routers AS-2 BGP Routers

Why Do We Need ASs? Easier to compute routes Greater flexibility Routing algorithms are not efficient enough to execute on the entire Internet topology Different organizations may use different routing policies Allows organizations to hide their internal network structure Allows organizations to choose how to route across each other (BGP) Easier to compute routes Greater flexibility More autonomy/independence

Routing on a Graph Goal: determine a “good” path through the network from source to destination What is a good path? Usually means the shortest path Load balanced Lowest $$$ cost Network modeled as a graph Routers  nodes Link  edges Edge cost: delay, congestion level, etc. 5 3 B C 5 2 2 1 A F 3 1 2 D E 1

Routing Problems Assume A network with N nodes Each node only knows Its immediate neighbors The cost to reach each neighbor How does each node learn the shortest path to every other node? 5 3 B C 5 2 2 1 A F 3 1 2 D E 1

Intra-domain Routing Protocols Distance vector Routing Information Protocol (RIP), based on Bellman-Ford Routers periodically exchange reachability information with neighbors Link state Open Shortest Path First (OSPF), based on Dijkstra Each network periodically floods immediate reachability information to all other routers Per router local computation to determine full routes

Distance Vector Routing Link State Routing Outline Distance Vector Routing RIP Link State Routing OSPF IS-IS

Distance Vector Routing What is a distance vector? Current best known cost to reach a destination Idea: exchange vectors among neighbors to learn about lowest cost paths No entry for C Initially, only has info for immediate neighbors Other destinations cost = ∞ Eventually, vector is filled Destination Cost A 7 B 1 D 2 E 5 F DV Table at Node C Routing Information Protocol (RIP)

Distance Vector Routing Algorithm Wait for change in local link cost or message from neighbor Recompute distance table If least cost path to any destination has changed, notify neighbors

Distance Vector Initialization Node A Node B 3 B D Dest. Cost Next B 2 C 7 D ∞ Dest. Cost Next A 2 C 1 D 3 2 1 1 A C 7 Initialization: for all neighbors V do if V adjacent to A D(A, V) = c(A,V); else D(A, V) = ∞; … Node C Node D Dest. Cost Next A 7 B 1 D Dest. Cost Next A ∞ B 3 C 1

Distance Vector: 1st Iteration Node A Node B 3 B D Dest. Cost Next B 2 C 7 D ∞ Dest. Cost Next A 2 C 1 D 3 2 1 1 3 B A C 7 8 5 C B 2 C … loop: else if (update D(V, Y) received from V) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); if (there is a new min. for dest. Y) send D(A, Y) to all neighbors forever D(A,C) = min(D(A,C), D(A,B)+D(B,C)) = min(7, 2 + 1) = 3 Node C Node D D(A,D) = min(D(A,D), D(A,B)+D(B,D)) = min(8, 2 + 3) = 5 D(A,D) = min(D(A,D), D(A,C)+D(C,D)) = min(∞, 7 + 1) = 8 Dest. Cost Next A 7 B 1 D Dest. Cost Next A ∞ B 3 C 1 3 B 4 B

Distance Vector: End of 3rd Iteration Node A Node B 3 B D Dest. Cost Next B 2 C 3 D 4 Dest. Cost Next A 2 C 1 D 2 1 1 A C 7 … loop: else if (update D(V, Y) received from V) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); if (there is a new min. for dest. Y) send D(A, Y) to all neighbors forever Nothing changes, algorithm terminates Until something changes… Node C Node D Dest. Cost Next A 3 B 1 D Dest. Cost Next A 4 C B 2 1

Good news travels fast Link Cost Changes, Algorithm Starts Christo Wilson 8/22/2012 loop: wait (link cost update or update message) if (c(A,V) changes by d) for all destinations Y through V do D(A,Y) = D(A,Y) + d else if (update D(V, Y) received from V) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); if (there is a new minimum for destination Y) send D(A, Y) to all neighbors forever B 1 4 1 A C 50 Link Cost Changes, Algorithm Starts Algorithm Terminates Good news travels fast D C N A 4 1 B D C N A 1 B D C N A 1 B D C N A 1 B Node B Change circles to rectangles, don’t block the text D C N A 5 B 1 D C N A 5 B 1 D C N A 2 B 1 D C N A 2 B 1 Node C Time Defense

Count to Infinity Problem Node B knows D(C, A) = 5 However, B does not know the path is C  B  A Thus, D(B,A) = 6 ! B 60 4 1 Bad news travels slowly A C 50 D C N A 4 1 B D C N A 6 1 B D C N A 6 1 B D C N A 8 1 B Node B D C N A 5 B 1 D C N A 5 B 1 D C N A 7 B 1 D C N A 7 B 1 Node C Time

Poisoned Reverse If C routes through B to get to A C tells B that D(C, A) = ∞ Thus, B won’t route to A via C B 60 4 1 Does this completely solve this count to infinity problem? NO Multipath loops can still trigger the issue A C 50 D C N A 4 1 B D C N A 60 1 B D C N A 60 1 B D C N A 51 1 B Node B D C N A 5 B 1 D C N A 5 B 1 D C N A 50 B 1 D C N A 50 B 1 Node C Time

Distance Vector Routing Link State Routing Outline Distance Vector Routing RIP Link State Routing OSPF IS-IS

Christo Wilson 8/22/2012 Link State Routing Each node knows its connectivity and cost to direct neighbors Each node tells every other node this information Each node learns complete network topology Use Dijkstra to compute shortest paths Why can we get away with this Defense

Flooding Details Each node periodically generates Link State Packet ID of node generating the LSP List of direct neighbors and costs Sequence number (64-bit, assumed to never wrap) Time to live Flood is reliable (ack + retransmission) Sequence number “versions” each LSP Receivers flood LSPs to their own neighbors Except whoever originated the LSP LSPs also generated when link states change

Dijkstra’s Algorithm 5 3 B C 5 2 2 1 A F 3 1 2 D E 1 … Loop Step Start S B C D E F A 2, A 5, A 1, A ∞ 1 AD 4, D 2, D 2 ADE 3, E 4, E 3 ADEB 4 ADEBC 5 ADEBCF 5 … Loop find w not in S s.t. D(w) is a minimum; add w to S; update D(v) for all v adjacent to w and not in S: D(v) = min( D(v), D(w) + c(w,v) ); until all nodes in S; 3 Initialization: S = {A}; for all nodes v if v adjacent to A then D(v) = c(A,v); else D(v) = ∞; … B C 5 2 2 1 A F 3 1 2 D E 1

OSPF vs. IS-IS OSPF IS-IS Two different implementations of link-state routing OSPF IS-IS Favored by companies, datacenters More optional features Built on top of IPv4 LSAs are sent via IPv4 OSPFv3 needed for IPv6 Favored by ISPs Less “chatty” Less network overhead Supports more devices Not tied to IP Works with IPv4 or IPv6

Different Organizational Structure OSPF IS-IS Organized around overlapping areas Area 0 is the core network Organized as a 2-level hierarchy Level 2 is the backbone Level 1 Level 2 Area 1 Area 2 Area 0 Level 1-2 Area 4 Area 3

Link State vs. Distance Vector Message Complexity O(n2*e) O(d*n*k) Time Complexity O(n*log n) O(n) Convergence Time O(1) O(k) Robustness Nodes may advertise incorrect link costs Each node computes their own table Nodes may advertise incorrect path cost Errors propagate due to sharing of DV tables Which is best? In practice, it depends. In general, link state is more popular. n = number of nodes in the graph d = degree of a given node k = number of rounds