Lecture 4: Dynamic routing protocols Today: 1.Overview of router architecture 2.RIP.

Slides:



Advertisements
Similar presentations
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Advertisements

Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
RIP – Routing Information Protocol Syeda Momina Tabish MIT - 7.
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
W4140 Network Laboratory Lecture 5 Oct 9 - Fall 2006 Shlomo Hershkop Columbia University.
RFC 2453 RIP 2 (Routing Information Protocol) Daher Kaiss.
Routing and Routing Protocols
Routing.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
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.
Router Architectures An overview of router architectures.
CS 356: Computer Network Architectures Lecture 12: Dynamic routing protocols: Link State Chapter Xiaowei Yang
RIP. A PPROACHES TO S HORTEST P ATH R OUTING There are two basic routing algorithms found on the Internet. 1. Distance Vector Routing Each node knows.
Router Architectures An overview of router architectures.
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Network Layer Moving datagrams. How do it know? Tom-Tom.
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.
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.
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/Routed Protocols. Remember: A Routed Protocol – defines logical addressing. Most notable example on the test – IP A Routing Protocol – fills the.
1 Routing Protocols and Configuration Instructor: Te-Lung Liu Program Associate Researcher NCHC, South Region Office.
Count to infinity problem
Lecture 4: Dynamic routing protocols
Review Routing fundamental W.lilakiatsakun. Review Routing Fundamental VLSM VLSM Route Summarization Route Summarization Static & Dynamic Routing Static.
Interior Gateway Protocol. Introduction An IGP (Interior Gateway Protocol) is a protocol for exchanging routing information between gateways (hosts with.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
RIP2 (Routing Information Protocol) Team Agile. Routing Protocols Link State – OSPF – ISIS Distance vector – RIP (version 1 and 2) – IGRP (Cisco Proprietary)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
CS 356: Computer Network Architectures Lecture 11: DHCP and Dynamic Routing readings: [PD] 3.2.7, 3.3 Xiaowei Yang
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.
CS 4396 Computer Networks Lab Router Architectures.
Routing and Routing Protocols
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
1 Version 3.1 Module 6 Routed & Routing Protocols.
Dynamic Routing Protocols II OSPF
 RIP — A distance vector interior routing protocol  IGRP — The Cisco distance vector interior routing protocol (not used nowadays)  OSPF — A link-state.
Lecture 4: Dynamic routing protocols Today: 1.Overview of router architecture 2.RIP, OSPF, BGP 3.Notes on Lab 4 4.Midterm review.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
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 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
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.
Cisco 2 - Routers Perrine modified by Brierley Page 13/21/2016 Chapter 4 Module 6 Routing & Routing Protocols.
Routing Information Protocol (RIP) Sungsu Kim Sungsu Kim March 25, 2008.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Configuring RIP.
Dynamic Routing Protocols II OSPF
Dynamic Routing Protocols part2
Routing Information Protocol (RIP)
Distance Vector and Link State RIP OSPF
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
STRUCTURE OF A ROUTER We represent a router as a black box that accepts incoming packets from one of the input ports (interfaces), uses a routing table.
Dynamic Routing Protocols part2
STRUCTURE OF A ROUTER We represent a router as a black box that accepts incoming packets from one of the input ports (interfaces), uses a routing table.
CS 31006: Computer Networks – The Routers
Dynamic Routing Protocols II OSPF
EE 122: Intra-domain routing: Distance Vector
Chapter 4: Network Layer
STRUCTURE OF A ROUTER We represent a router as a black box that accepts incoming packets from one of the input ports (interfaces), uses a routing table.
Routing.
STRUCTURE OF A ROUTER We represent a router as a black box that accepts incoming packets from one of the input ports (interfaces), uses a routing table.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

Lecture 4: Dynamic routing protocols Today: 1.Overview of router architecture 2.RIP

2 If you got questions Questions related to Labs – Jasmine Questions related to lectures – me Questions related to grading – Xiaoping – Edgar

Router Architectures An overview of router architectures.

4 Two key router functions Control plane: run routing protocols (RIP, OSPF, BGP) Data plane: forwarding packets from incoming to outgoing link

5 Routing and Forwarding Routing functions include: –route calculation –maintenance of the routing table –execution of routing protocols On commercial routers handled by a single general purpose processor, called route processor IP forwarding is per-packet processing On high-end commercial routers, IP forwarding is distributed Most work is done on the interface cards

6 Router Hardware Components Hardware components of a router: –Network interfaces –Switching fabrics –Processor with a memory and CPU Interface Card Switching fabric Interface Card Processor CPUMemory

7 PC Router versus commercial router On a PC router: –Switching fabric is the (PCI) bus –Interface cards are NICs (e.g., Ethernet cards) –All forwarding and routing is done on central processor On Commercial routers: –Switching fabrics and interface cards can be sophisticated –Central processor is the route processor (only responsible for control functions) Interface Card Switching fabric Interface Card Processor CPUMemory

8 Basic Architectural Components Per-packet processing

9 Evolution of Router Architectures Early routers were essentially general purpose computers Today, high-performance routers resemble supercomputers Exploit parallelism Special hardware components Until 1980s (1 st generation): standard computer Early 1990s (2 nd generation):delegate to interfaces Late 1990s (3 rd generation): Distributed architecture Today: Distributed over multiple racks

10 1 st Generation Routers (switching via memory) This architecture is still used in low end routers Arriving packets are copied to main memory via direct memory access (DMA) Switching fabric is a backplane (shared bus) All IP forwarding functions are performed in the central processor. Routing cache at processor can accelerate the routing table lookup.

11 Drawbacks of 1 st Generation Routers Forwarding Performance is limited by memory and CPU Capacity of shared bus limits the number of interface cards that can be connected Input Port Output Port Memory System Bus

12 2 nd Generation Routers (switching via a shared bus) Keeps shared bus architecture, but offloads most IP forwarding to interface cards Interface cards have local route cache and processing elements Fast path: If routing entry is found in local cache, forward packet directly to outgoing interface Slow path: If routing table entry is not in cache, packet must be handled by central CPU

13 Another 2 nd Generation Architecture IP forwarding is done by separate components (Forwarding Engines) Forwarding operations: 1.Packet received on interface: Store the packet in local memory. Extracts IP header and sent to one forwarding engine 2.Forwarding engine does lookup, updates IP header, and sends it back to incoming interface 3.Packet is reconstructed and sent to outgoing interface.

14 Drawbacks of 2 nd Generation Routers Bus contention limits throughput

15 3 rd Generation Architecture Switching fabric is an interconnection network (e.g., a crossbar switch) Distributed architecture: –Interface cards operate independent of each other –No centralized processing for IP forwarding These routers can be scaled to many hundred interface cards and to aggregate capacity of > 1 Terabit per second

16 Slotted Chassis Large routers are built as a slotted chassis –Interface cards are inserted in the slots –Route processor is also inserted as a slot This simplifies repairs and upgrades of components

Dynamic Routing Protocols Part 1: RIP Relates to Lab 4. The first module on dynamic routing protocols. This module introduces RIP.

18 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 ? We already discussed the packet forwarding part –Longest prefix match There are two approaches for calculating the routing tables: –Static Routing (Lab 3) –Dynamic Routing: Routes are calculated by a routing protocol

19 Routing protocols versus routing algorithms Routing protocols establish routing tables at routers. A routing protocol specifies –What messages are sent between routers –Under what conditions the messages are sent –How messages are processed to compute routing tables At the heart of any routing protocol is a routing algorithm that determines the path from a source to a destination

20 What routing algorithms common routing protocols use Routing information protocol (RIP)Distance vector Interior Gateway routing protocol (IGRP, cisco proprietary) Distance vector Open shortest path first (OSPF)Link state Intermediate System-to-Intermediate System (IS-IS Link state Border gateway protocol (BGP)Path vector Routing protocol Routing algorithm

21 Intra-domain routing versus inter-domain routing Recall Internet is a network of networks. Administrative autonomy –internet = network of networks –each network admin may want to control routing in its own network Scale: with 200 million destinations: –can’t store all dest’s in routing tables! –routing table exchange would swamp links

22 Autonomous systems aggregate routers into regions, “autonomous systems” (AS) or domain routers in the same AS run the same routing protocol –“intra-AS” or intra-domain routing protocol –routers in different AS can run different intra-AS routing protocol

23 Autonomous Systems An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: UCI’s campus network MCI’s backbone network Regional Internet Service Provider Routing is done differently within an autonomous system (intradomain routing) and between autonomous system (interdomain routing). RIP, OSPF, IGRP, and IS-IS are intra-domain routing protocols. BGP is the only inter-domain routing protocol.

24 RIP and OSPF computes shortest paths Shortest path routing algorithms Goal: Given a network where each link is assigned a cost. Find the path with the least cost between two nodes. a b cd

25 Distance vector algorithm A decentralized algorithm –A router knows physically-connected neighbors and link costs to neighbors –A router does not have a global view of the network Path computation is iterative and mutually dependent. –A router sends its known distances to each destination (distance vector) to its neighbors. –A router updates the distance to a destination from all its neighbors’ distance vectors –A router sends its updated distance vector to its neighbors. –The process repeats until all routers’ distance vectors do not change (this condition is called convergence).

26 A router updates its distance vectors using bellman-ford equation Bellman-Ford Equation Define d x (y) := cost of the least-cost path from x to y Then d x (y) = min v {c(x,v) + d v (y) }, where min is taken over all neighbors of node x

27 Distance vector algorithm: initialization Let D x (y) be the estimate of least cost from x to y Initialization: –Each node x knows the cost to each neighbor: c(x,v). For each neighbor v of x, D x (v) = c(x,v) –D x (y) to other nodes are initialized as infinity. Each node x maintains a distance vector (DV): –D x = [D x (y): y 2 N ]

28 Distance vector algorithm: updates Each node x sends its distance vector to its neighbors, either periodically, or triggered by a change in its DV. When a node x receives a new DV estimate from a neighbor v, it updates its own DV using B-F equation: –If c(x,v) + D v (y) < D x (y) then D x (y) = c(x,v) + D v (y) Sets the next hop to reach the destination y to the neighbor v Notify neighbors of the change The estimate D x (y) will converge to the actual least cost d x (y)

29 Distance vector algorithm: an example t = 0 a = ((a, 0), (b, 3), (c, 6)) b = ((a, 3), (b, 0), (c,1)) c = ((a, 6), (b, 1), (c, 0) (d, 2)) d = ((c, 2), (d, 0)) a b cd t = 1 a = ((a, 0), (b, 3), (c, 4), (d, 8)) b = ((a, 3), (b, 0), (c,1), (d, 3)) c = ((a, 4), (b, 1), (c, 0), (d, 2)) d = ((a, 8), (b, 3), (c, 2), (d,0)) t = 2 a = ((a, 0), (b, 3), (c, 4), (d, 6)) b = ((a, 3), (b, 0), (c,1), (d, 3)) c = ((a, 4), (b, 1), (c, 0), (d, 2)) d = ((a, 6), (b, 3), (c, 2), (d,0))

30 How to map the abstract graph to the physical network Nodes (e.g., v, w, n) are routers, identified by IP addresses, e.g Nodes are connected by either a directed link or a broadcast link (Ethernet) Destinations are IP networks, represented by the network prefixes, e.g., /16 –Net(v,n) is the network directly connected to router v and n. Costs (e.g. c(v,n)) are associated with network interfaces. –Router1(config)# router rip –Router1(config-router)# offset-list 0 out 10 Ethernet0/0 –Router1(config-router)# offset-list 0 out 10 Ethernet0/1

31 Distance vector routing protocol: Routing Table Net(v,w): Network address of the network between v and w c(v,w): cost to transmit on the interface to network Net(v,w) D(v,net) is v’s cost to Net

32 Distance vector routing protocol: Messages Nodes send messages to their neighbors which contain distance vectors A message has the format: [Net, D(v,Net)] means“My cost to go to Net is D (v,Net)” v v n n [Net, D(v,Net)]

33 Distance vector routing algorithm: Sending Updates Periodically, each node v sends the content of its routing table to its neighbors:

34 Initiating Routing Table I Suppose a new node v becomes active. The cost to access directly connected networks is zero: –D (v, Net(v,m)) = 0 –D (v, Net(v,w)) = 0 –D (v, Net(v,n)) = 0

35 Initiating Routing Table II Node v sends the routing table entry to all its neighbors:

36 Initiating Routing Table III Node v receives the routing tables from other nodes and builds up its routing table

37 Updating Routing Tables I Suppose node v receives a message from node m: [ Net,D(m,Net)] if ( D(m,Net) + c (v,m) < D (v,Net) ) { D new (v,Net) := D (m,Net) + c (v,m); Update routing table; send message [Net, D new (v,Net)] to all neighbors } Node v updates its routing table and sends out further messages if the message reduces the cost of a route:

38 Updating Routing Tables II Before receiving the message: Suppose D (m,Net) + c (v,m) < D (v,Net):

39 Example Router ARouter B Router CRouter D / / / / / Assume: - link cost is 1, i.e., c(v,w) = 1 - all updates, updates occur simultaneously - Initially, each router only knows the cost of connected interfaces t=0: Net via cost t=0: Net via cost t=0: Net via cost t=0: Net via cost t=1: t=2: t=2: t=1: t=2: t=1: t=2: t=1:

40 Example Router ARouter B Router CRouter D / / / / / t=3: Net via cost t=3: Net via cost t=3: Net via cost t=3: Net via cost Now, routing tables have converged ! t=2: t=2: t=2: t=2:

41 Characteristics of Distance Vector Routing Protocols Periodic Updates: Updates to the routing tables are sent at the end of a certain time period. A typical value is 30 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.

42 The Count-to-Infinity Problem A A B B C C 11 A's Routing TableB's Routing Table C tocost via (next hop) 2BC tocost via (next hop) 1C now link B-C goes down C2C C 1 -C2B CC3 C3AC- C4C C-C4B

43 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?

44 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 to avoid loops (Path vectors) –BGP uses this solution

45 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 A’s current route to C –Split Horizon does not solve count-to-infinity in all cases! »You can produce the count-to-infinity problem in Lab 4.

46 RIP - Routing Information Protocol A simple intradomain protocol Straightforward implementation of Distance Vector Routing Each router advertises its distance vector every 30 seconds (or whenever its routing table changes) to all of its neighbors RIP always uses 1 as link metric Maximum hop count is 15, with “16” equal to “  ” Routes are timeout (set to 16) after 3 minutes if they are not updated

47 RIP - History Late 1960s : Distance Vector protocols were used in the ARPANET Mid-1970s: XNS (Xerox Network system) routing protocol is the ancestor of RIP in IP (and Novell’s IPX RIP and Apple’s routing protocol) 1982Release of routed for BSD Unix 1988RIPv1 (RFC 1058) - classful routing 1993RIPv2 (RFC 1388) - adds subnet masks with each route entry - allows classless routing 1998Current version of RIPv2 (RFC 2453)

48 RIPv1 Packet Format One RIP message can have up to 25 route entries 1: request 2: response 2: for IP Address of destination Cost (measured in hops) 1: RIPv1

49 RIPv2 RIPv2 is an extends RIPv1: –Subnet masks are carried in the route information –Authentication of routing messages –Route information carries next-hop address –Uses IP multicasting Extensions of RIPv2 are carried in unused fields of RIPv1 messages

50 RIPv2 Packet Format One RIP message can have up to 25 route entries 1: request 2: response 2: for IP Address of destination Cost (measured in hops) 2: RIPv2

51 RIPv2 Packet Format Used to provide a method of separating "internal" RIP routes (routes for networks within the RIP routing domain) from "external" RIP routes Identifies a better next-hop address on the same subnet than the advertising router, if one exists (otherwise 0….0) 2: RIPv2 Subnet mask for IP address

52 RIP Messages This is the operation of RIP in routed. Dedicated port for RIP is UDP port 520. Two types of messages: –Request messages used to ask neighboring nodes for an update –Response messages contains an update

53 Routing with RIP Initialization: Send a request packet (command = 1, address family=0..0) on all interfaces: RIPv1 uses broadcast if possible, RIPv2 uses multicast address , if possible requesting routing tables from neighboring routers Request received: Routers that receive above request send their entire routing table Response received: Update the routing table Regular routing updates: Every 30 seconds, send all or part of the routing tables to every neighbor in an response message Triggered Updates: Whenever the metric for a route change, send entire routing table.

54 RIP Security Issue: Sending bogus routing updates to a router RIPv1: No protection RIPv2: Simple authentication scheme 2: plaintext password

55 RIP Problems RIP takes a long time to stabilize –Even for a small network, it takes several minutes until the routing tables have settled after a change RIP has all the problems of distance vector algorithms, e.g., count-to-Infinity »RIP uses split horizon to avoid count-to-infinity The maximum path in RIP is 15 hops