Introduction to Internet Routing

Similar documents
Algorithmic Aspects of Communication Networks

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

Foundations of Telematics

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

Summary Chapter 4. Smith College, CSC 249 March 2, q IP Addressing. q DHCP dynamic addressing

Telematics I. Chapter 7 Network Layer

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

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

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4 Network Layer

DATA COMMUNICATOIN NETWORKING

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

CEN445 Network Protocols and Algorithms. Chapter 2. Routing Algorithms. Dr. Ridha Ouni

Routing Algorithms. CS158a Chris Pollett Apr 4, 2007.

II. Principles of Computer Communications Network and Transport Layer

Chapter 4: Network Layer

Internet Architecture. Network Layer Overview. Fundamental Network Layer Function. Protocol Layering and Data. Computer Networks 9/23/2009

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

Chapter 4: Network Layer, partb

Chapter 4 Network Layer. Network Layer 4-1

CSC 4900 Computer Networks: Routing Algorithms

COMP/ELEC 429/556 Introduction to Computer Networks

CSC 401 Data and Computer Communications Networks

Chapter 4: Network Layer

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

Chapter 4: Network Layer

CSCE 463/612 Networks and Distributed Processing Spring 2017

Network layer: Overview. Network layer functions Routing IP Forwarding

Routing. 4. Mar INF-3190: Switching and Routing

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

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

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

More Routing. EE122 Fall 2012 Scott Shenker

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Interplay between routing, forwarding

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

Routing Algorithms. 1 Administrivia. Tom Kelliher, CS 325. Apr. 25, Announcements. Assignment. Read 4.6. From Last Time. IP protocol.

Lecture 4. The Network Layer (cont d)

Routing, Routing Algorithms & Protocols

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 4 Wide Area Networks - Routing

Chapter 5 Network Layer: The Control Plane

Telematics I. Chapter 1 A Quick Tour. Goals of this chapter Examples Direct connection between two devices Multiple devices Errors

Chapter 12. Routing and Routing Protocols 12-1

Dynamic Routing. The Protocols

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

1 Dijkstra s Algorithm

ECE 435 Network Engineering Lecture 11

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter 5 (Week 9) The Network Layer ANDREW S. TANENBAUM COMPUTER NETWORKS FOURTH EDITION PP BLM431 Computer Networks Dr.

Routing in packet-switching networks

CMPE 150: Introduction to Computer Networks

Redes de Computadores. Shortest Paths in Networks

ECE 435 Network Engineering Lecture 11

Chapter 4 Network Layer

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

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

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ICMP, ARP, RARP, IGMP

Network Layer: Routing

CSc 450/550 Computer Networks Internet Routing

5.2 Routing Algorithms

Computer Networks. Routing

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

William Stallings Data and Computer Communications 7 th Edition. Chapter 12 Routing

Alternate Routing Diagram

ECE 158A: Lecture 5. Fall 2015

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

Lecture 19: Network Layer Routing in the Internet

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

CSCE 463/612 Networks and Distributed Processing Spring 2018

Algorithm Design and Analysis

Routing. Advanced Computer Networks: Routing 1

Chapter 4: Network Layer

Routing, Routers, Switching Fabrics

This Lecture. BUS Computer Facilities Network Management. Switching Network. Simple Switching Network

cs/ee 143 Communication Networks

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

Network Layer: Routing

CSCI Topics: Internet Programming Fall 2008

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

09 B: Graph Algorithms II

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

CS 5114 Network Programming Languages Control Plane. Nate Foster Cornell University Spring 2013

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

EEC-484/584 Computer Networks

ECE 333: Introduction to Communication Networks Fall 2001

CS 421: Computer Networks SPRING MIDTERM II May 5, minutes

ETSF05/ETSF10 Internet Protocols Routing on the Internet

UNIT III THE NETWORK LAYER

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

Computer Networking Introduction

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Routing. Outline. Algorithms Scalability

EEC-684/584 Computer Networks

Lecture on Computer Networks

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Data and Computer Communications. Chapter 12 Routing in Switched Networks

COMP211 Chapter 5 Network Layer: The Control Plane

Transcription:

Introduction to Internet Routing (RCSE) Lecture Based on Slides by Prof. Dr. Günter Schäfer Page

Topics of Special course on planning aspects in communication networks Prior attendance of courses Telematics and (Bachelor Informatik) highly recommended: Basics of getting information through a network (with focus on the Internet) Protocol layers to 4 Internet application layer Advanced topics like multimedia communications, QoS, multicast, etc. will cover the following topics: Main question: How to organize data transport so that the network can handle the offered (legitimate) load? Basics of packet oriented communication networks Forwarding and routing Network design Monitoring and handling load Failure resistance Page

Resources Slides are/will be available on the web site Main text for this course Michal Pioro, Deepankar Medhi. Routing, Flow, and Capacity Design in Communication and Computer Networks. The Morgan Kaufmann Series in Networking, Elsevier, 004. There will be no dedicated script Secondary literature is sometimes beneficial (and will be cited) Page

Short Recap: World Wide Web You already know from a basic networking class what happens when you enter http://www.tu-ilmenau.de into a Web browser??? Page 4

Short Recap: Telephony Also, you have a basic understanding what happens when picking up a telephone and making a phone call How to find the peer s phone? How to transmit speech?? You are aware of the differences between transferring a Web page and a phone call (and their implications): Web: Bunch of data that has to be transmitted Phone: Continuous flow of information, must arrive in time Page 5

Simplest Communication: Direct Physical Connection Web example: Browser=client and server Simplest case: directly connect them by a (pair of) cable Client Server Server provides data, client consumes it Telephony: Connect two telephones via a (pair of) cable Page 6

But There are More than Two Computers / Telephones Connect each telephone / computer with each other one? With four computers: With eleven computers: Page 7

Beirut Connections Connecting many phones in real life Page 8

Beirut Connections Page 9

Put some Structure into a Network Pair wise connecting all entities does not work Need some structure Distinguish between end systems/terminals/user devices on one hand, switching elements/routers on the other hand Page 0

Forwarding and Next Hop Selection Recall: A switching element/a router forwards a packet onto the next hop towards its destination How does a router know which of its neighbors is the best possible one towards a given destination? What is a good neighbor, anyway? P? Z A?? V X M U? W Y Page

Interplay Between Routing and Forwarding routing algorithm local forwarding table header value output link 000 00 0 00 value in arriving packet s header 0 Page

Overview on Routing Algorithms () An router executes a routing algorithm to decide which output line an incoming packet should be transmitted on: In connection-oriented service, the routing algorithm is performed only during connection setup In connectionless service, the routing algorithm is either performed as each packet arrives, or performed periodically and the results of this execution updated in the forwarding table Often, routing algorithms take a so-called metric into account when making routing decisions: In this context, a metric assigns a cost to each network link This allows to compute a metric for each route in the network A metric may take into account parameters like number of hops, cost of a link, delay, length of output queue, etc. The cheapest path according to some metric is often also referred to as the shortest path (even though it might actually contain more hops than an alternative path) Page

Overview on Routing Algorithms () Two basic types of routing algorithms: Non-adaptive routing algorithms: do not base their routing decisions on the current state of the network (example: flooding) Adaptive routing algorithms: take into account the current network state when making routing decisions (examples: distance vector routing, link state routing) Remark: additionally, hierarchical routing can be used to make these algorithms scale to large networks Page 4

Flooding Basic strategy: Every incoming packet is sent out on every outgoing line except the one it arrived on Problem: vast number of duplicated packets Reducing the number of duplicated packets: Solution : Have a hop counter in the packet header; routers decrement each arriving packet s hop counter; routers discard a packet with hop count=0 Ideally, the hop counter should be initialized to the length of the path from the source to the destination Solution : Require the first router hop to put a sequence number in each packet it receives from its hosts Each router maintains a table listing the sequence numbers it has seen from each first-hop router; the router can then discard packets it has already seen Page 5

Adaptive Routing Algorithms () Problems with non-adaptive algorithms: If traffic levels in different parts of the subnet change dramatically and often, non-adaptive routing algorithms are unable to cope with these changes Lots of computer traffic is bursty (~ very variable in intensity), but non-adaptive routing algorithms are usually based on average traffic conditions Adaptive routing algorithms can deal with these situations Three types: Centralized adaptive routing: One central routing controller Isolated adaptive routing: Based on local information Does not require exchange of information between routers Distributed adaptive routing: Routers periodically exchange information and compute updated routing information to be stored in their forwarding table Page 6

Centralized Adaptive Routing Basic strategy: Routing table adapts to network traffic A routing control center is somewhere in the network Periodically, each router forwards link status information to the control center The center can compute the best routes, e.g. with Dijkstra s shortest path algorithm (explained later) Best routes are dispatched to each router Problems: Vulnerability: if the control center goes down, routing becomes non-adaptive Scalability: the control center must handle a great deal of routing information, especially for larger networks Page 7

Isolated Adaptive Routing Algorithms Basic idea: Routing decisions are made only on the basis of information available locally in each router Examples: Hot potato Backward learning Hot potato routing: When a packet arrives, the router tries to get rid of it as fast as it can by putting it on the output line that has the shortest queue Hot potato does not care where the output line leads Not very effective Page 8

Backward Learning Routing Basic idea: Packet headers include destination and source addresses; they also include a hop counter learn from this data as packets pass by Network nodes, initially ignorant of network topology, acquire knowledge of the network state as packets are handled Algorithm: Routing is originally random (or hot potato, or flooding) A packet with a hop count of one is from a directly connected node; thus, neighboring nodes are identified with their connecting links A packet with a hop count of two is from a source two hops away, etc. As packets arrive, the IMP compares the hop count for a given source address with the minimum hop count already registered; if the new one is less, it is substituted for the previous one Remark: in order to be able to adapt to deterioration of routes (e.g. link failures) the acquired information has to be forgotten periodically Page 9

Distributed Adaptive Routing Routing Protocol Goal: Determine good path (sequence of routers) through 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 Path cost: sum of the link costs on the path A 5 B D Good path: C E Typically means minimum cost path Other definitions possible 5 F Page 0

Decentralized Adaptive Routing Algorithm Classification Global or decentralized information? Decentralized: Router knows physically-connected neighbors, link costs to neighbors Iterative process of computation, exchange of info with neighbors Distance vector algorithms RIP protocol BGP protocol ( path vector ) Global: All routers have complete topology, link cost info Link state algorithms Dijkstra s algorithm OSPF protocol Static or dynamic? Static: Routes change slowly over time Dynamic: Routes change more quickly Periodic update In response to link cost changes Page

Graph Model for Routing Algorithms () Input: a graph G=(V, E) with V = {v, v,, v n } the set of nodes E V V; E={e, e,, e m } the set of edges A mapping c(v i, v j ) representing the cost of edge (v i, v j ) if (v i, v j ) is in E (otherwise c(v i, v j ) = infinity) Start node s=v x an arbitrary node from the set V Output: two arrays d and p with d[i] containing the cost (distance) of the shortest path from s to v i p[i] containing the index j of the predecessor node v j of v i on the shortest path from s to v i Page

Graph Model for Routing Algorithms () Assumptions and Notation: Let s V be the source node v V: let (s, v) denote the cost of the shortest path from s to v While d[i] denotes the shortest path cost (estimate) for node v i, we also write this as d(v i ) in our proof later on Assume that source node s is connected to every node v in the graph: s, v V: (s, v) < Assume all edge weights are finite and positive: (v, w) E: c(v, w) > 0 Page

Example Run of Dijkstra s Algorithm () Step 0 start N A d(b),p(b),a d(c),p(c) 5,A d(d),p(d),a d(e),p(e) infinity d(f),p(f) infinity 5 A B D C E 5 F Page 4

Example Run of Dijkstra s Algorithm () Step 0 start N A AD d(b),p(b),a,a d(c),p(c) 5,A 4,D d(d),p(d),a d(e),p(e) infinity,d d(f),p(f) infinity infinity 5 A B D C E 5 F Page 5

Example Run of Dijkstra s Algorithm () Step 0 4 5 start N A AD ADE d(b),p(b),a,a,a d(c),p(c) 5,A 4,D,E d(d),p(d),a d(e),p(e) infinity,d d(f),p(f) infinity infinity 4,E 5 A B D C E 5 F Page 6

Example Run of Dijkstra s Algorithm (4) Step 0 start N A AD ADE ADEB d(b),p(b),a,a,a d(c),p(c) 5,A 4,D,E,E d(d),p(d),a d(e),p(e) infinity,d d(f),p(f) infinity infinity 4,E 4,E 5 A B D C E 5 F Page 7

Example Run of Dijkstra s Algorithm (5) Step 0 4 start N A AD ADE ADEB ADEBC d(b),p(b),a,a,a d(c),p(c) 5,A 4,D,E,E d(d),p(d),a d(e),p(e) infinity,d d(f),p(f) infinity infinity 4,E 4,E 4,E 5 A B D C E 5 F Page 8

Example Run of Dijkstra s Algorithm (6) Step 0 4 5 start N A AD ADE ADEB ADEBC ADEBCF d(b),p(b),a,a,a d(c),p(c) 5,A 4,D,E,E d(d),p(d),a d(e),p(e) infinity,d d(f),p(f) infinity infinity 4,E 4,E 4,E 5 A B D C E 5 F Page 9

Dijkstra s Algorithm for Shortest Paths () Let us try to develop an algorithm for computing shortest paths by induction: We could try induction on nodes or on edges: we choose nodes here We need an estimate of costs to all nodes Initially, this is set to infinity for all nodes except the source node s: v i V \ {s}: d[i] := Cost estimate for node s=v x is set to 0: d[x] := 0 When trying to reduce our problem to a smaller one by making use of induction, it would not be wise to actually remove nodes from the graph, as this would change the graph (e.g. destroy connectivity) Therefore, we run our induction on the number n of nodes for which we can compute the shortest paths Base case: n = : We know how to compute the shortest path from s to s Induction hypothesis: We know how to compute the lengths of the shortest paths and respective predecessor nodes for up to n nodes. Page 0

Dijkstra s Algorithm for Shortest Paths () Induction step: n n + Consider the set N of nodes for which we know the lengths of their shortest paths as well as the predecessor nodes: Initially, N := {s} So, we would like to increase the set N in every step by one node But, which node of V \ N can be selected? Clearly, it is not a good idea to choose a node v i for which our current shortest path cost estimate is high, e.g. d[i] = How to get better estimates? Whenever we insert a node v i into N (also when s is inserted to N), we can update our estimates for nodes v j that are adjacent to v i : if ( d[i]+ c[i, j] < d[j]) { d[j] = d[i] + c[i, j]; p[j] = i; } As d[i] is the cost of a path from s to v i, the cost of the shortest path from s to v j can not be higher than d[i]+c[i, j] Page

Dijkstra s Algorithm for Shortest Paths () Actually, we will show now by contradiction that in every step the vertex v i in V \ N with a minimal value d[i] can be inserted into N and that d[i] equals the shortest path cost from source s to v i (and at all subsequent times) With this it is trivial to see that also the predecessor node is correctly set Too see this, let us assume that this is not true when the n+th node v is added to N Thus the vertex v added has d(v) > (s, v) Consider the situation just before insertion of v Consider the true shortest path p from s to v (see next slide) Page

Dijkstra s Algorithm for Shortest Paths (4) Since s is in N, and v is in V \ N, path p must jump from N to V \ N at some point: N s x Path p v y V \ N Let the jump have end point x in N, and y in V \ N (possibly s = x, and / or v = y) We will argue that y and v are different nodes Since path p is the shortest path from s to v, the segment of path p between s and x, is the shortest path from s to x, and that between s and y is the shortest path from s to y Page

Dijkstra s Algorithm for Shortest Paths (5) N V \N v s c(x, y) x y Path p The cost of the segment between s and x is d(x), and since x is in N, d(x) is the cost (s, x) of the shortest path to x (induction hypothesis) The cost of the segment between s and y is d(x) + c(x, y) Thus, (s, y) = d(x) + c(x, y) Because d(y) was correctly updated when node x was inserted into N it also holds that d(y) d(x) + c(x, y) = (s, y) This implies that d(y) = (s, y) However, as we assume that d(v) > (s, v), v and y have to be different Page 4

Dijkstra s Algorithm for Shortest Paths (6) s y v Since y appears somewhere along the shortest path between s and v, but y and v are different, we can deduce that (s, y) < (s, v) Here we use the assumption that all edges have positive cost Hence, d(y) = (s, y) < (s, v) < d(v) As both y and v are in V \ N, v can not have been chosen in this step, as the algorithm always chooses the node w with minimum d(w) So, whenever a node v is included in N, it holds that d(v) = (s, v) Page 5

Dijkstra s Algorithm for Shortest Paths (7) Termination of Dijkstra s algorithm: As the algorithm adds one node to N in every step, the algorithm terminates when the costs of shortest paths to all nodes have been computed correctly Algorithm complexity for V nodes: Each iteration: need to check all nodes v that are not yet in N This requires V ( V +)/ comparisons, leading to O( V ) This is optimal in dense graphs (where E ~ V ) In sparse graphs, more efficient implementations are possible: O( V log V + E ) using so-called Fibonacci-heaps Page 6

Dijkstra s Algorithm in Pseudocode Computes least cost path from one node to other nodes in the net Initialization (for Node s): N = {s} /* Set of Nodes with known least cost path */ for all nodes v 4 if v adjacent to s 5 then { d(v) = c(s,v); p(v) = s; } 6 else d(v) = infinity; 7 8 Loop 9 find v not in N such that d(v) is a minimum 0 add v to N for all w adjacent to v and not in N do /* update d(w) */ { if (d(v) +c(v, w) < d(w)) { d(w) = d(v) + c(v, w); p(w) = v; } } /* new cost to w is either old cost to w or known 4 shortest path cost to v plus cost from v to w */ 5 until all nodes in N Page 7

Contact Ilmenau University of Technology fon: +49 (0)677 69 788 fax: +49 (0)677 69 6 e mail: oliver.waldhorst@tu ilmenau.de Visitors address: Technische Universität Ilmenau Helmholtzplatz 5 Zuse Building, room 066 D 9869 Ilmenau www.tu ilmenau.de/ics Page 8