1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.

Slides:



Advertisements
Similar presentations
Ch. 12 Routing in Switched Networks
Advertisements

Ch. 12 Routing in Switched Networks Routing in Packet Switched Networks Routing Algorithm Requirements –Correctness –Simplicity –Robustness--the.
Data and Computer Communications
© Jörg Liebeherr ECE 1545 Packet-Switched Networks.
Data and Computer Communications Ninth Edition by William Stallings Chapter 12 – Routing in Switched Data Networks Data and Computer Communications, Ninth.
Routing Protocol.
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
EE 4272Spring, 2003 Chapter 10 Packet Switching Packet Switching Principles  Switching Techniques  Packet Size  Comparison of Circuit Switching & Packet.
Data Communications Packet Switching.
Teknik Routing Pertemuan 20 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Chapter 10 Introduction to Wide Area Networks Data Communications and Computer Networks: A Business User’s Approach.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
EECC694 - Shaaban #1 lec #7 Spring The OSI Reference Model Network Layer.
1 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
Networks: Routing1 Network Layer Routing. Networks: Routing2 Network Layer Concerned with getting packets from source to destination. The network layer.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—4-1 LAN Connections Exploring the Functions of Routing.
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Exploring How Routing Works INTRO v2.0—4-1.
Data Communications & Computer Networks
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
Chapter 12 Routing in Switched Networks. Routing in Packet Switched Network  key design issue for (packet) switched networks  select route across network.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
CS 4396 Computer Networks Lab
Packet-Switching Networks Routing in Packet Networks.
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
Routing and Routing Protocols Routing Protocols Overview.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 6 Routing and Routing Protocols.
Review of Networking Concepts Part 1: Switching Networks
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Chapter 5 Network Layer.
The Network Layer & Routing
CSCI 465 D ata Communications and Networks Lecture 15 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Data Communications and Networking Chapter 11 Routing in Switched Networks References: Book Chapters 12.1, 12.3 Data and Computer Communications, 8th edition.
Routing and Routing Protocols
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
TELE202 Lecture 6 Routing in WAN 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Packet switching in Wide Area Networks »Source: chapter 10 ¥This Lecture.
Routing Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific Institute of Information.
Teknik Routing Pertemuan 10 Matakuliah: H0524/Jaringan Komputer Tahun: 2009.
Node Lookup in P2P Networks. Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service.
2/14/2016  A. Orda, A. Segall, 1 Queueing Networks M nodes external arrival rate (Poisson) service rate in each node (exponential) upon service completion.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
1 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
6/12/2016© 2010 Raymond P. Jefferis IIILect The Network Layer.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Network Layer Routing Networks: Routing.
William Stallings Data and Computer Communications
Network Layer.
Configuring RIP.
Dynamic Routing Protocols II OSPF
Network Layer.
Network Layer – Routing 1
CCNA 2 v3.1 Module 6 Routing and Routing Protocols
THE NETWORK LAYER.
ECE 544 Protocol Design Project 2016
(How the routers’ tables are filled in)
Dynamic Routing Protocols II OSPF
Intradomain Routing Outline Introduction to Routing
Dynamic Routing and OSPF
Data and Computer Communications
Network Layer Routing Networks: Routing.
Chapter 4: Network Layer
Network Layer.
Presentation transcript:

1 Routing Protocols I

2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface of a router (packet forwarding) ? 2.How to find and setup a route ? Packet forwarding is done differently in datagram and virtual- circuit packet networks Route calculation is done in a similar fashion

© Jörg Liebeherr, 1998,1999 Routing Algorithms Objective of routing algorithms is to calculate `good routes Routing algorithms for both datagrams and virtual circuits should satisfy: - Correctness- Simplicity - Simplicity - Robustness - Stability - Fairness - Optimality Impossible to satisfy everything at the same time

Fairness vs. maximum throughput Example: Assume that stations A, B, C wants to send to A, B, and C, each at 5 Mb/s Assume the capacity of the network links is 10 Mb/s.

Stability vs. optimal delay Example: Optimize delay by sending all packets over link with the least traffic. –Update the routing decision every 10 sec

Elements of Routing Algorithms Optimization Criteria: - Number of Hops- Cost - Delay- Throughput Decision Time: –Once per session (VCs) –Once per packet (datagram) Decision Place: –Each node (distributed routing) –Central node (centralized routing) –Sending node (source routing)

Shortest-Path Routing Routing algorithms generally use a shortest path algorithm to calculate the route with the least cost Three components: 1. Measurement Component Nodes (routers) measure the current characteristics such as delay, throughput, and cost 2. Protocol Nodes disseminate the measured information to other nodes 3. Calculation Nodes run a least-cost routing algorithm to recalculate their routes

Goal of Shortest Path Routing Goal: Given a network were each link between two nodes i and j is assigned a cost. Find the path with the least cost between nodes i and j. Parameters: d ij cost of link between node i and node j; d ij =, if nodes i and j are not connected; d ii = 0 N set of nodes

Approaches to Shortest Path Routing There are two basic approaches to least-cost routing in a communication network There are two basic approaches to shortest-path routing: 1. Link State Routing 2. Distance Vector Routing

Approaches to Shortest Path Routing 1. Link State Routing – Each node knows the distance to its neighbors –The distance information (=link state) is broadcast to all nodes in the network –Each node calculates the routing tables independently 2. Distance Vector Routing –Each node knows the distance (=cost) to its directly connected neighbors –A node sends a list to its neighbors with the current distances to all nodes –If all nodes update their distances, the routing tables eventually converge

11 Distance Vector Routing

Distance Vector Each node maintains two tables: –Distance Table: Cost to each node via each outgoing link –Routing Table: Minimum cost to each node and next hop node Nodes exchange messages that contain information on the cost of a route Reception of messages triggers recalculation of routing table

Distance Vector Algorithm: Tables l (v,w) cost of link (w,v) C d (v,w) cost from v to d via w D d (v)minimum cost from v to d Note: In the figure, C d (v,w)<C d (v,n) and, therefore, D d (v) = C d (v,n)

Messages Nodes exchange messages to their neighbors. If node v sends a messages to node x of the form, [m, D m (v)], this means I can go to node m with minimum cost D m (v) v v x x This message is only of interest to neighbors of v [m, D m (v)]

New link with cost l(m,v) comes up New column New row

New link with cost l(m,v) comes up Operations at node v 1. Add new row in distance and routing table, and new column to distance table 2. Recalculate distance table under consideration of l(m,v) 3. Compute min w C m (v,w): (a) If no changes to previous value of min w C m (v,w): Do nothing (b) If C m (v, m) = min w C m (v,w) D m (v)=C m (v,m) change entry in m-th row of routing table to (m,, D m (v)) and send message [m, D m (v)] to all neighbors 3. Also: Since v is a neighbor of m, v sends the contents of its routing table to m: [a, D a (v)], [b, D b (v)],...., [z, D z (v)]

Cost of link changes by m

Operations at node v 1. Entries in m-th column of distance table are changed by (if link goes down: = ). 2. For all destinations d: Compute min w C m (v,w): (a) If no changes to previous value of min w C m (v,w): Do nothing (b) If C m (v, m) = min w C m (v,w) Change entry in d-th row of routing table to (m,C d (v, m)), and send messages [d, C d (v, m)] to all neighbors

Node v receives a message [d, D d (w)]

Operations at node v 1. If d = v then ignore the message 2. If d v then C d (v, w) = D d (w) + l (w,v) Compute min x C d (v,x) : If no changes, then do nothing If C d (v,w)=minx C d (v,x), then change entry in d-th row of routing table to (d, C d (v, w)) and send message [d, C d (v,w)] to all neighbors.

Example Assume that Node 1 comes up at time t=0 Show how the entries for destination 1 are updated at all other nodes

Example via costvia3 4 6 Node 5 DistanceRouting via cost via5 6 Distance Routing Node 6

Discussion of Distance Vector Routing Entries of routing tables can change while a packet is being transmitted. This can lead to a single datagram visiting the same node more than once (Looping) If the period for updating the routing tables is too short, routing table entries are changed before convergence (from the previous updates) is achieved Example: The ARPANET used a Distance Vector algorithm with an update period of <1 sec. Due to the instability of routing, the ARPANET switched in 1979 to a link state routing algorithm

24 Characteristics of Distance Vector Routing Periodic Updates: Updates to the routing tables are sent at the end of a certain time period. A typical value is 90 seconds. Triggered Updates: If a metric changes on a link, a router immediately sends out an update without waiting for the end of the update period. Full Routing Table Update: Most distance vector routing protocol send their neighbors the entire routing table (not only entries which change). Route invalidation timers: Routing table entries are invalid if they are not refreshed. A typical value is to invalidate an entry if no update is received after 3-6 update periods.

25 The Count-to-Infinity Problem A A B B C C 11

26 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a next-hop-view For example, in the first step, A did not realize that its route (with cost 2) to C went through node B How can the Count-to-Infinity problem be solved?

27 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a next-hop-view For example, in the first step, A did not realize that its route (with cost 2) to C went through node B How can the Count-to-Infinity problem be solved? Solution 1: Always advertise the entire path in an update message (Path vectors) –If routing tables are large, the routing messages require substantial bandwidth –BGP uses this solution

28 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a next-hop-view For example, in the first step, A did not realize that its route (with cost 2) to C went through node B How can the Count-to-Infinity problem be solved? Solution 2: Never advertise the cost to a neighbor if this neighbor is the next hop on the current path (Split Horizon) –Example: A would not send the first routing update to B, since B is the next hop on As current route to C –Split Horizon does not solve count-to-infinity in all cases!

29 Link State Routing

30 Distance Vector vs. Link State Routing With distance vector routing, each node has information only about the next hop: Node A: to reach F go to B Node B: to reach F go to D Node D: to reach F go to E Node E: go directly to F Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down). If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged. A A B B C C D D E E F F

31 Distance Vector vs. Link State Routing In link state routing, each node has a complete map of the topology If a node fails, each node can calculate the new route Difficulty: All nodes need to have a consistent view of the network A A B B C C D D E E F F ABC DE F ABC DE F ABC DE F ABC DE F ABC DE F ABC DE F

Link State Routing Each node must –discover its neighbors –measure the delay (=cost) to its neighbors –broadcast a packet with this information to all other nodes –compute the shortest paths to every other router The broadcast can be accomplished by flooding The shortest paths can be computer with Dijkstras algorithm

33 Link State Routing: Basic princples 1. Each router establishes a relationship (adjacency) with its neighbors 2.Each router generates link state advertisements (LSAs) which are distributed to all routers LSA = (link id, state of the link, cost, neighbors of the link) 3. Each router maintains a database of all received LSAs (topological database or link state database), which describes the network has a graph with weighted edges 4. Each router uses its link state database to run a shortest path algorithm (Dijikstras algorithm) to produce the shortest path to each network

34 Link State Routing: Properties Each node requires complete topology information Link state information must be flooded to all nodes Guaranteed to converge

35 Operation of a Link State Routing protocol Received LSAs IP Routing Table Dijkstras Algorithm Link State Database LSAs are flooded to other interfaces

36 Dijkstras Shortest Path Algorithm for a Graph Input: Graph (N,E) with N the set of nodes and E N × N the set of edges d vw link cost (d vw = infinity if (v,w) E, d vv = 0) s source node. Output : D n cost of the least-cost path from node s to node n M = {s}; for each n M D n = d sn ; while (M all nodes) do Find w M for which D w = min{D j ; j M}; Add w to M; for each n M D n = min w [ D n, D w + d wn ]; Update route; enddo

37 Example Network

38 Example Example: Calculate the shortest paths for node 1. Iteration MD 1 D 2 D 3 D 4 D 5 D 6 Init

39 Example Result is a routing tree:... which results in a routing table (of node 1):