CS4470 Computer Networking Protocols

Slides:



Advertisements
Similar presentations
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
Advertisements

13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Lecture 8 Overview. Graph abstraction u y x wv z Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v),
Routing - I Important concepts: link state based routing, distance vector based routing.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer The service should be independent of the router.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Lecture 7 Overview. Two Key Network-Layer Functions forwarding: move packets from router’s input to appropriate router output routing: determine route.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
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 Announcement #1 r Did you all receive homework #1 and #2? r Homework #3 will be available online during the day r Midterm.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
1 CSCD 330 Network Programming Spring 2014 Lecture 16 Network Layer Routing Protocols Reading: Chapter 4 Some slides provided courtesy of J.F Kurose and.
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.
Introduction 1 Lecture 21 Network Layer (Routing Activity) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
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.
13 – Routing Algorithms Network Layer.
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 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
CS 4284 Systems Capstone Godmar Back Networking. CS 4284 Spring 2013 Summary Basics of Network Layer –Routing (path selection) vs Forwarding (switching)
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
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.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
Project 2 r DUE Wed: 02/24 Network Layer4-1. Project 2 r DUE Wed: 02/24 r DUE Mon: 02/29 Network Layer4-2.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
CSE 421 Computer Networks. Chapter 4 Network Layer Thanks to you All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
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.
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.
CS 5565 Network Architecture and Protocols
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Chapter 7 Dynamic Routing
Routing Jennifer Rexford.
Chapter 4 Network Layer A note on the use of these ppt slides:
CMPT 880: Internet Architectures and Protocols
CS 457 – Lecture 12 Routing Spring 2012.
Network Layer Introduction Datagram networks IP: Internet Protocol
Routing: Distance Vector Algorithm
Chapter 5 Network Layer.
Chapter 4: outline 4.1 introduction
2017 session 1 TELE3118: Network Technologies Week 7: Network Layer Control Plane: Intra-Domain Routing Some slides have been adapted from: Computer Networking:
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.
CSCD 330 Network Programming
Chapter 4-4 routing and IP routing
Routers Routing algorithms
Chapter 6 Dynamic Programming
Chapter 4: Network Layer
CMPE 252A : Computer Networks
Chapter 4: Network Layer
Network Layer (contd.) Routing
Chapter 4: Network Layer
CSCD 330 Network Programming
Network Layer: Link-state and Distance-Vector Routing Protocols
Chapter 4: Network Layer
CSCD 330 Network Programming
EE 122: Intra-domain routing: Link State
Chapter 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

CS4470 Computer Networking Protocols 1/12/2019 CS4470 Computer Networking Protocols 11. Routing Huiping Guo Department of Computer Science California State University, Los Angeles

Outline Routing algorithms Link State Distance Vector 1/12/2019 Outline Routing algorithms Link State Distance Vector 11. Routing CS4470_F17

Routing/Forwarding Overview 1/12/2019 Routing/Forwarding Overview Extract destination IP address field Look up IP address in the routing table Find next hop address to forward to Send datagram to the next hop 11. Routing CS4470_F17

Source of Route Table Information 1/12/2019 Source of Route Table Information Manual Table created by hand Useful in small networks Useful if routes never change Automatic – Routing algorithms software creates/updates tables Needed in large networks Changes routes when failures occur 11. Routing CS4470_F17

Graph abstraction z x u y w v 1/12/2019 Graph abstraction u y x w v z 2 1 3 5 A graph is used to formulate routing problems Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x),(u,w), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Node y is a neighbor of node x if (x,y) is in E. 11. Routing CS4470_F17

Graph abstraction: costs u y x w v z 2 1 3 5 c(x,x’) = cost of link (x,x’) - e.g., c(w,z) = 5 cost: distance, link speed, bandwidth A path: a sequence of nodes Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) Question: What’s the least-cost path between u and z ? Routing algorithm: algorithm that finds least-cost path, or the shortest path 11. Routing CS4470_F17

Routing Algorithm classification 1/12/2019 Routing Algorithm classification Global or decentralized information? Global: all routers have complete knowledge of the network topology, link cost info etc “link state” algorithms Decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms 11. Routing CS4470_F17

Link state algorithm Each router keeps track of its 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) 11. Routing CS4470_F17

Dijkstra’s algorithm net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have same info computes least cost paths from one node (‘source”) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest.’s 11. Routing CS4470_F17

Dijkstra’s algorithm Notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): previous node along path from source to v N': set of nodes whose least cost path definitively known 11. Routing CS4470_F17

Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 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' 11. Routing CS4470_F17

Dijkstra’s algorithm: example Step 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x w v z 2 1 3 5 11. Routing CS4470_F17

Dijkstra’s algorithm: example Resulting shortest-path tree from u: u y x w v z Resulting forwarding table in u: v x y w z (u,v) (u,x) destination link 11. Routing CS4470_F17

Distance Vector Algorithm Distributed Each node receives some information from its directly attached neighbors. Each node performs a calculation and then distributes the results back to its neighbors Iterative The above process continues on until no more information is exchanged between neighbors. Asynchronous It does not require all of the nodes to operate in lockstep with each other Example protocol Routing Information Protocol (RIP) 11. Routing CS4470_F17

Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define dx(y) := cost of least-cost path from x to y C(x,v) :=link cost between x and v Then dx(y) = min {c(x,v) + dv(y) } where min is taken over all neighbors v of x 11. Routing CS4470_F17

Bellman-Ford example Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 u y x w v z 2 1 3 5 B-F equation says: du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 11. Routing CS4470_F17

Distance Vector Algorithm Dx(y) = estimate of least cost from x to y Distance vector: Dx = [Dx(y): y є N ] Node x knows cost to each neighbor v: c(x,v) Node x maintains Dx = [Dx(y): y є N ] Node x also maintains its neighbors’ distance vectors For each neighbor v, x maintains Dv = [Dv(y): y є N ] 11. Routing CS4470_F17

Distance vector algorithm Basic idea: Each node periodically sends its own distance vector estimate to neighbors When a node x receives new DV estimate from neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N If node x’s distance vector has changed as a result of this update step, x will send its updated DV to each of its neighbors. Each cost estimate Dx(y) converges to the actual cost dx(y) 11. Routing CS4470_F17

Distance Vector Algorithm 1/12/2019 Distance Vector Algorithm Each node: wait for (change in local link cost or message from neighbor) recompute estimates if DV to any destination has changed, notify neighbors Iterative, asynchronous: each local iteration caused by: Local link cost change Distance vector update message from neighbor Distributed: Each node notifies neighbors only when its DV changes Neighbors then notify their neighbors if necessary 11. Routing CS4470_F17

Distance Vector Example: Step 0 1/12/2019 Distance Vector Example: Step 0 Optimum 1-hop paths E F A C D B 2 3 6 4 1 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 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 11. Routing CS4470_F17

Distance Vector Example: Step 2 1/12/2019 Distance Vector Example: Step 2 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 A E F C D B 3 1 1 2 6 1 3 4 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 11. Routing CS4470_F17

Distance Vector Example: Step 3 1/12/2019 Distance Vector Example: Step 3 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 A E F C D B 3 1 1 2 6 1 3 4 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 11. Routing CS4470_F17

Comparison of LS and DV algorithms The two algorithms take complementary approaches towards computing routing Distance Vector Each node talks to ONLY its directly connected neighbors But it provides its neighbors with least-cost estimates from itself to ALL the notes in the network Link State Each node talks to ALL other notes (via broadcast) It tells them ONLY the costs of its directly connected links 11. Routing CS4470_F17