Network Layer: Routing

Similar documents
Department of Computer and IT Engineering University of Kurdistan. Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

Overview. Problem: Find lowest cost path between two nodes Factors static: topology dynamic: load

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

CSc 450/550 Computer Networks Internet Routing

Routing in the Internet

Overview 4.2: Routing

CSCE 463/612 Networks and Distributed Processing Spring 2018

Computer Networking Introduction

Chapter 4: outline. Network Layer 4-1

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

Routing Unicast routing protocols

Chapter 4: Network Layer

Routing in a network

CS321: Computer Networks Unicast Routing

Routing. Jens A Andersson Communication Systems

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4: Network Layer, partb

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

EECS 122, Lecture 16. Link Costs and Metrics. Traffic-Sensitive Metrics. Traffic-Sensitive Metrics. Static Cost Metrics.

Routing. Outline. Algorithms Scalability

CSCI Topics: Internet Programming Fall 2008

DATA COMMUNICATOIN NETWORKING

Topics for This Week

Routing. Routing. Overview. Overview. Routing vs. Forwarding. Why Routing

Inter-Domain Routing: BGP

Why dynamic route? (1)

Chapter IV: Network Layer

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Internet Routing : Fundamentals of Computer Networks Bill Nace

Routing Protocols. Autonomous System (AS)

Lecture 12. Introduction to IP Routing. Why introduction? Routing

Inter-AS routing and BGP. Network Layer 4-1

CS BGP v4. Fall 2014

BTEC Level 3 Extended Diploma

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Chapter 7: Routing Dynamically. Routing & Switching

Routing on the Internet. Routing on the Internet. Hierarchical Routing. Computer Networks. Lecture 17: Inter-domain Routing and BGP

Top-Down Network Design

Basic Idea. Routing. Example. Routing by the Network

Inter-domain Routing. Outline. Border Gateway Protocol

Lecture 4. The Network Layer (cont d)

Routing by the Network

Unit 3: Dynamic Routing

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Routing Protocols. The routers in an internet are responsible for receiving and. forwarding IP datagrams through the interconnected set of

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Routing, Routing Algorithms & Protocols

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Important Lessons From Last Lecture Computer Networking. Outline. Routing Review. Routing hierarchy. Internet structure. External BGP (E-BGP)

Routing. Advanced Computer Networks: Routing 1

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

Lecture 4: Intradomain Routing. CS 598: Advanced Internetworking Matthew Caesar February 1, 2011

Link State Routing & Inter-Domain Routing

Distance vector and RIP

CSC 4900 Computer Networks: Routing Protocols

Internet Routing Protocols Tuba Saltürk

Module 8. Routing. Version 2 ECE, IIT Kharagpur

CHAPTER 4: ROUTING DYNAMIC. Routing & Switching

CSCD 330 Network Programming Spring 2018

Computer Networks ICS 651. IP Routing RIP OSPF BGP MPLS Internet Control Message Protocol IP Path MTU Discovery

Course Routing Classification Properties Routing Protocols 1/39

CSCD 330 Network Programming Spring 2017

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

Interplay Between Routing, Forwarding

ICMP, ARP, RARP, IGMP

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

Routing Protocols --- Exterior Gateway Protocol

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

Chapter 7 Routing Protocols

Lecture 9. Network Layer (cont d) Network Layer 1-1

TDC 363 Introduction to LANs

ICS 351: Today's plan. distance-vector routing game link-state routing OSPF

ETSF05/ETSF10 Internet Protocols Routing on the Internet

C13b: Routing Problem and Algorithms

Routing Protocol. Seiya Tsubone. Apr The University of Tokyo. Seiya Tsubone (The University of Tokyo) Routing Protocol Apr. 25.

COMP/ELEC 429 Introduction to Computer Networks

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

Lecture 19: Network Layer Routing in the Internet

Network Layer Protocols

Chapter 4: Advanced Internetworking. Networking CS 3470, Section 1

ICS 351: Today's plan. OSPF BGP Routing in general

Network Protocols. Routing. TDC375 Winter 2002 John Kristoff - DePaul University 1

Ravi Chandra cisco Systems Cisco Systems Confidential

CS4700/CS5700 Fundamentals of Computer Networks

CS118 Discussion Week 7. Taqi

Planning for Information Network

Routing in Internet. Problem. Given set of nodes, how do routers acquire info about neighbors to construct the routing tables?

Chapter 22 Network Layer: Delivery, Forwarding, and Routing 22.1

CS4450. Computer Networks: Architecture and Protocols. Lecture 11 Rou+ng: Deep Dive. Spring 2018 Rachit Agarwal

Routing part 2. Electrical and Information Technology

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

ITEC310 Computer Networks II

Transcription:

Network Layer: Routing The Problem A B R 1 R 2 R 4 R 3 Goal: for each destination, compute next hop 1 Lecture 9 2 Basic Assumptions Trivial solution: Flooding Dynamic environment: links and routers unreliable: Dynamic network! traffic patterns can change rapidly, affecting latency, bandwidth, packet drops Internet: alternative paths scarce (except on backbone) Local knowledge: Router knows all its incident links, and address of each neighbor Lecture 9 3 Rule: Forward packets to all ports except the ingress port. R 1 Advantages: Reaches destination! Even when network topology is completely unknown. Disadvantages: Some routers receive packet multiple times. Packets can go around in loops forever. Lecture 9 4

Slightly better: Controlled Flooding Each message has unique ID Messages are time-stamped and have limited time-to-live Problems: Doesn t scale Overhead: time, space Each message ID must be recorded Algorithm 2: Bellman-Ford Saw for Spanning Tree Protocol in bridges Idea: For each destination s aach node, periodically, tells all its neighbors what is its distance from s s: easy. dist s (s) = 0 always! Another node v: Mark neighbor with least distance as next hop break ties by neighbor ID Lecture 9 5 Lecture 9 6 Bellman-Ford: properties BF Algorithm: Lemma 1 Works for any non-negative link weights w(u,v): Works when the system operates asynchronously. Works regardless of the initial distances! Sketch here only the synchronous, unit-value weights. Lecture 9 7 After i time units, the value of the distance variable in any node v, d v satisfies d v min(i, distance(s,v)). Proof: induction on time, i (all distances). Base: i=0, d v 0 everywhere. Step: Suppose d u min(i, distance(s,u)) for all u at time i. Consider v at time i+1: If v assigns more than i, then done. Else v must have a neighbor u with value d < i in step i, and by induction distance(s,u) d-1, hence distance(s,v) d. Lecture 9 8

BF Algorithm: Lemma 2 At time i: if distance(s,v) i then d v distance(s,v). Proof: By induction on distance (all times together). Base: i=0, node is the source, trivial. Step: Suppose that the lemma holds for all nodes at distance d and all times. Consider a node v at distance d+1: v has a neighbor u at distance d. By induction, d u d by time d, hence v set its variable to at most d+1 at any time from i+1 and on. Problems with Bellman-Ford Suppose the source becomes unconnected: 1 D 0 1 G 2 E Lecture 9 9 Lecture 9 10 Fixes Split Horizon: don t tell dist to parent Add a hardwired bound on distances (TTL). Bound must be small to stabilize quickly Bound must be large to allow network growth. Advertise complete path Delete paths with cycles! DUAL: when cost increases, freeze table until all affected nodes know Distance Vector Algorithms Multiple instances of (some variant of) the BF Algorithm from each node: each node is the source in one instance n instances run in parallel (n = #nodes) Execution: Send distance vector when changes detected or upon timeout. Complexity: message size O(n), space O(n) for path-vector both O(Diam n) (Diam = max path length) Lecture 9 15 Lecture 9 16

Algorithm 3: Link State In distance vector, router knows only distance to each destination: hides much information! Link state: each router knows entire network topology. Compute shortest paths locally Key elements topology dissemination computing shortest routes Link state dissemination A router describes its incident links using a link state packet (LSP) Use flooding to distribute LSPs everywhere store an LSP in an LSP database if new, forward to every interface other than incoming one In a network with m links: each LSP copied at most 2m times (why?) Lecture 9 17 Lecture 9 18 Aging Creator of LSP puts timeout value in the header Router removes LSP when it times out So, on booting, router just has to wait for its old LSPs to be purged But what age to choose? if too small purged before fully flooded needs frequent updates if too large router waits idle for a long time on rebooting Router failure How to detect? HELLO protocol HELLO packet may be corrupted so age anyway on a timeout, flood the information Lecture 9 19 Lecture 9 20

Link State Algorithm Routers send out update messages whenever the state of a link changes/timeout. Each router calculates lowest cost path to all others, starting from itself: single source shortest paths algorithm. Usually: Dijkstra s. Computing shortest paths Dijkstra s Algorithm 1. Maintain a set of nodes P to whom we know shortest path, initially P={self} 2. Find the node closest to P: must be one of the nodes one hop away from nodes in P 3. Add this node to P O(m + n log n) steps for m links and n nodes Lecture 9 21 Lecture 9 22 Complexity of Link state Algorithms Denote m = # links. Communication complexity: message size O(m), Space complexity: O(m) Distance Vector vs Link State Basic ideas: DV: Each node advertises (sends to neighbors) distance to each destination; choose the closest based on neighbors announcements. LS: Each node advertises (floods to all) the state of its incident links; compute locally who s closets based on entire topology. Lecture 9 31 Lecture 9 32

Link state vs. distance vector Criteria Stability: LS wins? Multiple routing metrics: LS wins for generality Convergence time: depends on size of change communication overhead: DV wins memory overhead: DV wins Both are evenly matched Both widely used Choosing link costs Shortest path uses link costs Possible costs: Time Bandwidth Reliability Usually: cost determine amount of traffic on the link lower the cost, more the expected traffic if dynamic cost depends on load, can have oscillations (why?) Lecture 9 33 Lecture 9 34 Static metrics Simplest: set all link costs to 1. Min hop routing Propagation delay is roughly the same on all media but 28.8Kbps modem link 45Mbps T3! Actually, most time is spent waiting in queues Can assign cost inversely to bandwidth Dynamic metrics: time varying A first cut (ARPAnet original): Cost queue length independent of link capacity Many problems when network is loaded transient spikes caused major rerouting network completely ignored paths with high costs oscillations all tables computed simultaneously => low cost link flooded Lecture 9 35 Lecture 9 36

Modified metrics Example costs queue length averaged over a small time wide dynamic range queue queue length assumed to predict future loads no restriction on successively reported costs all tables computed simultaneously queue length averaged over a longer time dynamic range restricted cost also depends on intrinsic link capacity restriction on successively reported costs attempt to stagger table computation 225 140 90 75 60 30 9.6-Kbps satellite link 9.6-Kbps terrestrial link 56-Kbps satellite link 56-Kbps terrestrial link 25% 50% 75% 100% Utilization Lecture 9 37 Lecture 9 38 Routing dynamics Hierarchical routing Large networks need large routing tables more computation to find shortest paths more bandwidth wasted on exchanging DVs and LSPs Solution: hierarchical routing Key idea divide network into a set of domains gateways connect domains computers within domain unaware of outside computers gateways know only about other gateways Lecture 9 39 Lecture 9 40

Example Features only a few routers in each level not a strict hierarchy gateways participate in multiple routing protocols non-aggregable routers increase core table space Routing in the Internet Lecture 9 41 Lecture 9 42 RIP Routing Information Protocol Distance vector with split horizon and bounded distance Split horizon: never tell a neighbor the distance to s if the neighbor is next hop to s. Solves a common scenario of counting to infinity (but not all!) Cost metric is hop count Infinity = 16 Exchange distance vectors every 30 s Silence for 180 seconds interpreted as crash. Useful and popular for small networks easy to install OSPF Open Shortest Paths First Link-state algorithm with advanced features: May use multiple paths to balance load Possibly various metrics Hierarchical: Defines areas with autonomous routing Uses area border routers for next level in hierarchy Makes each routing table smaller Secure: LSPs are authenticated, databases are protected Complex Lecture 9 43 Lecture 9 44

IGRP => EIGRP (Extended) Interior Gateway Routing Protocol CISCO proprietary (1997); successor of RIP Distance Vector, like RIP several cost metrics (delay, bandwidth, reliability, load etc) routing tables exchanged only when costs change Loop-free routing achieved by DUAL Hierarchical routing in the Internet Two levels of routing: Organization are called autonomous systems (AS). Each AS implements its own routing Backbone level, connecting AS s Protocol between AS gateways: exterior gateway protocol Protocol within AS: interior gateway protocol Lecture 9 45 Lecture 9 46 Internet routing protocols Routing in the Internet AS A AS B AS C Interior RIP: distance vector OSPF: link-state IGRP (EIGRP): distance vector Others also possible BGP BGP Exterior: must have exactly one! BGP: path vector Interior Gateway Protocol Interior Gateway Protocol Interior Gateway Protocol Lecture 9 47 Stub AS (leaf) Transit AS e.g. backbone service provider Stub AS Lecture 9 48

Routing within a Stub AS Exterior Routing Protocols There is only one exit point (usually*), so routers within the AS can use default routing. Each router knows all Network IDs within AS. Packets destined to another AS are sent to the default router. Default router is the border gateway to the next AS. Routing tables in Stub AS s tend to be small. What we have to work with: Incompatibility of AS s link costs Different AS s have different objectives Some AS s don t trust others * Large AS s may have more than one ISP: multihomed Lecture 9 49 Lecture 9 50 Internet inter-as routing: BGP Path Vector protocol: Similar to Distance Vector protocol, but each node broadcasts to neighbors (peers) entire path (i.e, sequence of ASs) to destination E.g., node X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,,Z BGP Rationale Nodes may select paths based on their own discretion cost, payment, policy (don t route via competitors AS), loop prevention reasons. Nodes can control incoming traffic by controlling its route advertisements to peers: Lecture 9 51 Lecture 9 52

BGP BGP-4 Each AS has At least one border gateway to handle inter-as traffic At least one router that speaks BGP or node that participates in the routing protocol BGP speakers advertise Names of networks within the AS Names of networks reachable through the AS Full path information Intradomain protocols use heterogeneous metrics Withdrawn routes/negative advertisements Path-vector routing: complete paths Guarantees loop-free Example AS10 advertises 131.141 and 192.10.20 as local networks AS6 advertises same networks with path through (AS10) AS19 advertises same networks with path through (AS6,AS10) AS19 AS6 AS10 AS18 131.141 192.10.20 Lecture 9 53 Lecture 9 54 BGP implementation Extremely complex! BGP messages exchanged using TCP. BGP messages: OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection IP Datagram Lecture 9 55 56