Routing & IP Routing Protocols

Slides:



Advertisements
Similar presentations
Network Layer4-1 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would.
Advertisements

Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
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 –Datagram format.
Data Communication and Networks Lecture 11 Internet Routing Algorithms and Protocols December 5, 2002 Joseph Conron Computer Science Department New York.
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.
4a-1 CSE401: Computer Networks Hierarchical Routing & Routing in Internet S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
Network Layer-11 CSE401N: Computer Networks Lecture-9 Network Layer & Routing.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Introduction to Networking Bin Lin TA March 3 rd, 2005 Recital 6.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing with.
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.
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.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer (Routing) Shivkumar.
14 – Inter/Intra-AS Routing
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)
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 18.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
1 Week 6 Routing Concepts. 2 Network Layer Functions transport packet from sending to receiving hosts network layer protocols in every host, router path.
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.
4: Network Layer4a-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m routing (path selection) m dealing.
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.
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.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
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.
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
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,
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
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.
Internet and Intranet Protocols and Applications Lecture 9 Internet Routing Algorithms and Protocols March 27, 2002 Joseph Conron Computer Science Department.
4: Network Layer4a-1 Distance Vector Routing Algorithm iterative: r continues until no nodes exchange info. r self-terminating: no “signal” to stop asynchronous:
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 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.
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.
Chapter 4: Network Layer
Chapter 4: Network Layer
Distance Vector Routing: overview
Network layer functions
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
ECE453 – Introduction to Computer Networks
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
ECSE-4730: Computer Communication Networks (CCN)
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
EE 122: Intra-domain routing: Link State
Presentation transcript:

Routing & IP Routing Protocols

Routing: Problem Definition You are a router in a packet switched network and you receive a packet destined to some remote node E.g., router A below receives a packet destined to node F Question: How does A know where to send this packet? Does A send it to B? C? or D? Answer: Recall from our earlier discussion in IP that router A consults a forwarding table to make this decision Routing Problem: How does router A build this forwarding table? Built by a routing algorithm (protocol): The job of the routing algorithm is to determine the next hop router for ALL destinations in the network A E D C B F 2 1 3 5 Dest. Next Hop Cost B B 2 D D 1 C D 3 E D 2 F D 4 Forwarding Table in A

End-to-End Path Determination: Routing principles Routing protocol A E D C B F 2 1 3 5 Goal: determine “good” path (sequence of routers) thru network from source to dest. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: delay, $ cost, or congestion level (amount of traffic carried on the link) “good” path: typically means minimum cost path

Forwarding vs Routing Distinction between “Forwarding” and “Routing” Forwarding consists of taking a packet, looking at its destination address, consulting the forwarding table, and sending the packet in a direction determined by the table Very easy once the forwarding table has been built Routing is the process by which the forwarding table is built Need a routing protocol to dynamically build and maintain the table Dest. Next Hop Cost B B 2 D D 1 C D 3 E D 2 F D 4 Forwarding table in A A E D C B F 2 1 3 5

Routing Algorithm classification Global or decentralized information? Global: all routers have complete topology, link cost info “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

Link-State Algorithms: General Idea Have each router build the complete topology of the network Once the complete topology is built, have each router run an algorithm to compute the shortest path from itself to all other routers (nodes) in the network 2 Issues How does a router build the complete topology of the network? How does a router compute the shortest path to all other nodes in the network using this topology information? Dijkstra’s Shortest Path Algorithm A E D C B F 2 1 3 5

Building the Network Topology At the heart of a link state algorithm is the discovery of a node’s links’ states Each node is assumed to capable of finding out the state of the link to its neighbors (up or down) and the cost of each link Each node creates an update packet, also called a link-state packet (LSP) and periodically sends this information to all of its neighbors Node’s neighbors send the packet to their neighbors and so on until the LSP is received by all nodes in the network LSP Contents ID of the node -- A List of neighbors and the cost to each neighbor – (B, 2), (C, 5), (D, 1) A sequence number A time-to-live (TTL) A E D C B F 2 1 3 5

Reliable Flooding Reliable flooding is the process of making sure that all nodes get a copy of LSP from all other nodes in the network When a node X receives a copy of an LSP that originated at some other node Y, it checks to see if it has already stored a copy of an LSP from Y. If not, it stores the LSP. If it already has a copy, it compares the SeqNos; if the new LSP has a larger SeqNo, it is assumed to be more recent, and the last LSP is stored replacing the old one. Otherwise the new LSP is discarded A E D C B F 2 1 3 5 The new LSP is then forwarded on all neighbors of X except the neighbor from which the LSP was just received

Computing the Shortest Path: Dijkstra’s Algorithm Notation: Cost(i,j): link cost from node i to j. Cost(A, B) = 2 Cost(A, C) = 5 Cost(A, F) = infinity Distance(v): current value of cost of path from source to destination V Distance(D) = 1 Pred(v): predecessor node of v along path from source to v Pred(D) = A N: set of nodes whose least cost path definitively known A E D C B F 2 1 3 5

Dijsktra’s Algorithm – where A is the source node 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then Distance (v) = cost(A,v) 6 else Distance (v) = infinity 7 8 Loop 9 find w not in N such that Distance(w) is a minimum 10 add w to N 11 update Distance(v) for all v adjacent to w and not in N: 12 Distance(v) = min( Distance(v), Distance(w) + cost(w,v) ) 13 /* new distance to v is either old distance to v or known 14 shortest path distance to w plus cost from w to v */ 15 until all nodes in N

Dijkstra’s algorithm: example Step 1 2 3 4 5 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 5 3 B C 5 2 A 2 1 F 3 1 2 D E 1 Algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n*(n+1)/2 comparisons: O(n2) – O(nlogn) algorithm possible

Distance Vector Algos: General Idea We do NOT need to know the complete topology of the network to build the forwarding table! If a node X simply tells its neighbor Y the cost of reaching another node Z via itself (X), then neighbor Y can compute the cost of reaching Z via X by simply adding the cost of reaching X from Y and the cost of reaching Z from X, which was advertised by X Example If D tells A that it can reach E with a cost of 1, then A knows it can reach E via D with a cost of 1+1 = 2 If D tells A that it can reach F with a cost of 3, then A knows it can reach F via D with a cost of 1+3 = 4 A E D C B F 2 1 3 5

Distance Vector Routing Algorithm Each node tells its neighbors the cost of reaching every other node via itself A node computes its cost of reaching a destination via each of its neighbors and picks the best one distributed: each node communicates only with directly-attached neighbors iterative: continues until no nodes exchange new information self-terminating: no “signal” to stop D (Y,Z) X distance from X to Y via Z as next hop c(X,Z) + D (Z) Y = D (Y) min {D (Y,w)} w D (Z) Y C(X,Y) X Y Z C(X,T) T D (Z) T

Distance Table Structure Distance Table Data Structure each node has its own distance table row for each possible destination column for each directly-attached neighbor to node example: in node X, for dest. Y via neighbor Z: D () A B C D 1 7 6 4 14 8 9 11 5 2 E cost to destination via destination A E D C B 7 8 1 2

Distance Table gives Forwarding Table 1 7 6 4 14 8 9 11 5 2 E cost to destination via destination Outgoing link to use, cost A B C D A,1 D,5 D,4 destination Distance Table Forwarding (Routing) Table

Distance Vector Routing: overview Each node: wait for (msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Initialize the Distance Table Structure

Initialization At all nodes, X: 1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infinity /* the * operator means "for all rows" */ 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send D (y) to each neighbor /* Cost of reaching Y via X */ X X X

Distance Vector Algorithm: Example We need to adjust values if necessary X Z 1 2 7 Y This column shows the Init. results Init Info sent

Distance Vector Algorithm (cont.): 8 loop 9 wait (until I receive update from neighbor V) 10 if (update received from neighbor V wrt destination Y) 11 /* shortest path from V to some Y has changed */ 12 /* V has sent a new value for its DV(Y) */ 13 /* call this received new value is "newval" */ 14 for the single destination Y: D (Y,V) = c(X,V) + newval 15 16 if we have a new D (Y) for any destination Y 17 send new value of D (Y) to all neighbors 18 19 forever X X X

Distance Vector Algorithm: Example info sent Adjusted new value Initial values X Z 1 2 7 Y D (Z,Y) X c(X,Y) + D (Z) = 2+1 = 3 Y D (Y,Z) X c(X,Z) + D (Y) = 7+1 = 8 Z

Distance Vector Algorithm: Example Adjust values if necessary This column Shows the Init. results Init Info sent Adjusted new values New Info sent X Z 1 2 7 Y

Hierarchical Routing 1. scale: with 200 million destinations: Our routing study thus far assumed all routers to be “identical” and the network to be “flat” 2 Problems exist with such a model: 1. scale: with 200 million destinations: can’t store all destinations in routing tables! routing table exchange would swamp links! 2. administrative autonomy Can’t assume that a network with the scale of Internet will be administered by a single authority Solution? Internet is NOT flat, but is a network of networks each network admin controls routing in its own network – next http://www.ilkertemir.com/backbone-map/ Turkey’s past and current Internet backbone map

Hierarchical Routing gateway routers C.b B.a A.a b c A.c a a C b a B d special routers in AS run intra-AS routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-AS routing protocol with other gateway routers aggregate routers into regions, “autonomous systems” (AS) routers in same AS run same routing protocol “intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol

Intra-AS Routing Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols: OSPF: Open Shortest Path First RIP: Routing Information Protocol IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

OSPF (Open Shortest Path First) “open”: publicly available Uses Link State algorithm LS advertisement dissemination to entire AS via flooding Topology map at each node Route computation using Dijkstra’s algorithm Carried in OSPF messages directly over IP OSPF has its own network layer protocol number like IP!

RIP (Routing Information Protocol) Distance vector algorithm Included in BSD-UNIX Distribution in 1982 Distance metric: # of hops (max = 15 hops) 16 is the infinity to eliminate routing loops Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) Each advertisement: list of up to 25 destination nets within AS If more destinations, send multiple advertisements

RIP: Example z w x y A D B C y B 2 z B 7 x -- 1 Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …. .... Routing table in D

RIP: Example w x y z A C D B y B 2 z B A 7 5 x -- 1 Advertisement Dest Next hops w - - x - - z C 4 …. … ... Advertisement from A to D w x y z A C D B Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B A 7 5 x -- 1 …. …. .... Routing table in D

RIP Table processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated routed routed Transprt (UDP) Transprt (UDP) network forwarding (IP) table network (IP) forwarding table link link physical physical

Inter-AS routing in the Internet: BGP Each BGP router communicates only with its neighbors R1 with R2, R3 with R4 Global info about routes to destination networks propagates in an AS-by-AS manner via the exchange of BGP messages

Why different Intra- and Inter-AS routing ? Policy: Intra-AS: single admin, so no policy decisions needed Inter-AS: admin wants control over how its traffic routed, who routes through its net. Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance