Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Interior Gateway Protocols: RIP & OSPF Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.

Slides:



Advertisements
Similar presentations
RIP V1 W.lilakiatsakun.
Advertisements

Courtesy: Nick McKeown, Stanford
Networks: Routing1 Network Layer Routing. Networks: Routing2 Network Layer Concerned with getting packets from source to destination Network layer must.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Interior Gateway Protocols: RIP & OSPF Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
TDC365 Spring 2001John Kristoff - DePaul University1 Interconnection Technologies Routing I.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
Nov 04, 2004CS573: Network Protocols and Standards1 IP Routing: GGP and RIP Network Protocols and Standards Autumn
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
RD-CSY3021 Comparing Routing Protocols. RD-CSY3021 Criteria used to compare routing protocols includes  Time to convergence  Proprietary/open standards.
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Exterior Gateway Protocols: EGP, BGP-4, CIDR Shivkumar Kalyanaraman Rensselaer Polytechnic Institute.
CMPE 151 Routing Marc Mosko. 2 Talk Outline Routing basics Why segment networks? IP address/subnet mask The gateway decision based on dest IP address.
Routing.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1-1 Network Layer: Routing Shivkumar Kalyanaraman Rensselaer Polytechnic Institute
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.
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Delivery, Forwarding and
1 Chapter 27 Internetwork Routing (Static and automatic routing; route propagation; BGP, RIP, OSPF; multicast routing)
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
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.
Interior Gateway Protocols: RIP & OSPF
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
1 Routing Protocols. 2 Distributed Routing Protocols Rtrs exchange control info Use it to calculate forwarding table Two basic types –distance vector.
CS 4396 Computer Networks Lab
Slide /2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends.
Routing and Routing Protocols Routing Protocols Overview.
Code : STM#520-1 Samsung Electronics Co., Ltd. OfficeServ7400 Router Operation Distribution EnglishED01.
Review Routing fundamental W.lilakiatsakun. Review Routing Fundamental VLSM VLSM Route Summarization Route Summarization Static & Dynamic Routing Static.
1 Routing. 2 Routing is the act of deciding how each individual datagram finds its way through the multiple different paths to its destination. Routing.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
1. 2 Anatomy of an IP Packet IP packets consist of the data from upper layers plus an IP header. The IP header consists of the following:
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
1 Routing Table  The seven fields Mask: for finding (sub)network address of the destination l Host-specific routing: (/32) l Default routing:
1 Internet Routing. 2 Terminology Forwarding –Refers to datagram transfer –Performed by host or router –Uses routing table Routing –Refers to propagation.
Link State Routing NETE0521 Presented by Dr.Apichan Kanjanavapastit.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
7400 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. -0/35- OfficeServ 7x00 Enterprise IP Solutions Quick Install Guide.
CCNA 2 Week 6 Routing Protocols. Copyright © 2005 University of Bolton Topics Static Routing Dynamic Routing Routing Protocols Overview.
© 2002, Cisco Systems, Inc. All rights reserved. 1 Routing Overview.
Routing and Routing Protocols
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
1 Version 3.1 Module 6 Routed & Routing Protocols.
1 7-Jan-16 S Ward Abingdon and Witney College Dynamic Routing CCNA Exploration Semester 2 Chapter 3.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
RIP Routing Protocol. 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.
1. 2  An autonomous system is a region of the Internet that is administered by a single entity.  Examples of autonomous regions are:  UVA’s campus.
Malathi Veeraraghavan (originals by Jörg Liebeherr) 1 Link State Routing Algorithm Use a routing protocol to collect the whole network topology Obtain.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing Networks: Routing.
Dynamic Routing Protocols part2
Routing Information Protocol (RIP)
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Intra-Domain Routing Jacob Strauss September 14, 2006.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
Chapter 5: Dynamic Routing
Dynamic Routing Protocols part2
Network Layer Routing Networks: Routing.
Routing.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Network Layer Routing.
Presentation transcript:

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Interior Gateway Protocols: RIP & OSPF Shivkumar Kalyanaraman Rensselaer Polytechnic Institute Shivkumar Kalyanaraman Rensselaer Polytechnic Institute

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 2 q Routing Tables & static routing q Dynamic routing (inter- and intra-domain) q Distance vector vs Link state routing q RIP, RIPv2 q OSPF q Refs: Chap 9, 10. q Books: “Routing in Internet” by Huitema, “Interconnections” by Perlman q Routing Tables & static routing q Dynamic routing (inter- and intra-domain) q Distance vector vs Link state routing q RIP, RIPv2 q OSPF q Refs: Chap 9, 10. q Books: “Routing in Internet” by Huitema, “Interconnections” by Perlman Overview

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 3 Routing vs Forwarding q Fig 9.1 q Routing table used by IP forwarding. Can display routing table using command “netstat -rn” q Route Table setup by: q a) ‘route’ command q b) routing daemon (eg: ‘routed’) q c) ICMP redirect message. q Fig 9.1 q Routing table used by IP forwarding. Can display routing table using command “netstat -rn” q Route Table setup by: q a) ‘route’ command q b) routing daemon (eg: ‘routed’) q c) ICMP redirect message.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 4 Routing Table structure q Fields: destination, gateway, flags,... q Destination: can be a host address or a network address. If the ‘H’ flag is set, it is the host address. q Gateway: router/next hop IP address. The ‘G’ flag says whether the destination is directly or indirectly connected. q U flag: Is route up ? q G flag: router (indirect vs direct) q H flag: host (dest field: host or n/w address?) q Fields: destination, gateway, flags,... q Destination: can be a host address or a network address. If the ‘H’ flag is set, it is the host address. q Gateway: router/next hop IP address. The ‘G’ flag says whether the destination is directly or indirectly connected. q U flag: Is route up ? q G flag: router (indirect vs direct) q H flag: host (dest field: host or n/w address?)

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 5 Static Routing q Upon booting, default routes initialized from files. Eg: /etc/rc.net in AIX, /etc/netstart in BSD, /etc/rc.local in SUN/Solaris q Use ‘route’ command to add new routes eg: route add default sun 1 q ICMP redirect: sent to host by router when a “better” router exists on the same subnet. q Alt: router discovery ICMP messages q Router solicitation request from host q Router advertisement messages from routers q Upon booting, default routes initialized from files. Eg: /etc/rc.net in AIX, /etc/netstart in BSD, /etc/rc.local in SUN/Solaris q Use ‘route’ command to add new routes eg: route add default sun 1 q ICMP redirect: sent to host by router when a “better” router exists on the same subnet. q Alt: router discovery ICMP messages q Router solicitation request from host q Router advertisement messages from routers

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 6 Dynamic routing q Internet organized as “autonomous systems” (AS). q Interior Gateway Protocols (IGPs) within AS. Eg: RIP, OSPF, HELLO q Exterior Gateway Protocols (EGPs) for AS to AS routing. Eg: EGP, BGP-4 q Reality: most of internet uses default routes (which is allowed within dynamic routing). Serious dynamic routing starts near core of AS and from one AS to another. q Internet organized as “autonomous systems” (AS). q Interior Gateway Protocols (IGPs) within AS. Eg: RIP, OSPF, HELLO q Exterior Gateway Protocols (EGPs) for AS to AS routing. Eg: EGP, BGP-4 q Reality: most of internet uses default routes (which is allowed within dynamic routing). Serious dynamic routing starts near core of AS and from one AS to another.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 7 Dynamic routing methods q Source-based: chart route at source. q Link state routing: Get map of network (in terms of link states) and calculate best route (but specify only a signpost: I.e. the next-hop) q Distance vector: Set up signposts to destinations looking at neighbors’ signposts. q Key: to make it a “distributed” algorithm ? q Source-based: chart route at source. q Link state routing: Get map of network (in terms of link states) and calculate best route (but specify only a signpost: I.e. the next-hop) q Distance vector: Set up signposts to destinations looking at neighbors’ signposts. q Key: to make it a “distributed” algorithm ?

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 8 Distance Vector routing q “Vector” of distances (signposts) to each possible destination at each router. q How to find distances ? q Distance to local network is 0. q Look in neighbors’ distance vectors, and add link cost to reach the neighbor q Find which direction yields minimum distance to to particular destination. Turn signpost that way. q Keep checking if neighbors change their signposts and modify local vector if necessary. q And that’s it ! q Called the “Bellman-Ford algorithm” q “Vector” of distances (signposts) to each possible destination at each router. q How to find distances ? q Distance to local network is 0. q Look in neighbors’ distance vectors, and add link cost to reach the neighbor q Find which direction yields minimum distance to to particular destination. Turn signpost that way. q Keep checking if neighbors change their signposts and modify local vector if necessary. q And that’s it ! q Called the “Bellman-Ford algorithm”

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 9 Routing Information Protocol q Uses hop count as metric q Tables (vectors) “advertised” to neighbors every 30 s. q Robustness: Entries reinitialized (as 16 or infinity) if no refresh for 180 s. q Efficiency: Triggered updates used to inform neighbors when table changes. q Protocol details: q Runs over UDP. q Init: send request message asking for vectors q Format can carry upto 25 routes (within 512 bytes) q RIPv1 does not carry subnet masks => many networks use default of q Uses hop count as metric q Tables (vectors) “advertised” to neighbors every 30 s. q Robustness: Entries reinitialized (as 16 or infinity) if no refresh for 180 s. q Efficiency: Triggered updates used to inform neighbors when table changes. q Protocol details: q Runs over UDP. q Init: send request message asking for vectors q Format can carry upto 25 routes (within 512 bytes) q RIPv1 does not carry subnet masks => many networks use default of

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 10 RIP problems q Counting-to-infinity problem: q Simple configuration A->B->C. If C fails, B needs to update and thinks there is a route through A. A needs to update and thinks there is a route thru B. q No clear solution, except to set “infinity” to be small (eg 16 in RIP) q Split-horizon: If A’s route to C is thru B, then A advertises C’s route (only to B) as infinity. q Slow convergence after topology change: q Due to count to infinity problem q Also information cannot propagate thru node until it recalculates routing info. q Counting-to-infinity problem: q Simple configuration A->B->C. If C fails, B needs to update and thinks there is a route through A. A needs to update and thinks there is a route thru B. q No clear solution, except to set “infinity” to be small (eg 16 in RIP) q Split-horizon: If A’s route to C is thru B, then A advertises C’s route (only to B) as infinity. q Slow convergence after topology change: q Due to count to infinity problem q Also information cannot propagate thru node until it recalculates routing info.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 11 RIP problems (contd) q Black-holes: q If one node goes broke and advertises route of zero to several key networks, all nodes immediately point to it. q How to install a fix in a distributed manner ?? q Require protocol to be “self-stabilizing” I.e even if some nodes are faulty, once they are isolated, the system should quickly return to normal operation q Broadcasts consume non-router resources q Does not support subnet masks (VLSMs) q No authentication q Black-holes: q If one node goes broke and advertises route of zero to several key networks, all nodes immediately point to it. q How to install a fix in a distributed manner ?? q Require protocol to be “self-stabilizing” I.e even if some nodes are faulty, once they are isolated, the system should quickly return to normal operation q Broadcasts consume non-router resources q Does not support subnet masks (VLSMs) q No authentication

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 12 RIPv2 q Why ? Installed base of RIP routers q Provides: q VLSM support q Authentication q Multicasting q “Wire-sharing” by multiple routing domains, q Tags to support EGP/BGP routes. q Uses reserved fields in RIPv1 header. q First route entry replaced by authentication info. q Why ? Installed base of RIP routers q Provides: q VLSM support q Authentication q Multicasting q “Wire-sharing” by multiple routing domains, q Tags to support EGP/BGP routes. q Uses reserved fields in RIPv1 header. q First route entry replaced by authentication info.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 13 Link State protocols q Create a network “map” at each node. q For a map, we need inks and attributes (link states), not of destinations and metrics (distance vector) q 1. Node collects the state of its connected links and forms a “Link State Packet” (LSP) q 2. Broadcast LSP => reaches every other node in the network. q 3. Given map, run Dijkstra’s shortest path algorithm => get paths to all destinations q 4. Routing table = next hops of these paths. q Create a network “map” at each node. q For a map, we need inks and attributes (link states), not of destinations and metrics (distance vector) q 1. Node collects the state of its connected links and forms a “Link State Packet” (LSP) q 2. Broadcast LSP => reaches every other node in the network. q 3. Given map, run Dijkstra’s shortest path algorithm => get paths to all destinations q 4. Routing table = next hops of these paths.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 14 Dijkstra’s algorithm q A.k.a “Shortest Path First” (SPF) algorithm. q Idea: compute shortest path from a “root” node to every other node.“Greedy method”: q P is a set of nodes for which shortest path has already been found. q For every node “o” outside P, find shortest one-hop path from some node in P. q Add that node “o” which has the shortest of these paths to P. Record the path found. q Continue till we add all nodes (&paths) to P q A.k.a “Shortest Path First” (SPF) algorithm. q Idea: compute shortest path from a “root” node to every other node.“Greedy method”: q P is a set of nodes for which shortest path has already been found. q For every node “o” outside P, find shortest one-hop path from some node in P. q Add that node “o” which has the shortest of these paths to P. Record the path found. q Continue till we add all nodes (&paths) to P

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 15 Dijkstra’s algorithm q P: (ID, path-cost, next-hop) triples. q ID: node id. q Path-cost: cost of path from root to node q Next-hop: ID of next-hop on shortest path from the root to reach that node q P: Set of nodes for which the best path cost (and next-hop from root) have been found. q T: (ID, path-cost, next-hop): q Set of candidate nodes at a one-hop distance from some node in P. q Note: there is only one entry per node. In the interim, some nodes may not lie in P or T. q R=Routing table: (ID, next-hop) to be created q P: (ID, path-cost, next-hop) triples. q ID: node id. q Path-cost: cost of path from root to node q Next-hop: ID of next-hop on shortest path from the root to reach that node q P: Set of nodes for which the best path cost (and next-hop from root) have been found. q T: (ID, path-cost, next-hop): q Set of candidate nodes at a one-hop distance from some node in P. q Note: there is only one entry per node. In the interim, some nodes may not lie in P or T. q R=Routing table: (ID, next-hop) to be created

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 16 Dijkstra’s algorithm q 1. Put root I.e., (myID, 0, 0) in P & (myID,0) to R. q 2. If node N is just put into P, look at N’s links (I.e. its LSP). q 2a. For each link to neighbor M, add cost of the root-to-N-path to the cost of the N-to-M-link (from LSP) to determine a new cost: C. q 2b. The “next-hop” corresponds to the next-hop ID in N’s tuple (or N if M is the root itself): h q 2c. If M not in T (or P) with better path cost, add (M, C, h) to T. q 3. If T = empty, terminate. Else, move the min-cost triple from T to P, and add (M, h) to R. Go to step 2. q 1. Put root I.e., (myID, 0, 0) in P & (myID,0) to R. q 2. If node N is just put into P, look at N’s links (I.e. its LSP). q 2a. For each link to neighbor M, add cost of the root-to-N-path to the cost of the N-to-M-link (from LSP) to determine a new cost: C. q 2b. The “next-hop” corresponds to the next-hop ID in N’s tuple (or N if M is the root itself): h q 2c. If M not in T (or P) with better path cost, add (M, C, h) to T. q 3. If T = empty, terminate. Else, move the min-cost triple from T to P, and add (M, h) to R. Go to step 2.

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 17 Topology dissemination q aka LSP distribution q 1. Flood LSPs on links except incoming link q Require at most 2E transfers for n/w with E edges q 2. Sequence numbers to detect duplicates q Why? Routers/links may go down/up q Problem: wrap-around => have large seq # space q 3. Age field (similar to TTL) q Periodically decremented after acceptance q Zero => discard LSP & request everyone to do so q Router awakens => knows that all its old LSPs would have been purged and can choose a new initial sequence number q aka LSP distribution q 1. Flood LSPs on links except incoming link q Require at most 2E transfers for n/w with E edges q 2. Sequence numbers to detect duplicates q Why? Routers/links may go down/up q Problem: wrap-around => have large seq # space q 3. Age field (similar to TTL) q Periodically decremented after acceptance q Zero => discard LSP & request everyone to do so q Router awakens => knows that all its old LSPs would have been purged and can choose a new initial sequence number

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 18 Link state vs Distance vector q Advantages: q More stable (aka fewer routing loops) q Faster convergence than distance vector q Easier to discover network topology, troubleshoot network. q Can do better source-routing with link- state q Type & Quality-of-service routing (multiple route tables) possible q Caveat: With path-vector-type distance vector routing, these arguments don’t hold q Advantages: q More stable (aka fewer routing loops) q Faster convergence than distance vector q Easier to discover network topology, troubleshoot network. q Can do better source-routing with link- state q Type & Quality-of-service routing (multiple route tables) possible q Caveat: With path-vector-type distance vector routing, these arguments don’t hold

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 19 OSPF q OSPF runs directly on top of IP (not over UDP) q It can calculate a separate set of routes for each IP type of service (=> multiple routing entries) q Dimensionless cost (eg: based on throughput, delay) q Load balancing: distributing traffic equally among routes q Supports VLSMs: subnet mask field in header q Supports multicasting, authentication, unnumbered networks (point-to-point). q OSPF runs directly on top of IP (not over UDP) q It can calculate a separate set of routes for each IP type of service (=> multiple routing entries) q Dimensionless cost (eg: based on throughput, delay) q Load balancing: distributing traffic equally among routes q Supports VLSMs: subnet mask field in header q Supports multicasting, authentication, unnumbered networks (point-to-point).

Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 20 Summary q Route Tables q Distance vector, RIP, RIPv2 q Link state, OSPF. q Route Tables q Distance vector, RIP, RIPv2 q Link state, OSPF.