1 / 42

CMPT 471 Networking II

CMPT 471 Networking II. RIP. Dynamic Routing. In very simple small and stable networks static routing may be adequate. As networks grow, become more complex, include multiple or redundant paths between hosts and routers, or change frequently, static routing becomes difficult to manage

mardi
Download Presentation

CMPT 471 Networking II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPT 471Networking II RIP

  2. Dynamic Routing • In very simple small and stable networks static routing may be adequate. • As networks grow, become more complex, include multiple or redundant paths between hosts and routers, or change frequently, static routing becomes difficult to manage • Redundant routes are only useful if they can be used immediately on failure of the original route • In a large network the reporting of failure and response by a network manager cannot be accomplished on a short enough time scale for the redundant routes to be useful

  3. Dynamic Routing • A routing algorithm to update the routing tables to respond to changes and failures in the network becomes a necessary component of the system • Addition of a routing algorithm does not change the forwarding algorithm used to deliver packets, segments … • Addition of a routing algorithm allows dynamic changes to the entries in the routing table, so those entries can be updated to respond to • Changes in network topology • Changes in load through the network

  4. Autonomous Systems (AS) • Group of connected networks and routers, or nodes, controlled by a single administrative authority. • May contain one or more networks (need not be subnets of one network, or networks of the same hardware type) • There is at least one route between any pair of nodes in the AS • Administrative authority can specify if packets originating in their AS are permitted to pass through any other AS (Company A may not wish it’s data to pass through Company B’s routers)

  5. Autonomous Systems (AS) • Routers within an AS use a common routing protocol (interior routing protocol or IRP) for all members of the group • Defines mechanisms for discovering, validating, and maintaining routes within the autonomous system • Some routers in the autonomous system (those connected to the larger Internet) also support a routing protocol for propagating subset of routing information to other autonomous systems on the internet (Exterior routing protocol or ERP)

  6. Conceptual view of AS Figure 16.3 Comer (2000)

  7. Sample routing protocols • IRP (Internal routing protocol, within AS) • GGP: gateway to gateway protocol (no longer used) • RIP: routing information protocol (implemented using routed, for simple networks only) • OSPF: Open Shortest Path First • ERP (External routing protocol, between AS’s) • BGP: ERP usually used in the internet.

  8. Routing algorithm • A routing algorithm or routing protocol process determines • How much information is sent to other routers • Which information is sent to other routers • How often information is sent to other routers • Which other routers to exchange information with • best route from present router to every other router in the AS • When and on what basis to change routes due to changes in the AS

  9. Static Routing • All routing information specified by administrator and installed at system boot time. Details are determined by the operating system being used • For Ubuntu LINUX, • Default static routing information can be found in /etc/network/network/interfaces • To add additional static routes through the interface up route add [-net|-host] <host/net>/<mask> gw <host/IP> dev <Interface>

  10. Distance-Vector Routing • Each node exchanges information only with neighbor nodes • Neighbors are both directly connected to same AS • Each node maintains vector of link costs for each directly attached node and distance and next-hop values for each destination node in the system • A node must transmit large amounts of information • Distance vector to all neighbors, Containing estimated path cost to all nodes in a configuration and next hop labels

  11. Distance-Vector Routing • Changes take long time to propagate (count to infinity) • Used by first generation routing algorithm for ARPANET and by Routing Information Protocol (RIP, routed) RIP is an internal gateway protocol (IGP) used between routers within an AS • There is no built in mechanism to prevent routing loops

  12. Distance Vector Routing • Once every T seconds each node i, sends each of its neighbors (one hop distant) a list, of estimated delays from itself to every other node j. • Similarly each node will receive routing information from each of its neighbors every T sec. • The routing data received are used to update the routing table of the node

  13. Distance Vector Routing • Similarly each station will receive routing information from each of its neighbors every T sec. • Note: the existing routing table for station i at time t is not used directly to compute the routing table for station i at time t+T, the ‘distance’ to each neighbor station k, lki, and the delay vectors from each neighbor station j, dij are used

  14. Updating the routing table • Use the distributed version of the Bellman-Ford algorithm. Di delay vector from node i Si successor node vector sij next node in minimum delay route from i to j N # of nodes in network lki current estimate of delay between neighbors k, I The set of neighbor nodes

  15. 6 4 5 A B C D 6 2 4 4 1 4 E 2 8 F H G 4 3 5 4 2 2 4 K I J L I Distance Vector Routing : from node J Original network and original delays 3 lJK 3 lJI 4 lJF 4 Delay lJi

  16. Calculate new routes at node J Delay vectors received lJK 3 Measured Delay lJi lJF 4 lJI 4 New table for node J DK+IJK DK+3 DF+IJF DF+4 DI+IJI DI+4 SK DK SK DK SF DF SI DI

  17. Actual Practice • The routing table is updated each time a packet of routing information arrives from a neighbor • The updating process consists of • Comparing the sum of the delay to the particular node from which the update came and the cost of propagation to that node to the present cost. • If the cost decreases replace the path for that node • If there is presently no such route add the route • Always replace the cost to the directly connected nodes

  18. Problems: distance vector routing • Changes take long time to propagate (count to infinity) • slow convergence • There is no built in mechanism to prevent routing loops • Oscillation and instability is possible

  19. Count to Infinity problem • In practice when conditions in a network change, the change will take time to propagate across the network. • Good news propagates quickly across a network • Bad news propagates slowly across the network

  20. Count to Infinity problem: • Consider a linear network with 6 stations • A is down initially and all other stations know this • A comes up, at the time of the first exchange of routing information after A comes up B learns that A is alive • At the time of the second exchange of routing information after A comes up C learns that A is alive • This pattern continues till the time of the sixth data exchange after A comes up, when F learns that A is alive. At this point all stations in the network have learned the good news F A E D B C

  21. Count to Infinity problem: • Linear network with 6 stations (all single hop costs 1) • A is up initially and all other stations know this • A goes down, at the time of the first exchange of routing information after A goes down B hears nothing from A. Since there is no direct path to A, B chooses an indirect path to A through C (which actually goes through B itself, but B doesn’t know this) • The first eight exchanges are illustrated on the next slide. F A E D B C

  22. Count to Infinity problem: • Initially B can reach A and C can reach A through B • When the link from B to A fails then B updates its routing table to indicate it cannot reach A directly. • When a update arrives at B from C, B notices that C has a route to A with a cost of 2, and adopts that route. The new route has a cost of (2+1)=3 • When an update from B reaches C, C notices the cost of the route to A through B has increased to 3 so it updates it own routes cost to A to (3+1)=4 • The process continues as the cost to route A counts to infinity. • In the more general network the costs increment as shown on the next slide A B C

  23. Count to Infinity problem: • Linear network with 6 stations(all single hop costs 1) • The number of iterations necessary to indicate that the link to 1 is down (cost infinite) is in fact infinite. It is clear that the delay increases as the number of iterations increase, but it is still necessary to ‘count to infinity’ to reach the correct link costs for link A-B down. F A E D B C

  24. Count to Infinity problem: • Linear network with 6 stations, single hop costs 1) 1 2 3 4 5 3 2 3 4 5 3 4 3 4 5 5 4 5 4 5 5 6 5 6 5 7 6 7 6 7 7 8 7 8 7 9 8 9 8 9 9 10 9 10 9 F A E D B C INITIALLY AFTER 1 EXCHANGE AFTER 2 EXCHANGES AFTER 3 EXCHANGES AFTER 4 EXCHANGES AFTER 5 EXCHANGES AFTER 6 EXCHANGES AFTER 7 EXCHANGES AFTER 8 EXCHANGES

  25. Routing Information Protocol • RIP, The simplest dynamic distance vector routing protocol still in use, was built and adopted before a formal standard was available (RFC 1058 RIPv1, 2453 RIPv2 ) • Implemented in LINUX as the routed process. • Adequate only for small and stable ASs • based on the Bellman-Ford (or distance vector) algorithm • helps control count to infinity problem by specifying a maximum hop count of 15

  26. Routing Information Protocol • Uses a simple metric, hop count • Not designed to deal with more complicated dynamic metrics such as delay, reliability or load (these can cause route oscillations) • Helps control oscillation between equal cost routes by retaining original route unless a route with a lower cost is found. • Helps prevent slow convergence (after changes in the topology of the network) by sending update messages immediately after updates have been completed (triggered updates)

  27. Routing Information Protocol • Helps prevent routing loops by • omitting routes learned from a particular neighbor in the updates sent to that neighbor or other neighbors reached through the same network interface (split-horizon) • advertising routes learned from a particular neighbor with cost 16 (∞) in the updates sent to that neighbor or other neighbors on the same broadcast network (split-horizon with poison reverse), • Nodes are either active (routers) or passive (silent hosts) • Active nodes advertise their routing information • Passive nodes listen for advertisements and update their routing tables accordingly

  28. Count to Infinity problem: • Initially B can reach A and C can reach A through B • When the link from B to A fails then B updates its routing table to indicate it cannot reach A directly. • When a update arrives at B from C, B notices that C has a route to A with a cost of 2, and adopts that route. The new route has a cost of (2+1)=3 • Split infinity: B does not send an update back to C for any route based on information supplied by C, eventually C’s entry for route to A expires and B finds that there is really no route • Split infinity with poison reverse: B sends an update with a cost of infinity back to C. If C really has a route that is not through B the route sent by B will never be used, otherwise C will update its path cost to A to infinity (Protects reverse routes) A B C

  29. Nodes in RIP • Nodes can be hosts or routers • Each node keeps a routing table for every possible destination network (or active host) in the AS. Each entry in the table includes • network or host address, gateway router address, metric and interface • a timer measuring the amount of time since the entry was last updated. • Active nodes send routing information to all neighbors

  30. Neighbors in RIP • All hosts or routers 1 hop from a node are the neighbors of that node • This means that all hosts on a network segment, including the router or routers for that segment (with a single broadcast address) are neighbors • Directly connected routers are also neighbors • Update messages containing routing information are sent only to neighbors

  31. Initialization: RIP • Each node needs to know its own address • Each node must be able to identify the links (interfaces) to which it is attached. • Each node starts with a routing table that contains a single entry, its own localhost • Each router broadcasts (advertises) that single entry through its interfaces to all attached networks. The information reaches all neighbor nodes (directly connected routers) • All nodes directly connected to a network segment receive the information from all routers on that network segment, and add that information to their routing tables.

  32. Updating and RIP • Then tables are updated or maintained • Each router will periodically broadcast its routing table • Each router will process the received updates, adding new entries, updating entries for which a lower cost path has been located and updating entries for directly connected nodes whose cost changed • If the routing information changes during the update process the router will immediately broadcast the modified tables to its neighbors (called a triggered broadcast)

  33. Updating and RIP • When no further changes occur the routing table has converged to the topology of the network • When a change is made to the network topology (removing, adding, or modifying a node) • The neighbor nodes will detect the change and update their routing tables • the routing algorithm will converges to a new topology consistent with the changes

  34. Timers in RIP • RIP uses three timers • The first timer keeps track of the route advertisement time. Each time it expires (usually every 30 seconds) a message containing the routing information is sent • The second and third types of timers are associated with each entry in the routing table. Each route is given an expiration timer and a garbage collection timer

  35. Timers in RIP • RIP uses three timers • The second and third types of timers are an expiration timer and a garbage collection timer • If no update information is received before the expiration timer (usually 180 seconds) expires the route is considered unreachable and its cost is set to ∞ (16) • When the expiration timer expires a garbage collection timer is set (usually 120 seconds). When the garbage collection timer expires the routing table entry is deleted

  36. RIP1 message format Comer 2000: fig 16.5

  37. RIP2 message format Comer 2000: fig 16.6

  38. RIP messages • RIP messages are sent encapsulated in UDP packets (port 520). The length of the message is transmitted only by UDP • RIPv1 cannot be used for variable length subnets or for CIDR addresses (must use RIPv2). If subnets are used all receivers must be able to interpret them. • Family gives the family of protocols used (TCP/IP 2) • 0.0.0.0 is address for default route

  39. RIP messages (RIPv1 and RIPv2) • Two types of messages request (1) and response (2) • A router may request routing information • A router may reply to a request by sending a response • Solicited responses will contain only the requested routes, not all available routes • A router may sent unsolicited responses (periodic broadcasts of routing table information for all routes)

  40. Improvements in RIP2 • Next hop field helps eliminate “double hops” a-b-a • The netmask means that RIP2 • Can handle subnet routing (not just within subnetted network, extension to RIP1 could do that) • Can deal with CIDR addresses • The route tag identifier • Used to flag external (to AS) routes

  41. Improvements in RIP2 • Includes an authentication procedure • The first entry in a packet can be replaced by an authentication segment (command will become a 32 bit field containing the command and authentication information, packet length, key … see RFC 2453, 2082 for details ) • RIP2 uses random variations on time delays • Triggered updates are delayed by 1-5 s • Periodic advertisements are randomized by adding between -5 and 5 seconds

  42. Why use RIP2 • “With the advent of OSPF and IS-IS, there are those who believe that RIP is obsolete. While it is true that the newer IGP routing protocols are far superior to RIP, RIP does have some advantages. Primarily, in a small network, RIP has very little overhead in terms of bandwidth used and configuration and management time. RIP is also very easy to implement, especially in relation to the newer IGPs. “ • Quote from RFC 2453 (RIP2)

More Related