Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione. 06 Routing protocols. Fundamentals of Communication Networks

Similar documents
Basic Idea. Routing. Example. Routing by the Network

Routing by the Network

ICMP, ARP, RARP, IGMP

Routing Protocols. Autonomous System (AS)

Unit 3: Dynamic Routing

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

CSc 450/550 Computer Networks Internet Routing

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

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 7 Routing Protocols

Chapter 7: Routing Dynamically. Routing & Switching

TDC 363 Introduction to LANs

Internet Routing Protocols Tuba Saltürk

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

Network Protocols. Routing. TDC375 Autumn 03/04 John Kristoff - DePaul University 1

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

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

Top-Down Network Design

Topics for This Week

CHAPTER 4: ROUTING DYNAMIC. Routing & Switching

Chapter 4: outline. Network Layer 4-1

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

CS118 Discussion Week 7. Taqi

Routing Protocols of IGP. Koji OKAMURA Kyushu University, Japan

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

Routing in the Internet

Computer Networking Introduction

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

ITEC310 Computer Networks II

Table of Contents 1 Static Routing Configuration RIP Configuration 2-1

9.1. Routing Protocols

CS321: Computer Networks Unicast Routing

Chapter 4: Network Layer

Chapter 4: Network Layer, partb

Network Layer: Routing

Planning for Information Network

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

Distance vector and RIP

Two types of routing protocols are used in internetworks: interior gateway protocols (IGPs) and exterior gateway protocols (EGPs).

Distance Vector Routing Protocols

RIP Version 2. The Classless Brother

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

OSPF Protocol Overview on page 187. OSPF Standards on page 188. OSPF Area Terminology on page 188. OSPF Routing Algorithm on page 190

EEC-684/584 Computer Networks

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

DATA COMMUNICATOIN NETWORKING

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Why dynamic route? (1)

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

Routing Architecture. Objectives. Module 2 Routing Fundamentals. Author: Rolf Augstein January 2006

CSC 4900 Computer Networks: Routing Protocols

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Interior Routing Protocols and High Availability.

Routing Unicast routing protocols

Antonio Cianfrani. Routing Protocols

Routing, Routing Algorithms & Protocols

CCNA 3 (v v6.0) Chapter 5 Exam Answers % Full

Inter-Domain Routing: BGP

ETSF05/ETSF10 Internet Protocols Routing on the Internet

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

RIP Configuration. RIP Overview. Operation of RIP. Introduction. RIP routing table. RIP timers

CompSci 356: Computer Network Architectures. Lecture 12: Dynamic routing protocols: Link State Chapter Xiaowei Yang

Routing. Outline. Algorithms Scalability

Routing Protocols --- Exterior Gateway Protocol

ETSF10 Internet Protocols Routing on the Internet

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

Architectures and Protocols for Integrated Networks. Intra-domain and Inter-domain Routing Protocols

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

Auxiliary protocols. tasks that IP does not handle: Routing table management (RIP, OSPF, etc.). Congestion and error reporting (ICMP).

Routing. Jens A Andersson Communication Systems

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

Routing. Advanced Computer Networks: Routing 1

Chapter IV: Network Layer

CSCI Topics: Internet Programming Fall 2008

Lecture 19: Network Layer Routing in the Internet

Lecture 4. The Network Layer (cont d)

Open Shortest Path First (OSPF)

Overview 4.2: Routing

ETSF10 Internet Protocols Routing on the Internet

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

COMPARATIVE ANALYSIS OF ROUTING PROTOCOLS

Operation Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

CompSci 356: Computer Network Architectures. Lecture 13: Dynamic routing protocols: Link State Chapter 3.3.3, Xiaowei Yang

ETSF10 Internet Protocols Routing on the Internet

Building the Routing Table. Introducing the Routing Table Directly Connected Networks Static Routing Dynamic Routing Routing Table Principles

Introduction to OSPF

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

Routing Protocols Classification

2008 NDP Lectures 7 th Semester

ETSF05/ETSF10 Internet Protocols. Routing on the Internet

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

Overview. Information About Layer 3 Unicast Routing. Send document comments to CHAPTER

Unicast Routing. TCP/IP class

Internetworking. different kinds of network technologies that can be interconnected by routers and other networking devices to create an internetwork

Keywords RIP, OSPF, IGP, EGP, AS, LSA

Configuring IP Routing Protocols

Nortel Ethernet Routing Switch 5000 Series Configuration IP Routing Protocols. Release: 6.1 Document Revision:

Multicast Communications

Examination IP routning inom enkla datornät, DD2490 IP routing in simple networks, DD2490 KTH/CSC. Date: 20 May :00 19:00 SOLUTIONS

Part II. Chapter 3. Determining IP Routes

Transcription:

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione 06 Routing protocols Fundamentals of Communication Networks

Topics o Routing basics o Routing algorithms (Bellman-Ford, Dijkstra) o Distance Vector protocols o Link State protocols o Examples of Internet routing protocols (RIP, OSPF, BGP) o Multicasting 2

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Routing basics

Unicast Routing o Routing functionalities are fundamental for internetworking o In TCP/IP networks o Routing allows the communication of two nodes A and B not directly connected A B 4

Unicast Routing o Layer 3 entities along the path route (choose the exit SAP) packets according to the destination address o The correspondence Exit SAP destination address is stored in the routing table Entity B Entity A Routing one Entity C 5

Routing Protocol o Comprises two different functionalities n Info exchange on network topology, traffic, etc. (1) n routing table creation and maintenance (2) o Formally (1) is the routing protocol o Practically, (1) and (2) are joint phases. The way the routing tables are created depends on the routing message exchange and viceversa 6

Routing Algorithms o A routing algorithm defines the criteria on how to choose a path between a source and a destination o and builds the routing tables o The choice criteria depend on the type of network (datagram, virtual circuit) 7

Routing and Network Capacity o In broadcast networks no need of routing o Thus the maximum supported traffic depends on the capacity of the channel o In meshed IP networks multiple links can be used at the same time o Thus, WHAT links are used impact on the Network capacity 8

Routing and Capacity o Dumb Routing Planning Link Capacity = C Max Traffic = C D 2 S 2 D 1 S 1 9

Routing and Capacity o Wise routing planning Link Capacity = C Max Traffic = 3C D 2 S 2 D 1 S 1 10

Routing in the Internet o The type of forwarding impacts the routing policy o IP forwarding is: n n destination-based next-hop based o Consequence: n All the packs destined to D arriving at router R follow the same path after R R D 11

Routing in the Internet o Thus, we have the following constraints on the routing: n All the paths from all the sources to a destination D must form a tree, for each D S5 S4 S3 S6 D S2 S1 n Couples Source-Destination cannot be routed independently from other couples. 12

Shortest Path Routing o TCP/IP Routing: the shortest path to a destination is chosen o The computation of the shortest path is performed on the graph representing the network (device=vertex, link=edge, edge weight=metrics) o Shortest Path properties: n All the paths to a destination form a tree n Easy and simple algorithms (polynomial complexity, even distributed) 13

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Routing Algorithms

Some Definition on Graphs o digraph G(N,A) n N nodes n A={(i,j), i N, j N} edges (ordered couple of nodes) o path: (n 1, n 2,, n l ) set of nodes with (n i, n i+1 ) A, without repeated nodes o cycle: route with n 1 = n l o Connected digraph: for each couple i and j at least one path from i to j exists o Weighted digraph: d ij weights associated to the edge (i,j) A o Path (n 1, n 2,, n l ) length : d n1, n2 + d n2,n3 + +d n(l-1), nl 15

Finding the Shortest Path Given G(N,A) and two nodes i and j, find the path with minimum length o The problem has polynomial complexity in the number of nodes Property: If node k is traversed by the shortest path from i to j, also the path from i to k is the shortest 16

Bellman-Ford Algorithm o Assumptions: n Positive-negative weights n No negative cycles o Target: n Find the shortest paths from a source to all the other nodes n Find the shortest paths from all the nodes to a destination 17

Bellman-Ford Algorithm o Variables: n D (h) i length of the shortest path from the source (assumed to be node 1) and node i with a number of hops h o Initialization: D D ( h) 1 (0) i = 0 = h i 1 o Iterations: D ( h+ 1) i = ( h) min Di,min + j ( ( h) D ) j d ji o The algorithm stops after N-1 iterations 18

An Example 1 S 1 3 2 1 o Initialization n D sh =0 n D 10 =inf n D 20 =inf o First Iteration n D 11 =min (D 0 1, D s0 +1)=1, NH:S n D 21 =min (D 0 2, D s0 +3)=3, NH:S o Second Iteration n D 12 =min (D 1 1, D 21 +1)=1, NH:S n D 22 =min (D 1 2, D 11 +1)=2, NH:1 19

Distributed Bellman-Ford o It can be shown that the algorithm does converge in a finite number of iterations even in its distributed form o Nodes periodically send out their estimation of the shortest path and update such estimation according to the rule: D j D i : min Di, min + j ( D ) j d = ji 20

Bellman-Ford in practice o Each node is assigned a label (n, L) where n is the next hop on the path and L is the path length o Each node updates its label looking at its neighbors labels o When the labels do not change any longer the shortest path tree can be built 21

Example: Bellman-Ford (1, 2) (5, 3) (1, 2) (1, 5) (1, 2) (1, 5) (-, ) 3 (-, ) 2 (1, 0) 3 (1, 0) 2 5 4 (1, 0) (1, 0) 1 2 1 6 1 2 4 1 5 (-, ) (-, ) (1, 1) (-, ) (1, 1) (4, 2) (1, 1) (4, 2) (5, 4) (3, 9) (-, ) (-, ) 22

Dijkstra Algorithm o Assumptions: n Positive weighted edges o Target: n Find out the shortest paths form a source (1) and all the other nodes o Initialization: P = {} 1, (0) D1 = 0, Dj = d1 j j 1 n d ij = if the edge i-j does not exist 23

Dijkstra Algorithms 1. find i (N-P): D 3.Go To 1. i { i }. 2. for each j (N-P) D j = min j (N P) and set P: = P = min D D If P = N,then STOP. neighbor of [ ( )],min D + d j j k k kj any node in P set : 24

Dijkstra in practice o Same label criteria as Bellman-Ford o Label can be temporary or permanent o In the beginning the only permanent label is the one of the source o At each iteration the temporary label with the lowest cost of the path is made permanent 25

Example: Dijkstra (1, 0) (1, 0) (1, 0) (1, 0) 1 2 1 (1, 2) (5, 3) (1, 2) (1, 5) (1, 2) (1, 5) (-, ) 3 (-, ) 2 3 5 1 2 4 2 6 (5, 4) (3, 9) (-, ) (-, ) 4 1 5 (-, ) (-, ) (1, 1) (-, ) (1, 1) (4, 2) (1, 1) (4, 2) 26

On Complexity o Bellman-Ford: n N-1 iterations n N-1 nodes to be checked each iteration n N-1 comparisons per node o Complexity: O(N 3 ) o Dijkstra: n N-1 iteration n N operations each iteration on average o Complexity: O(N 2 ) o Dijkstra is generally more convenient 27

Routing IP o Sends packet on the shortest path to the destination o The length of the path is measured according to a given metrics o The shortest path computation is implemented in a distributed way through a routing protocol o In the routing table the next hop only is stored, thanks to the property that subpaths of a shortest path are shortest themselves. 28

Routing Protocols o Handle the message exchange among routers to compute the paths to a destination o Two classes n Distance Vector (RIP, IGRP) n Link State (OSPF,IS-IS) o Differences n Type of metrics n Type of messages exchanged n Type of procedures used to exchange messages 29

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Distance Vector Routing Protocols

Distance Vector Protocols o Routers exchange specific connectivity information: the Distance Vector (DV): [destination address, distance] o DV is sent to directly connected routers only o DV is sent periodically and/or whenever the network topology changes o Distance estimation is performed using Bellman-Ford distributed algorithm 31

Distance Vector: Algorithm o DV reception 1. Increase the distance to the specified destination of the current link cost 2. For each specified destination n If the destination is not in the routing table o Add destination/distance n Otherwise 3. End o If the next hop in the routing table is the DV sender n Update the stored information with the new one o Otherwise n If the stored distance to the destination is bigger to the one specified in the DV Update the stored info with the new one 32

Distance Vector o DV is sent n periodically n Whenever something changes upon the reception of another DV o Routers calculate distances if: n A new DV is received n Something changes in the local network topology (local link failure) Computation: D j = min k [ D k + d kj ] J, D j d kj K, D k 33

Routing Tables Update 34

Distance Vector Example (1) o Simple Network Topology: A 1 2 B C 3 D 6 E 4 5 Assume each link has cost = 1 35

Distance Vector Example (2) o Assume all the nodes wake up at the same time F cold start procedure o Each node knows its local connectivity situation (directly connected links and interfaces) o Start Up routing table for node A: From A To Link Cost A local 0 36

Distance Vector Example (3) o A sets up its Distance Vector A=0 and sends it out to all of its neighbors (on local links) o B and D receive the DV and enlarge their knowledge of the network A 1 2 B C 3 D 6 E 4 5 37

Distance Vector Example (4) o node B, upon reception of the Distance Vector, updates the distance adding the link cost (A=1) and checks the DV against its routing table. A is still unknown, thus routing table update From B To Link Cost B local 0 A 1 1 o The same thing for node D 38

Distance Vector Example (5) o Node B sets its DV B=0, A=1 and fires it through its local links o The same for node D: D=0, A=1 1 2 A B C 3 D 6 E 4 5 39

Distance Vector Example (6) o The DV from B is received by A,C and E whilst that from D is received by A and E o A receives the two DVs From B: B=0, A=1 From D: D=0, A=1 and updates its routing table From A to Link Cost A local 0 B 1 1 D 3 1 3 A D 1 2 B 6 4 E 5 C 40

Distance Vector Example (7) o C receives from B on link 2 B=0, A=1 and updates its routing table : A From C to Link Cost C local 0 B 2 1 A 2 2 3 D 1 2 B 6 4 E 5 C 41

Distance Vector Example (8) o Node E receives from B on link 4 B=0, A=1 and from D on link 6 D=0, A=1 and updates its routing table o The distance to A is the same through link 4 and 6 From E To Link Cost E local 0 B 4 1 A 4 2 D 6 1 3 A D 1 2 6 B 4 E 5 C 42

Distance Vector Example (9) o The nodes A,C and E have updated their routing tables thus they transmit their own DVs: node A: A=0, B=1, D=1 node C: C=0, B=1, A=2 node E: E=0, B=1, A=2, D=1 1 2 A B C 3 D 6 E 4 5 43

Distance Vector Example (10) o Node B: B local 0 A 1 1 o Node D: D local 0 A 3 1 o Node E E Local 0 B 4 1 A 4 2 D 6 1 A: A=0, B=1, D=1 C: C=0, B=1, A=2 E: E=0, B=1, A=2, D=1 A: A=0, B=1, D=1 E: E=0, B=1, A=2, D=1 C: C=0, B=1, A=2 From B To Link Cost B local 0 A 1 1 D 1 2 C 2 1 E 4 1 From D To Link Cost D local 0 A 3 1 B 3 2 E 6 1 From E verso Link Cost E local 0 B 4 1 A 4 2 D 6 1 C 5 1 44

Distance Vector Example (11) o The nodes B,D and E transmit their own DVs: node B: B=0, A=1, D=2, C=1, E=1 node D: D=0, A=1, B=2, E=1 node E: E=0, B=1, A=2, D=1, C=1 A 1 2 B C 3 D 6 E 4 5 45

Distance Vector Example (12) o Node A: A local 0 B 1 1 D 3 1 o Node C: C local 0 B 2 1 A 2 2 o Node D D Local 0 A 3 1 B 3 2 E 6 1 B=0, A=1, D=2, C=1, E=1 D: D=0, A=1, B=2, E=1 B=0, A=1, D=2, C=1, E=1 E=0, B=1, A=2, D=1, C=1 E=0, B=1, A=2, D=1, C=1 From A To Link Cost A local 0 B 1 1 D 3 1 C 1 2 E 1 2 From C To Link Cost C local 0 B 2 1 A 2 2 E 5 1 D 5 2 From D To Link Cost D local 0 A 3 1 B 3 2 E 6 1 C 6 2

Distance Vector Example (13) o The algorithm has reached convergence o The nodes keep transmitting their DVs periodically but the routing tables do not change A 1 2 B C 3 D 6 E 4 5 47

Distance Vector: Link 1 Failure o Link 1 goes down A 1 2 B C 3 D 6 E 4 5 o Nodes A and B get aware of the link failure o and update their routing table assigning cost = infinity to link 1 48

Distance Vector: Link 1 Failure From A To Link Cost A local 0 B 1 1 inf D 3 1 C 1 2 inf E 1 2 inf From B To Link Cost B local 0 A 1 1 inf D 1 2 inf C 2 1 E 4 1 o New DVs are sent: node A: A=0, B=inf, D=1, C=inf, E=inf node B: B=0, A=inf, D=inf, C=1, E=1 49

Distance Vector: Link 1 Failure o The DV from A is received by D which compares it against its routing table o All the costs specified in the DV are greater or equal than the ones stored in the routing table, but node D updates its routing table since the link it receives the DV from is the one it uses to reach all the destinations A 1 2 B C 3 D 6 4 E 5 From D to Link Cost D local 0 A 3 1 B 3 2 inf E 6 1 C 6 2 50

Distance Vector: Link 1 Failure o Also C and E update their tables From C to Link Cost C local 0 B 2 1 A 2 2 inf E 5 1 D 5 2 From E to Link Cost E local 0 B 4 1 A 4 2 inf D 6 1 C 5 1 51

Distance Vector: Link 1 Failure o nodes D, C and E transmit their DVs node D: D=0, A=1, B=inf, E=1, C=2 node C: C=0, B=1, A=inf, E=1, D=2 node E: E=0, B=1, A=inf, D=1, C=1 A 1 2 B C 3 D 6 E 4 5 52

Distance Vector: Link 1 Failure o These DVs update the tables of A,B,D and E From A to Link Cost A local 0 B 1 inf D 3 1 C 1 3 inf 3 E 1 3 inf 2 From B To Link Cost B local 0 A 1 inf D 1 4 inf 2 C 2 1 E 4 1 From D To Link Cost D local 0 A 3 1 B 3 6 inf 2 E 6 1 C 6 2 From E To Link Cost E local 0 B 4 1 A 4 6 inf 2 D 6 1 C 5 1 53

Distance Vector: Link 1 Failure o Nodes A,B,D and E transmit the new DVs node A: A=0, B=inf, D=1, C=3, E=2 node B: B=0, A=inf, D=2, C=1, E=1 node D: D=0, A=1, B=2, E=1, C=2 node E: E=0, B=1, A=2, D=1, C=1 o A, B and C update their tables From A To Link Cost A local 0 B 1 3 inf 3 D 3 1 C 3 3 E 3 2 The algorithm has reached a new steady state!!! From B To Link Cost B local 0 A inf 4 inf 3 D 4 2 C 2 1 E 4 1 From C To Link Cost C local 0 B 2 1 A 2 5 inf 3 E 5 1 D 5 2 54

Distance Vector: Main Features o PROs: n Very easy o CONs: n High time to convergence n Limited by the lowest node n Possible loops n Instability in big networks (counting to infinity) 55

Convergence Time o Grows proportionally with the number of nodes (Low Scalability) 56

Distance Vector: counting to infinity o Suppose link 6 goes down A B 2 C 3 4 5 D 6 E 57

Distance Vector: counting to infinity o Node D detects link 6 failure and updates its routing table From D To Link Cost D local 0 A 3 1 B 6 2 inf E 6 1 inf C 6 2 inf o if D immediately transmits the new DV, node A updates its routing table (the only reachable node is D) 58

Distance Vector: counting to infinity o If node A transmits its DV node A: A=0, B=3, D=1, C=3, E=2 node D updates its routing table From D To Link Cost D local 0 A 3 1 B 6 3 inf 4 E 6 3 inf 3 C 6 3 inf 4 o loop between node A and D o The algorithm does not reach convergence o At each step the distances to B, C and E grows by 2 E counting to infinity 59

Counting to infinity: Remedies o Hop Count Limit: n The counting to infinity is broken if infinity is represented by a finite value n Such value must be bigger than the length of the longest path in the network n When any distance reaches such value the corresponding node is declared unreachable n During the counting to infinity : o Packets loops o Congested links o High packet loss probability (including routing packets) E Convergence may be very slow 60

Counting to infinity: Remedies o Split-Horizon: n if node A sends to D the packets meant for X, it s pointless for A to announce X in its own DV to D A D X n node A does not advertise to D the destination X 61

Distance Vector: Split Horizon o Node A sends different DV on different local links o Two Flavors of Split Horizon: n Basic: the node omits any information on the destination which it reaches through the link it is using n Poisonous Reverse: the node includes all the destinations, setting to infinity the distance to those reachable through the link it is using o SH does not work with some topologies 62

Distance Vector: Split Horizon A B 2 C 3 D 6 o when link 6 goes down this is the situation of nodes B,C and E From Link Cost B to D 4 2 C to D 5 2 E to D 6 1 inf E 4 5 63

Distance Vector: Split Horizon o Node E advertises on links 4 and 5 that the distance to D is infinity o Suppose that such message is received by B but not (error) by C From Link Cost B to D 4 2 inf C to D 5 2 E to D 6 inf 64

Distance Vector: Split Horizon o Node C fires its DV (Split Horizon with Poisonous Reverse On) n To node E: C=0, B=1, A=inf, E=inf, D=inf o On link 5 to reach D costs infinity n to node B: C=0, B=inf, A=3, E=1, D=2 o On link 2 to reach D costs 2 A B 2 C 3 D 6 E 4 5 65

Distance Vector: Split Horizon o B updates its routing table and sends its DV (Split Horizon Poisonous Reverse On): n on link 2 D is reachable with cost = infinity n on link 4 D is reachable with cost 3 o nodes B,C and E: From Link Cost B to D 4 2 inf 3 C to D 5 2 E to D 6 4 inf 4 o loop among nodes B,C and E until the cost threshold is reached o AGAIN counting to infinity 66

Counting to infinity: remedies o Use of Counters/Timers (Hold down) n If for Tinvalid no info from the first hop to a specific destination, destination is no longer valid (not advertised in the DVs, DVs from other nodes skipped) n after Tflush the route is flushed n Tinvalid - Tflush must be set so that the new information propagate within the whole network n Invalid routes advertised with distance = infinity n Nodes receiving an invalid route set the route as invalid themselves 67

Counting to infinity: remedies o Triggered Update n Explicit advertisement of the changes in the topology n Speed up convergence n Prompt failures discovery 68

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Link State Routing Protocols

Link State Routing Protocols o Each node knows neighboring nodes and the relative costs to reach them o Each node sends to ALL the other nodes such information (flooding) through Link State Packet (LSP) o All the nodes keep a LSP data base and a complete map of the network topology (graph) o On the complete graph shortest paths are computed using Dijkstra 70

Link State: PROs o Flexibility and Optimality in the path definition (complete map of the network topology) o LSP information is not sent periodically but only when something changes o All the nodes get promptly aware of any change in the network topology 71

Link State: CONs o Signaling protocol required to keep the topological information (Hello) o flooding needed o LSP must be acknowledged o Difficult to implement 72

Link State: example R1 R3 a 1 2 R2 4 R4 b c a 1 b 1 c 1 R2 0 R1 2 R3 4 LSP generated by R2 R5 73

Flooding o Each entering packet is transmitted through all the interfaces except the incoming one o possible loops and consequent traffic congestion o Sequence number (SN) + SN database in each node to avoid multiple transmissions of the same packet o Hop counter (same as TTL in IP) 74

Example o Each node owns a LSP data base A 1 2 B C 3 D 6 E 4 5 75

Example o The LSP data base represents the network topology From To Link Cost Sequence Number A B 1 1 1 A D 3 1 1 B A 1 1 1 B C 2 1 1 B E 4 1 1 C B 2 1 1 C E 5 1 1 D A 3 1 1 D E 6 1 1 E B 4 1 1 E C 5 1 1 E D 6 1 1 o Each node can easily calculate the shortest path to all the other nodes in the network 76

Upon reception of an LSP o If the LSP has not been received yet or if the SN is greater than the one already stored: n Store the new LSP n Apply the flooding o If the LSP has the same SN of the one stored n Do nothing o If the LSP is older than the one stored n Transmit the newer one to the sender 77

Link State: Example o The routing protocol must update the network topology whenever something changes A 1 2 B C 3 D 6 E 4 5 o link 1 failure is detected by nodes A and B which send an LS update packet on links 3, 2 and 4 node A: From A, To B, Link 1, Cost=inf, Number=2 node B: From B, To A, link 1, Cost= inf, Number=2 78

Link State: Example o The messages are received by nodes D,E and C which update their data base and flood on the local links o The new data base after flooding is: From To Link Cost Sequence Number A B 1 1 inf 1 2 A D 3 1 1 B A 1 1 inf 1 2 B C 2 1 1 B E 4 1 1 C B 2 1 1 C E 5 1 1 D A 3 1 1 D E 6 1 1 E B 4 1 1 E C 5 1 1 E D 6 1 1 79

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Examples of Internet routing protocols

Routing in Internet Exterior Gateway backbone AS Autonomous System o Autonomous System: AS portion of Network managed by a single organization AS Interior Gateway o EGP - Exterior Gateway Protocol o IGP - Interior Gateway Protocol 81

Routing Domains RD AS RD RD o Routing Domain (RD): portion of an AS running a single routing protocol o some routers belonging to multiple RDs implement multiple routing protocols 82

Routing Distribution RD RD Prot. A Prot. B o Multiple RD routers must act as routing protocols gateways o Translation from Prot. A to Prot. B depends on the implementation of A and B o Prot A and B may be one IGP and one EGP (distribution criteria are defined) 83

The most common routing protocols Distance Vector Link State Path Vector o IGP n RIP (Routing Information Protocol), version 1 and 2 n IGRP (Interior Gateway Routing Protocol) CISCO proprietary n IS-IS (Intermediate System Intermediate System) n OSPF (Open Shortest Path First) o EGP n BGP (Border Gateway Protocol) 84

RIP Version 1 o Designed at Berkeley (1982) and standardized in RFC 1058 o IGP o Distance Vector, uses Bellman-Ford to compute shortest paths o Metrics: number of hops o Limited to 16 hops o RIP messages are encapsulated into UDP segments (port: 520) 85

RIP v1: message format Source: TCP/IP Protocol Suite, B. Forouzan o RIPv1 messages can be: n Requests n Responses (stimulated/non stimulated) 86

Request Messages Source: TCP/IP Protocol Suite, B. Forouzan o Requests may come from n Just-Switched-on router n A router having some destination out of date o Requests may deal with n All the destinations n Specific destinations 87

Response Messages Includes the DV Source: TCP/IP Protocol Suite, B. Forouzan 88

RIP v1: timing o routing update timer (default 30 s) n Period of time between two contiguous DVs o route invalid (or duration) timer (default 180 s) n If no DV is received from an interface in this interval, the routes are declared invalid and its distance is set to 16 o route flush timer or garbage collection timer (default 270 s) n Time interval after which a route is erased (if other DVs arrive from other interfaces they are accepted) 89

RIP Version 2 o Standardized in RFC 1723 o Added Functionalities n Info on connectivity (router tag + next hop address) n Authentication n Classless routing (subnet mask) n Multicasting: uses address 224.0.0.9 Source: TCP/IP Protocol Suite, B. Forouzan 90

RIPv2: Authentication Source: TCP/IP Protocol Suite, B. Forouzan 91

OSPF (Open Shortest Path First) o RFC 1247, 1583 o Link state o Hierarchical routing o Hello protocol o LSA (link state advertisement) 92

OSPF: routers classification Source: Computer Networking, J. Kurose 93

OSPF: Types of links Source: TCP/IP Protocol Suite, B. Forouzan 94

OSPF: Topology Representation Real Network Network as represented by OSPF Source: TCP/IP Protocol Suite, B. Forouzan 95

OSPF: Packets Source: TCP/IP Protocol Suite, B. Forouzan o Routing Packets are acknowledged 96

OSPF: Common Header 1 4 8 16 19 32 Version (1) Type Message Length Source Gateway IP address Area ID Checksum Authentication type Authentication Authentication 97

OSPF: Packets o Type field: type of OSPF packets n HELLO: neighboring nodes detection n DATABASE DESCRIPTION: link state broadcasting n LINK STATUS REQUEST n LINK STATUS UPDATE n LINK STATUS ACKNOWLEDGE: ack for the LSU packets o Source gateway IP address IP address of the sender o Area ID indicates the area 98

OSPF: Types of LSA o Type 1: router links advertisement n Within the same area (classical LSP) o Type 2: network links advertisement n Generated by a LAN pseudo-node (DR) o Type 3: network summary link advertisement n Generated by area border routers to summarize the info regarding an area o Type 4: boundary routers summary link advertisement n Generated by the area border routers, indicates the presence of a AS boundary router in the area and the associated cost o Type 5: AS external link advertisement n Generated by AS boundary routers and propagated to all the routers of all the areas with info on external destinations and the associated costs 99

OSFP: border routers o The area border router propagates in every area routing info regarding all the other areas they are connected to n distance vector contamination As seen in area 2 100

OSFP o OSPF sends periodically HELLO messages to test if neighbors are reachable o database description messages are used to initialize the topology data base o Data on link metrics are broadcast through the link status update messages 101

OSPF: Hello Packets Common Header 24 bytes Type:1 Network Mask Hello Interval All 0 s E T Priority Set to 1 If the sender use Multiple metrics Dead Interval Designated Router IP Backup Designated Router IP o Used for Neighbor IP address n Neighbors discovery n Select a designated router Set to 1 when the network is a stub 102

OSPF: LSU Packets o LSU packets have a common header + Link State common header + payload 103

OSPF: Router Link LSA o Link ID (link address) o Link data/link Type: depends on the link type (point to point, stub, network) 104

Router Link LSA: Example Metrica:4 10.24.7.14 OSPF Header Type: 4 LSA Header Type:1 10.24.7.14 Metrica:2 10.24.7.0/24 10.24.7.16 Metrica:6 10.24.7.15 1 1 4 10.24.7.15 2 1 6 10.24.7.0 255.255.255.0 3 2 105

OSPF: Network Link LSA o Network Mask o Attached Router: all the routers connected to the network 106

Network Link LSA: example OSPF Header Type:4 LSA Header Type:2 255.255.255.0 10.24.7.14 10.24.7.15 10.24.7.16 10.24.7.14 10.24.7.15 10.24.7.16 o Only the Designated Router (one of the three routers) signals the presence of all the other routers o Network address is not advertised (can be obtained form the header info) 107

OSPF: Summary Link to Network LSA o Used to advertise networks outside an area of a AS o 1 message for 1 network (multiple messages needed to address more networks) 108

OSPF: Summary Link to AS Boundary Router LSA o Defines the network a border router is connected to 109

OSPF: External Link LSA o Defines external networks o Forwarding Address: to route packets meant for external destinations 110

Template Activity o Given the network below with routers, networks and costs associated to the interfaces N1 N5 R1 1 R6 N4 R2 1 1 N6 N7 1 N2 R5 2 2 1 1 1 2 2 R7 R3 R4 1 2 N8 2 N10 1 R8 R9 R10 N9 N12 2 2 1 1 1 111

Template Activity o Assuming the AS runs OSPF a) Sketch the graph of the network as represented by OSPF assuming one single area b) Assuming the AS divided in areas as in the figure (area 0, area 1 and area 2) sketch the graphs of the AS as seen by routers R1, R7 and R10 112

a ) Solution 1 N1 1 1 1 R1 R2 R3 R4 N6 N5 1 1 1 2 N7 N2 R6 R5 2 N4 2 2 1 R7 2 N10 2 N11 1 R8 1 2 R9 N9 1 N12 2 R10 1 N8 113

Solution b) As seen by R1 1 N1 1 1 1 R1 R2 R4 7 8 5 N12 N9 N6 1 1 N2 N7 2 N5 9 R3 6 N4 9 N8 2 N11 R1 1 1 N6 N5 1 R6 N10 R2 R5 N4 N1 1 1 1 1 N7 R3 R4 N2 2 2 2 1 R7 2 2 2 N12 N10 R8 R9 R10 1 2 N9 2 1 1 1 N8 114

Solution b) As seen by N6 N1 R7 N7 1 3 3 R3 4 N11 9 10 N10 N12 2 7 N2 N9 N5 1 R6 2 N4 R5 2 2 1 R7 N8 2 R1 1 1 N6 N5 1 R6 R2 R5 N4 N1 1 1 1 1 N7 R3 R4 N2 2 2 2 1 R7 2 2 2 N12 N10 R8 R9 R10 1 2 N9 2 1 1 1 N8 115

Solution b) As seen by R10 N2 N1 4 1 N7 3 R4 2 R1 R2 N 1 R3 N6 N7 N5 1 1 R6 1 1 1 1 1 N2 2 R5 N4 R7 2 2 1 2 2 N8 R4 2 N10 R8 1 2 N9 N12 2 R9 R10 1 1 1 N6 N5 N4 3 11 8 N8 11 N10 N11 1 R8 1 2 R9 N9 1 N12 2 R10 1 116

BGP o Most used EGP (standard de facto) o Inter AS routing is different from intra AS one n Route decisions criteria are not based on metrics n Backbone managers choose the routes according to a policy n Routing choice may need to exploit full knowledge of the path to destination o Thus: n DV does not fit since it has no knowledge of all the path n LS does not fit since it will need to build up a database of the entire internet 117

BGP: Path vector o BGP is similar to distance vector, but; n Netw ork the PVs do not report a distance to destination, but the entire path to destination Next Router Path N01 R01 AS2,AS5,AS7,AS12 N02 R07 AS4,AS13,AS6,AS9 N03 R09 AS11,AS12,AS8,AS6 118

BGP: messages exchange o Each BGP router sends its path vector to neighboring nodes (peers) o BGP messages use TCP o TCP connections are opened by sending routers o BGP uses port number 179 119

BGP: Path Vector o BGP allows the distribution of paths to specific destinations o..but leaves the routing choice to the network administration (policy based routing) 120

Policy based routing o A BGP router receiving a path vector from a peer may decide to: n Add to the routing table the destination specified in the PV n Forward the PV to the neighbors o On the basis of the local routing policy 121

Policy based routing: example 1 Net Next Router Path N01 RD D A N01, RA, A-D B C N01, RD, D D o B doesn t update its routing table and doesn t forward the PV since this goes against the local routing policy 122

Policy based routing: example 2 Net Next Router Path N01 RD D Net Next Router Path N01 RA A-D A N01, A-D, RA B N01, D, RD N1, B-A-D, RB D o D does not update its routing table and does not forward the PV since its own AS is specified in the path 123

BGP: Path vector o path vector messages contain attributes o Attributes may be mandatory and optional o Mandatory attributes: n ORIGIN: IGP protocol origin of the info (e.g. OSPF, RIP, IGRP) n AS_PATH: sequence of traversed AS n NEXT_HOP: next router 124

BGP Messages o Common header 125

Open Messages o Peering set up messages o Routers answer with keepalive messages (common header only) AS id BGP version (4) Waiting time for a keepalive message Sender ID Authentication option 126

Update Messages o Contain the path vector o Used to advertise path or to cancel previously advertised paths 127

Notification Messages o To notify an error or to close a connection 128

Politecnico di Milano Scuola di Ingegneria Industriale e dell Informazione Multicasting

Multicasting o Applications may require the use of point-to-multipoint connections n audio and video broadcast n Network games (Quake, etc.) o multicasting can also be implemented by the source over a unicast network 130

Multicasting o If the network supports multicasting 1 packet is enough o Some nodes in the network must play an active role (red routers) o Required Functionalities: n Destinations groups definition n addressing n Routing definition 131

Groups and Addresses o IP defines an addressing class for multicasting applications 11110 multicast addresses from 224.0.0.0 to 239.255.255.255 o Group addresses reduce overhead, but pose new problems: n How to build up a group n How to add members to a group n How to know the members list 132

Internet Group Management Protocol (IGMP) o Specific routers manage the multicasting o IGMP is used in the communications between hosts and multicast routers o Each host communicates with the multicast router within its own IP subnet 133

Group Management o The multicast router periodically sends out multicast messages (224.0.0.1 to all the systems in the LAN) o Hosts answer with the list of the multicast groups currently in use by some application IGMP Message types Sent by Purpose membership query: general membership query: specific membership report leave group router router host host query multicast groups joined query if by specific attached multicast hosts group joined by attached hosts report host wants to join or is joined to given multicast group report leaving given multicast group Source: Computer Networking, J. Kurose 134

Multicast routing o How to forward multicast packets? o Target: to set up a spanning tree without cycles o The routers not connected to users of a given group may be excluded from the tree o Similar problem to the transparent bridging 135

What Trees? o One common tree FOR ALL the multicast traffic sources o One tree FOR EACH of the multicast traffic sources Group-shared tree Source-based trees 136

Group-Shared Tree o o o Theoretically the minimum cost tree can be found Practically sub-optimal approaches are used: center-based approach: n Central router election n Join (unicast) messages are sent to the central router n The messages trace the branches of the multicast tree and stop either at the central router or at a router already belonging to the tree 137

Source-based Trees o It uses the shortest path tree o Reverse Path Forwarding (RPF) o All the packets arriving from the shortest path to the source are forwarded o All the others are dropped Non-multicast router may belong to the Multicast tree 138

Source-based Trees: pruning o Pruning to eliminate nodes from the multicast tree o Router can detach from the tree sending prune packet along the tree (in the opposite direction) o Problems: n Gather info on leaf routers (signalling needed) n Let new router enter the tree (explicit unprune messages or pruninig timer) 139

Distance Vector Multicast Routing Protocol (DVMRP) o distance vector to set up the multicasting tree o Each router owns a list of depending routers o pruning messages are sent only if all the router of the list have already been pruned o explicit unprune messages (grafts) o pruning info have a time-out 140

Multicasting in Internet o Only a small fraction of Internet routers has multicast functionalities o What happens if none of the neighboring routers supports multicast functionalities? o MBone (Multicast Backbone) uses tunneling: 141