idnits 2.17.1 draft-ietf-ripv2-protocol-v2-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-26) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 18 instances of too long lines in the document, the longest one being 5 characters in excess of 72. ** The abstract seems to contain references ([2], [3], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 1 instance of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 1998) is 9508 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: '10' is mentioned on line 1073, but not defined ** Downref: Normative reference to an Historic RFC: RFC 1058 (ref. '1') ** Obsolete normative reference: RFC 1389 (ref. '2') (Obsoleted by RFC 1724) -- Possible downref: Normative reference to a draft: ref. '3' -- Possible downref: Non-RFC (?) normative reference: ref. '4' -- Possible downref: Non-RFC (?) normative reference: ref. '5' ** Obsolete normative reference: RFC 1009 (ref. '6') (Obsoleted by RFC 1812) -- Possible downref: Non-RFC (?) normative reference: ref. '7' -- Possible downref: Non-RFC (?) normative reference: ref. '8' -- Possible downref: Non-RFC (?) normative reference: ref. '9' Summary: 14 errors (**), 0 flaws (~~), 4 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group G. Malkin 3 Obsoletes RFCs 1723, 1388 Bay Networks 4 April 1998 6 RIP Version 2 7 Carrying Additional Information 9 11 Abstract 13 This document specifies an extension of the Routing Information 14 Protocol (RIP), as defined in [1], to expand the amount of useful 15 information carried in RIP messages and to add a measure of security. 17 A companion document will define the SNMP MIB objects for RIP-2 [2]. 18 An additional document will define cryptographic security 19 improvements for RIP-2 [3]. 21 Status of this Memo 23 This document is an Internet Draft. Internet Drafts are working 24 documents of the Internet Engineering Task Force (IETF), its Areas, 25 and its Working Groups. Note that other groups may also distribute 26 working documents as Internet Drafts. 28 Internet Drafts are draft documents valid for a maximum of six 29 months. Internet Drafts may be updated, replaced, or obsoleted by 30 other documents at any time. It is not appropriate to use Internet 31 Drafts as reference material or to cite them other than as a "working 32 draft" or "work in progress." 34 Please check the I-D abstract listing contained in each Internet 35 Draft directory to learn the current status of this or any other 36 Internet Draft. 38 It is intended that this document will be submitted to the IESG for 39 consideration as a standards document. Distribution of this document 40 is unlimited. 42 Acknowledgements 44 I would like to thank the IETF RIP Working Group for their help in 45 improving the RIP-2 protocol. Much of the text for the background 46 discussions about distance vector protocols and some of the 47 descriptions of the operation of RIP were taken from "Routing 48 Information Protocol" by C. Hedrick. [1] Some of the final editing on 49 the document was done by Scott Bradner. 51 Table of Contents 53 1. Justification . . . . . . . . . . . . . . . . . . . . . . . . 4 55 2. Current RIP . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. Basic Protocol . . . . . . . . . . . . . . . . . . . . . . . . 4 58 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 4 59 3.2 Limitations of the Protocol . . . . . . . . . . . . . . . . 6 60 3.3. Organization of this document . . . . . . . . . . . . . . . 6 61 3.4 Distance Vector Algorithms . . . . . . . . . . . . . . . . . 6 62 3.4.1 Dealing with changes in topology . . . . . . . . . . . . 12 63 3.4.2 Preventing instability . . . . . . . . . . . . . . . . . 13 64 3.4.3 Split horizon . . . . . . . . . . . . . . . . . . . . . . 16 65 3.4.4 Triggered updates . . . . . . . . . . . . . . . . . . . . 17 66 3.5 Protocol Specification . . . . . . . . . . . . . . . . . . 18 67 3.6 Message Format . . . . . . . . . . . . . . . . . . . . . . . 20 68 3.7 Addressing Considerations . . . . . . . . . . . . . . . . . 21 69 3.8 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 70 3.9 Input Processing . . . . . . . . . . . . . . . . . . . . . . 25 71 3.9.1 Request Messages . . . . . . . . . . . . . . . . . . . . 25 72 3.9.2 Response Messages . . . . . . . . . . . . . . . . . . . . 26 73 3.10 Output Processing . . . . . . . . . . . . . . . . . . . . . 28 74 3.10.1 Triggered Updates . . . . . . . . . . . . . . . . . . . . 29 75 3.10.2 Generating Response Messages. . . . . . . . . . . . . . . 29 77 4. Protocol Extensions . . . . . . . . . . . . . . . . . . . . . 30 78 4.1 Authentication . . . . . . . . . . . . . . . . . . . . . . . 31 79 4.2 Route Tag . . . . . . . . . . . . . . . . . . . . . . . . . 31 80 4.3 Subnet Mask . . . . . . . . . . . . . . . . . . . . . . . . 32 81 4.4 Next Hop . . . . . . . . . . . . . . . . . . . . . . . . . . 32 82 4.5 Multicasting . . . . . . . . . . . . . . . . . . . . . . . . 32 83 4.6 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . 33 85 5. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 33 86 5.1 Compatibility Switch . . . . . . . . . . . . . . . . . . . . 33 87 5.2 Authentication . . . . . . . . . . . . . . . . . . . . . . . 34 88 5.3 Larger Infinity . . . . . . . . . . . . . . . . . . . . . . 34 89 5.4 Addressless Links . . . . . . . . . . . . . . . . . . . . . 34 91 6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 93 Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 95 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 97 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 35 99 1. Justification 101 With the advent of OSPF and IS-IS, there are those who believe that 102 RIP is obsolete. While it is true that the newer IGP routing 103 protocols are far superior to RIP, RIP does have some advantages. 104 Primarily, in a small network, RIP has very little overhead in terms 105 of bandwidth used and configuration and management time. RIP is also 106 very easy to implement, especially in relation to the newer IGPs. 108 Additionally, there are many, many more RIP implementations in the 109 field than OSPF and IS-IS combined. It is likely to remain that way 110 for some years yet. 112 Given that RIP will be useful in many environments for some period of 113 time, it is reasonable to increase RIP's usefulness. This is 114 especially true since the gain is far greater than the expense of the 115 change. 117 2. Current RIP 119 The current RIP-1 message contains the minimal amount of information 120 necessary for routers to route messages through a network. It also 121 contains a large amount of unused space, owing to its origins. 123 The current RIP-1 protocol does not consider autonomous systems and 124 IGP/EGP interactions, subnetting, and authentication since 125 implementations of these postdate RIP-1. The lack of subnet masks is 126 a particularly serious problem for routers since they need a subnet 127 mask to know how to determine a route. If a RIP-1 route is a network 128 route (all non-network bits 0), the subnet mask equals the network 129 mask. However, if some of the non-network bits are set, the router 130 cannot determine the subnet mask. Worse still, the router cannot 131 determine if the RIP-1 route is a subnet route or a host route. 132 Currently, some routers simply choose the subnet mask of the 133 interface over which the route was learned and determine the route 134 type from that. 136 3. Basic Protocol 138 3.1 Introduction 140 RIP is a routing protocol based on the Bellman-Ford (or distance 141 vector) algorithm. This algorithm has been used for routing 142 computations in computer networks since the early days of the 143 ARPANET. The particular packet formats and protocol described here 144 are based on the program "routed," which is included with the 145 Berkeley distribution of Unix. 147 In an international network, such as the Internet, it is very 148 unlikely that a single routing protocol will used for the entire 149 network. Rather, the network will be organized as a collection of 150 Autonomous Systems (AS), each of which will, in general, be 151 administered by a single entity. Each AS will have its own routing 152 technology, which may differ among AS's. The routing protocol used 153 within an AS is referred to as an Interior Gateway Protocol (IGP). A 154 separate protocol, called an Exterior Gateway Protocol (EGP), is used 155 to transfer routing information among the AS's. RIP was designed to 156 work as an IGP in moderate-size AS's. It is not intended for use in 157 more complex environments. For information on the context into which 158 RIP-1 is expected to fit, see Braden and Postel [6]. 160 RIP uses one of a class of routing algorithms known as Distance 161 Vector algorithms. The earliest description of this class of 162 algorithms known to the author is in Ford and Fulkerson [8]. Because 163 of this, they are sometimes known as Ford-Fulkerson algorithms. The 164 term Bellman-Ford is also used, and derives from the fact that the 165 formulation is based on Bellman's equation [4]. The presentation in 166 this document is closely based on [5]. This document contains a 167 protocol specification. For an introduction to the mathematics of 168 routing algorithms, see [1]. The basic algorithms used by this 169 protocol were used in computer routing as early as 1969 in the 170 ARPANET. However, the specific ancestry of this protocol is within 171 the Xerox network protocols. The PUP protocols [7] used the Gateway 172 Information Protocol to exchange routing information. A somewhat 173 updated version of this protocol was adopted for the Xerox Network 174 Systems (XNS) architecture, with the name Routing Information 175 Protocol [9]. Berkeley's routed is largely the same as the Routing 176 Information Protocol, with XNS addresses replaced by a more general 177 address format capable of handling IPv4 and other types of address, 178 and with routing updates limited to one every 30 seconds. Because of 179 this similarity, the term Routing Information Protocol (or just RIP) 180 is used to refer to both the XNS protocol and the protocol used by 181 routed. 183 RIP is intended for use within the IP-based Internet. The Internet 184 is organized into a number of networks connected by special purpose 185 gateways known as routers. The networks may be either point-to-point 186 links or more complex networks such as Ethernet or the ARPANET. 187 Hosts and routers are presented with IP datagrams addressed to some 188 host. Routing is the method by which the host or router decides 189 where to send the datagram. It may be able to send the datagram 190 directly to the destination, if that destination is on one of the 191 networks that are directly connected to the host or router. However, 192 the interesting case is when the destination is not directly 193 reachable. In this case, the host or router attempts to send the 194 datagram to a router that is nearer the destination. The goal of a 195 routing protocol is very simple: It is to supply the information that 196 is needed to do routing. 198 3.2 Limitations of the Protocol 200 This protocol does not solve every possible routing problem. As 201 mentioned above, it is primary intended for use as an IGP in networks 202 of moderate size. In addition, the following specific limitations 203 are be mentioned: 205 - The protocol is limited to networks whose longest path (the 206 network's diameter) is 15 hops. The designers believe that the 207 basic protocol design is inappropriate for larger networks. Note 208 that this statement of the limit assumes that a cost of 1 is used 209 for each network. This is the way RIP is normally configured. If 210 the system administrator chooses to use larger costs, the upper 211 bound of 15 can easily become a problem. 213 - The protocol depends upon "counting to infinity" to resolve certain 214 unusual situations. (This will be explained in the next section.) 215 If the system of networks has several hundred networks, and a 216 routing loop was formed involving all of them, the resolution of 217 the loop would require either much time (if the frequency of 218 routing updates were limited) or bandwidth (if updates were sent 219 whenever changes were detected). Such a loop would consume a large 220 amount of network bandwidth before the loop was corrected. We 221 believe that in realistic cases, this will not be a problem except 222 on slow lines. Even then, the problem will be fairly unusual, 223 since various precautions are taken that should prevent these 224 problems in most cases. 226 - This protocol uses fixed "metrics" to compare alternative routes. 227 It is not appropriate for situations where routes need to be chosen 228 based on real-time parameters such a measured delay, reliability, 229 or load. The obvious extensions to allow metrics of this type are 230 likely to introduce instabilities of a sort that the protocol is 231 not designed to handle. 233 3.3. Organization of this document 234 The main body of this document is organized into two parts, which 235 occupy the next two sections: 237 A conceptual development and justification of distance vector 238 algorithms in general. 240 The actual protocol description. 242 Each of these two sections can largely stand on its own. Section 3.4 243 attempts to give an informal presentation of the mathematical 244 underpinnings of the algorithm. Note that the presentation follows a 245 "spiral" method. An initial, fairly simple algorithm is described. 246 Then refinements are added to it in successive sections. Section 3.5 247 is the actual protocol description. Except where specific references 248 are made to section 3.4, it should be possible to implement RIP 249 entirely from the specifications given in section 3.5. 251 3.4 Distance Vector Algorithms 253 Routing is the task of finding a path from a sender to a desired 254 destination. In the IP "Catenet model" this reduces primarily to a 255 matter of finding routers between networks. As long as a message 256 remains on a single network or subnet, any routing problems are 257 solved by technology that is specific to the network. For example, 258 the Ethernet and the ARPANET each define a way in which any sender 259 can talk to any specified destination within that one network. IP 260 routing comes in primarily when messages must go from a sender on one 261 such network to a destination on a different one. In that case, the 262 message must pass through routers connecting the networks. If the 263 networks are not adjacent, the message may pass through several 264 intervening networks, and the routers connecting them. Once the 265 message gets to a router that is on the same network as the 266 destination, that network's own technology is used to get to the 267 destination. 269 Throughout this section, the term "network" is used generically to 270 cover a single broadcast network (e.g., an Ethernet), a point to 271 point line, or the ARPANET. The critical point is that a network is 272 treated as a single entity by IP. Either no routing is necessary (as 273 with a point to point line), or that routing is done in a manner that 274 is transparent to IP, allowing IP to treat the entire network as a 275 single fully-connected system (as with an Ethernet or the ARPANET). 276 Note that the term "network" is used in a somewhat different way in 277 discussions of IP addressing. A single IP network number may be 278 assigned to a collection of networks, with "subnet" addressing being 279 used to describe the individual networks. In effect, we are using 280 the term "network" here to refer to subnets in cases where subnet 281 addressing is in use. 283 A number of different approaches for finding routes between networks 284 are possible. One useful way of categorizing these approaches is on 285 the basis of the type of information the routers need to exchange in 286 order to be able to find routes. Distance vector algorithms are 287 based on the exchange of only a small amount of information. Each 288 entity (router or host) that participates in the routing protocol is 289 assumed to keep information about all of the destinations within the 290 system. Generally, information about all entities connected to one 291 network is summarized by a single entry, which describes the route to 292 all destinations on that network. This summarization is possible 293 because as far as IP is concerned, routing within a network is 294 invisible. Each entry in this routing database includes the next 295 router to which datagrams destined for the entity should be sent. In 296 addition, it includes a "metric" measuring the total distance to the 297 entity. Distance is a somewhat generalized concept, which may cover 298 the time delay in getting messages to the entity, the dollar cost of 299 sending messages to it, etc. Distance vector algorithms get their 300 name from the fact that it is possible to compute optimal routes when 301 the only information exchanged is the list of these distances. 302 Furthermore, information is only exchanged among entities that are 303 adjacent, that is, entities that share a common network. 305 Although routing is most commonly based on information about 306 networks, it is sometimes necessary to keep track of the routes to 307 individual hosts. The RIP protocol makes no formal distinction 308 between networks and hosts. It simply describes exchange of 309 information about destinations, which may be either networks or 310 hosts. (Note however, that it is possible for an implementor to 311 choose not to support host routes. See section 3.2.) In fact, the 312 mathematical developments are most conveniently thought of in terms 313 of routes from one host or router to another. When discussing the 314 algorithm in abstract terms, it is best to think of a routing entry 315 for a network as an abbreviation for routing entries for all of the 316 entities connected to that network. This sort of abbreviation makes 317 sense only because we think of networks as having no internal 318 structure that is visible at the IP level. Thus, we will generally 319 assign the same distance to every entity in a given network. 321 We said above that each entity keeps a routing database with one 322 entry for every possible destination in the system. An actual 323 implementation is likely to need to keep the following information 324 about each destination: 326 - address: in IP implementations of these algorithms, this will be 327 the IP address of the host or network. 329 - router: the first router along the route to the destination. 331 - interface: the physical network which must be used to reach the 332 first router. 334 - metric: a number, indicating the distance to the destination. 336 - timer: the amount of time since the entry was last updated. 338 In addition, various flags and other internal information will 339 probably be included. This database is initialized with a 340 description of the entities that are directly connected to the 341 system. It is updated according to information received in messages 342 from neighboring routers. 344 The most important information exchanged by the hosts and routers is 345 that carried in update messages. Each entity that participates in 346 the routing scheme sends update messages that describe the routing 347 database as it currently exists in that entity. It is possible to 348 maintain optimal routes for the entire system by using only 349 information obtained from neighboring entities. The algorithm used 350 for that will be described in the next section. 352 As we mentioned above, the purpose of routing is to find a way to get 353 datagrams to their ultimate destinations. Distance vector algorithms 354 are based on a table giving the best route to every destination in 355 the system. Of course, in order to define which route is best, we 356 have to have some way of measuring goodness. This is referred to as 357 the "metric". 359 In simple networks, it is common to use a metric that simply counts 360 how many routers a message must go through. In more complex 361 networks, a metric is chosen to represent the total amount of delay 362 that the message suffers, the cost of sending it, or some other 363 quantity which may be minimized. The main requirement is that it 364 must be possible to represent the metric as a sum of "costs" for 365 individual hops. 367 Formally, if it is possible to get from entity i to entity j directly 368 (i.e., without passing through another router between), then a cost, 369 d(i,j), is associated with the hop between i and j. In the normal 370 case where all entities on a given network are considered to be the 371 same, d(i,j) is the same for all destinations on a given network, and 372 represents the cost of using that network. To get the metric of a 373 complete route, one just adds up the costs of the individual hops 374 that make up the route. For the purposes of this memo, we assume 375 that the costs are positive integers. 377 Let D(i,j) represent the metric of the best route from entity i to 378 entity j. It should be defined for every pair of entities. d(i,j) 379 represents the costs of the individual steps. Formally, let d(i,j) 380 represent the cost of going directly from entity i to entity j. It 381 is infinite if i and j are not immediate neighbors. (Note that d(i,i) 382 is infinite. That is, we don't consider there to be a direct 383 connection from a node to itself.) Since costs are additive, it is 384 easy to show that the best metric must be described by 385 D(i,i) = 0, all i 386 D(i,j) = min [d(i,k) + D(k,j)], otherwise 387 k 389 and that the best routes start by going from i to those neighbors k 390 for which d(i,k) + D(k,j) has the minimum value. (These things can 391 be shown by induction on the number of steps in the routes.) Note 392 that we can limit the second equation to k's that are immediate 393 neighbors of i. For the others, d(i,k) is infinite, so the term 394 involving them can never be the minimum. 396 It turns out that one can compute the metric by a simple algorithm 397 based on this. Entity i gets its neighbors k to send it their 398 estimates of their distances to the destination j. When i gets the 399 estimates from k, it adds d(i,k) to each of the numbers. This is 400 simply the cost of traversing the network between i and k. Now and 401 then i compares the values from all of its neighbors and picks the 402 smallest. 404 A proof is given in [2] that this algorithm will converge to the 405 correct estimates of D(i,j) in finite time in the absence of topology 406 changes. The authors make very few assumptions about the order in 407 which the entities send each other their information, or when the min 408 is recomputed. Basically, entities just can't stop sending updates 409 or recomputing metrics, and the networks can't delay messages 410 forever. (Crash of a routing entity is a topology change.) Also, 411 their proof does not make any assumptions about the initial estimates 412 of D(i,j), except that they must be non-negative. The fact that 413 these fairly weak assumptions are good enough is important. Because 414 we don't have to make assumptions about when updates are sent, it is 415 safe to run the algorithm asynchronously. That is, each entity can 416 send updates according to its own clock. Updates can be dropped by 417 the network, as long as they don't all get dropped. Because we don't 418 have to make assumptions about the starting condition, the algorithm 419 can handle changes. When the system changes, the routing algorithm 420 starts moving to a new equilibrium, using the old one as its starting 421 point. It is important that the algorithm will converge in finite 422 time no matter what the starting point. Otherwise certain kinds of 423 changes might lead to non-convergent behavior. 425 The statement of the algorithm given above (and the proof) assumes 426 that each entity keeps copies of the estimates that come from each of 427 its neighbors, and now and then does a min over all of the neighbors. 428 In fact real implementations don't necessarily do that. They simply 429 remember the best metric seen so far, and the identity of the 430 neighbor that sent it. They replace this information whenever they 431 see a better (smaller) metric. This allows them to compute the 432 minimum incrementally, without having to store data from all of the 433 neighbors. 435 There is one other difference between the algorithm as described in 436 texts and those used in real protocols such as RIP: the description 437 above would have each entity include an entry for itself, showing a 438 distance of zero. In fact this is not generally done. Recall that 439 all entities on a network are normally summarized by a single entry 440 for the network. Consider the situation of a host or router G that 441 is connected to network A. C represents the cost of using network A 442 (usually a metric of one). (Recall that we are assuming that the 443 internal structure of a network is not visible to IP, and thus the 444 cost of going between any two entities on it is the same.) In 445 principle, G should get a message from every other entity H on 446 network A, showing a cost of 0 to get from that entity to itself. G 447 would then compute C + 0 as the distance to H. Rather than having G 448 look at all of these identical messages, it simply starts out by 449 making an entry for network A in its table, and assigning it a metric 450 of C. This entry for network A should be thought of as summarizing 451 the entries for all other entities on network A. The only entity on 452 A that can't be summarized by that common entry is G itself, since 453 the cost of going from G to G is 0, not C. But since we never need 454 those 0 entries, we can safely get along with just the single entry 455 for network A. Note one other implication of this strategy: because 456 we don't need to use the 0 entries for anything, hosts that do not 457 function as routers don't need to send any update messages. Clearly 458 hosts that don't function as routers (i.e., hosts that are connected 459 to only one network) can have no useful information to contribute 460 other than their own entry D(i,i) = 0. As they have only the one 461 interface, it is easy to see that a route to any other network 462 through them will simply go in that interface and then come right 463 back out it. Thus the cost of such a route will be greater than the 464 best cost by at least C. Since we don't need the 0 entries, non- 465 routers need not participate in the routing protocol at all. 467 Let us summarize what a host or router G does. For each destination 468 in the system, G will keep a current estimate of the metric for that 469 destination (i.e., the total cost of getting to it) and the identity 470 of the neighboring router on whose data that metric is based. If the 471 destination is on a network that is directly connected to G, then G 472 simply uses an entry that shows the cost of using the network, and 473 the fact that no router is needed to get to the destination. It is 474 easy to show that once the computation has converged to the correct 475 metrics, the neighbor that is recorded by this technique is in fact 476 the first router on the path to the destination. (If there are 477 several equally good paths, it is the first router on one of them.) 478 This combination of destination, metric, and router is typically 479 referred to as a route to the destination with that metric, using 480 that router. 482 The method so far only has a way to lower the metric, as the existing 483 metric is kept until a smaller one shows up. It is possible that the 484 initial estimate might be too low. Thus, there must be a way to 485 increase the metric. It turns out to be sufficient to use the 486 following rule: suppose the current route to a destination has metric 487 D and uses router G. If a new set of information arrived from some 488 source other than G, only update the route if the new metric is 489 better than D. But if a new set of information arrives from G 490 itself, always update D to the new value. It is easy to show that 491 with this rule, the incremental update process produces the same 492 routes as a calculation that remembers the latest information from 493 all the neighbors and does an explicit minimum. (Note that the 494 discussion so far assumes that the network configuration is static. 495 It does not allow for the possibility that a system might fail.) 497 To summarize, here is the basic distance vector algorithm as it has 498 been developed so far. (Note that this is not a statement of the RIP 499 protocol. There are several refinements still to be added.) The 500 following procedure is carried out by every entity that participates 501 in the routing protocol. This must include all of the routers in the 502 system. Hosts that are not routers may participate as well. 504 - Keep a table with an entry for every possible destination in the 505 system. The entry contains the distance D to the destination, and 506 the first router G on the route to that network. Conceptually, 507 there should be an entry for the entity itself, with metric 0, but 508 this is not actually included. 510 - Periodically, send a routing update to every neighbor. The update 511 is a set of messages that contain all of the information from the 512 routing table. It contains an entry for each destination, with the 513 distance shown to that destination. 515 - When a routing update arrives from a neighbor G', add the cost 516 associated with the network that is shared with G'. (This should 517 be the network over which the update arrived.) Call the resulting 518 distance D'. Compare the resulting distances with the current 519 routing table entries. If the new distance D' for N is smaller 520 than the existing value D, adopt the new route. That is, change 521 the table entry for N to have metric D' and router G'. If G' is 522 the router from which the existing route came, i.e., G' = G, then 523 use the new metric even if it is larger than the old one. 525 3.4.1 Dealing with changes in topology 527 The discussion above assumes that the topology of the network is 528 fixed. In practice, routers and lines often fail and come back up. 529 To handle this possibility, we need to modify the algorithm slightly. 531 The theoretical version of the algorithm involved a minimum over all 532 immediate neighbors. If the topology changes, the set of neighbors 533 changes. Therefore, the next time the calculation is done, the 534 change will be reflected. However, as mentioned above, actual 535 implementations use an incremental version of the minimization. Only 536 the best route to any given destination is remembered. If the router 537 involved in that route should crash, or the network connection to it 538 break, the calculation might never reflect the change. The algorithm 539 as shown so far depends upon a router notifying its neighbors if its 540 metrics change. If the router crashes, then it has no way of 541 notifying neighbors of a change. 543 In order to handle problems of this kind, distance vector protocols 544 must make some provision for timing out routes. The details depend 545 upon the specific protocol. As an example, in RIP every router that 546 participates in routing sends an update message to all its neighbors 547 once every 30 seconds. Suppose the current route for network N uses 548 router G. If we don't hear from G for 180 seconds, we can assume 549 that either the router has crashed or the network connecting us to it 550 has become unusable. Thus, we mark the route as invalid. When we 551 hear from another neighbor that has a valid route to N, the valid 552 route will replace the invalid one. Note that we wait for 180 553 seconds before timing out a route even though we expect to hear from 554 each neighbor every 30 seconds. Unfortunately, messages are 555 occasionally lost by networks. Thus, it is probably not a good idea 556 to invalidate a route based on a single missed message. 558 As we will see below, it is useful to have a way to notify neighbors 559 that there currently isn't a valid route to some network. RIP, along 560 with several other protocols of this class, does this through a 561 normal update message, by marking that network as unreachable. A 562 specific metric value is chosen to indicate an unreachable 563 destination; that metric value is larger than the largest valid 564 metric that we expect to see. In the existing implementation of RIP, 565 16 is used. This value is normally referred to as "infinity", since 566 it is larger than the largest valid metric. 16 may look like a 567 surprisingly small number. It is chosen to be this small for reasons 568 that we will see shortly. In most implementations, the same 569 convention is used internally to flag a route as invalid. 571 3.4.2 Preventing instability 573 The algorithm as presented up to this point will always allow a host 574 or router to calculate a correct routing table. However, that is 575 still not quite enough to make it useful in practice. The proofs 576 referred to above only show that the routing tables will converge to 577 the correct values in finite time. They do not guarantee that this 578 time will be small enough to be useful, nor do they say what will 579 happen to the metrics for networks that become inaccessible. 581 It is easy enough to extend the mathematics to handle routes becoming 582 inaccessible. The convention suggested above will do that. We 583 choose a large metric value to represent "infinity". This value must 584 be large enough that no real metric would ever get that large. For 585 the purposes of this example, we will use the value 16. Suppose a 586 network becomes inaccessible. All of the immediately neighboring 587 routers time out and set the metric for that network to 16. For 588 purposes of analysis, we can assume that all the neighboring routers 589 have gotten a new piece of hardware that connects them directly to 590 the vanished network, with a cost of 16. Since that is the only 591 connection to the vanished network, all the other routers in the 592 system will converge to new routes that go through one of those 593 routers. It is easy to see that once convergence has happened, all 594 the routers will have metrics of at least 16 for the vanished 595 network. Routers one hop away from the original neighbors would end 596 up with metrics of at least 17; routers two hops away would end up 597 with at least 18, etc. As these metrics are larger than the maximum 598 metric value, they are all set to 16. It is obvious that the system 599 will now converge to a metric of 16 for the vanished network at all 600 routers. 602 Unfortunately, the question of how long convergence will take is not 603 amenable to quite so simple an answer. Before going any further, it 604 will be useful to look at an example (taken from [2]). Note, by the 605 way, that what we are about to show will not happen with a correct 606 implementation of RIP. We are trying to show why certain features 607 are needed. Note that the letters correspond to routers, and the 608 lines to networks. 610 A-----B 611 \ / \ 612 \ / | 613 C / all networks have cost 1, except 614 | / for the direct link from C to D, which 615 |/ has cost 10 616 D 617 |<=== target network 619 Each router will have a table showing a route to each network. 621 However, for purposes of this illustration, we show only the routes 622 from each router to the network marked at the bottom of the diagram. 624 D: directly connected, metric 1 625 B: route via D, metric 2 626 C: route via B, metric 3 627 A: route via B, metric 3 629 Now suppose that the link from B to D fails. The routes should now 630 adjust to use the link from C to D. Unfortunately, it will take a 631 while for this to this to happen. The routing changes start when B 632 notices that the route to D is no longer usable. For simplicity, the 633 chart below assumes that all routers send updates at the same time. 634 The chart shows the metric for the target network, as it appears in 635 the routing table at each router. 637 time ------> 639 D: dir, 1 dir, 1 dir, 1 dir, 1 ... dir, 1 dir, 1 640 B: unreach C, 4 C, 5 C, 6 C, 11 C, 12 641 C: B, 3 A, 4 A, 5 A, 6 A, 11 D, 11 642 A: B, 3 C, 4 C, 5 C, 6 C, 11 C, 12 644 dir = directly connected 645 unreach = unreachable 647 Here's the problem: B is able to get rid of its failed route using a 648 timeout mechanism. But vestiges of that route persist in the system 649 for a long time. Initially, A and C still think they can get to D 650 via B. So, they keep sending updates listing metrics of 3. In the 651 next iteration, B will then claim that it can get to D via either A 652 or C. Of course, it can't. The routes being claimed by A and C are 653 now gone, but they have no way of knowing that yet. And even when 654 they discover that their routes via B have gone away, they each think 655 there is a route available via the other. Eventually the system 656 converges, as all the mathematics claims it must. But it can take 657 some time to do so. The worst case is when a network becomes 658 completely inaccessible from some part of the system. In that case, 659 the metrics may increase slowly in a pattern like the one above until 660 they finally reach infinity. For this reason, the problem is called 661 "counting to infinity". 663 You should now see why "infinity" is chosen to be as small as 664 possible. If a network becomes completely inaccessible, we want 665 counting to infinity to be stopped as soon as possible. Infinity 666 must be large enough that no real route is that big. But it 667 shouldn't be any bigger than required. Thus the choice of infinity 668 is a tradeoff between network size and speed of convergence in case 669 counting to infinity happens. The designers of RIP believed that the 670 protocol was unlikely to be practical for networks with a diameter 671 larger than 15. 673 There are several things that can be done to prevent problems like 674 this. The ones used by RIP are called "split horizon with poisoned 675 reverse", and "triggered updates". 677 3.4.3 Split horizon 679 Note that some of the problem above is caused by the fact that A and 680 C are engaged in a pattern of mutual deception. Each claims to be 681 able to get to D via the other. This can be prevented by being a bit 682 more careful about where information is sent. In particular, it is 683 never useful to claim reachability for a destination network to the 684 neighbor(s) from which the route was learned. "Split horizon" is a 685 scheme for avoiding problems caused by including routes in updates 686 sent to the router from which they were learned. The "simple split 687 horizon" scheme omits routes learned from one neighbor in updates 688 sent to that neighbor. "Split horizon with poisoned reverse" 689 includes such routes in updates, but sets their metrics to infinity. 691 If A thinks it can get to D via C, its messages to C should indicate 692 that D is unreachable. If the route through C is real, then C either 693 has a direct connection to D, or a connection through some other 694 router. C's route can't possibly go back to A, since that forms a 695 loop. By telling C that D is unreachable, A simply guards against 696 the possibility that C might get confused and believe that there is a 697 route through A. This is obvious for a point to point line. But 698 consider the possibility that A and C are connected by a broadcast 699 network such as an Ethernet, and there are other routers on that 700 network. If A has a route through C, it should indicate that D is 701 unreachable when talking to any other router on that network. The 702 other routers on the network can get to C themselves. They would 703 never need to get to C via A. If A's best route is really through C, 704 no other router on that network needs to know that A can reach D. 705 This is fortunate, because it means that the same update message that 706 is used for C can be used for all other routers on the same network. 707 Thus, update messages can be sent by broadcast. 709 In general, split horizon with poisoned reverse is safer than simple 710 split horizon. If two routers have routes pointing at each other, 711 advertising reverse routes with a metric of 16 will break the loop 712 immediately. If the reverse routes are simply not advertised, the 713 erroneous routes will have to be eliminated by waiting for a timeout. 714 However, poisoned reverse does have a disadvantage: it increases the 715 size of the routing messages. Consider the case of a campus backbone 716 connecting a number of different buildings. In each building, there 717 is a router connecting the backbone to a local network. Consider 718 what routing updates those routers should broadcast on the backbone 719 network. All that the rest of the network really needs to know about 720 each router is what local networks it is connected to. Using simple 721 split horizon, only those routes would appear in update messages sent 722 by the router to the backbone network. If split horizon with 723 poisoned reverse is used, the router must mention all routes that it 724 learns from the backbone, with metrics of 16. If the system is 725 large, this can result in a large update message, almost all of whose 726 entries indicate unreachable networks. 728 In a static sense, advertising reverse routes with a metric of 16 729 provides no additional information. If there are many routers on one 730 broadcast network, these extra entries can use significant bandwidth. 731 The reason they are there is to improve dynamic behavior. When 732 topology changes, mentioning routes that should not go through the 733 router as well as those that should can speed up convergence. 734 However, in some situations, network managers may prefer to accept 735 somewhat slower convergence in order to minimize routing overhead. 736 Thus implementors may at their option implement simple split horizon 737 rather than split horizon with poisoned reverse, or they may provide 738 a configuration option that allows the network manager to choose 739 which behavior to use. It is also permissible to implement hybrid 740 schemes that advertise some reverse routes with a metric of 16 and 741 omit others. An example of such a scheme would be to use a metric of 742 16 for reverse routes for a certain period of time after routing 743 changes involving them, and thereafter omitting them from updates. 745 3.4.4 Triggered updates 747 Split horizon with poisoned reverse will prevent any routing loops 748 that involve only two routers. However, it is still possible to end 749 up with patterns in which three routers are engaged in mutual 750 deception. For example, A may believe it has a route through B, B 751 through C, and C through A. Split horizon cannot stop such a loop. 752 This loop will only be resolved when the metric reaches infinity and 753 the network involved is then declared unreachable. Triggered updates 754 are an attempt to speed up this convergence. To get triggered 755 updates, we simply add a rule that whenever a router changes the 756 metric for a route, it is required to send update messages almost 757 immediately, even if it is not yet time for one of the regular update 758 message. (The timing details will differ from protocol to protocol. 759 Some distance vector protocols, including RIP, specify a small time 760 delay, in order to avoid having triggered updates generate excessive 761 network traffic.) Note how this combines with the rules for 762 computing new metrics. Suppose a router's route to destination N 763 goes through router G. If an update arrives from G itself, the 764 receiving router is required to believe the new information, whether 765 the new metric is higher or lower than the old one. If the result is 766 a change in metric, then the receiving router will send triggered 767 updates to all the hosts and routers directly connected to it. They 768 in turn may each send updates to their neighbors. The result is a 769 cascade of triggered updates. It is easy to show which routers and 770 hosts are involved in the cascade. Suppose a router G times out a 771 route to destination N. G will send triggered updates to all of its 772 neighbors. However, the only neighbors who will believe the new 773 information are those whose routes for N go through G. The other 774 routers and hosts will see this as information about a new route that 775 is worse than the one they are already using, and ignore it. The 776 neighbors whose routes go through G will update their metrics and 777 send triggered updates to all of their neighbors. Again, only those 778 neighbors whose routes go through them will pay attention. Thus, the 779 triggered updates will propagate backwards along all paths leading to 780 router G, updating the metrics to infinity. This propagation will 781 stop as soon as it reaches a portion of the network whose route to 782 destination N takes some other path. 784 If the system could be made to sit still while the cascade of 785 triggered updates happens, it would be possible to prove that 786 counting to infinity will never happen. Bad routes would always be 787 removed immediately, and so no routing loops could form. 789 Unfortunately, things are not so nice. While the triggered updates 790 are being sent, regular updates may be happening at the same time. 791 Routers that haven't received the triggered update yet will still be 792 sending out information based on the route that no longer exists. It 793 is possible that after the triggered update has gone through a 794 router, it might receive a normal update from one of these routers 795 that hasn't yet gotten the word. This could reestablish an orphaned 796 remnant of the faulty route. If triggered updates happen quickly 797 enough, this is very unlikely. However, counting to infinity is 798 still possible. 800 3.5 Protocol Specification 802 RIP is intended to allow routers to exchange information for 803 computing routes through an IPv4-based network. Any router that uses 804 RIP is assumed to have interfaces to one or more networks, otherwise 805 it isn't really a router. These are referred to as its directly- 806 connected networks. The protocol relies on access to certain 807 information about each of these networks, the most important of which 808 is its metric. The RIP metric of a network is an integer between 1 809 and 15, inclusive. It is set in some manner not specified in this 810 protocol; however, given the maximum path limit of 15, a value of 1 811 is usually used. Implementations should allow the system 812 administrator to set the metric of each network. In addition to the 813 metric, each network will have an IPv4 destination address and subnet 814 mask associated with it. These are to be set by the system 815 administrator in a manner not specified in this protocol. 817 Any host that uses RIP is assumed to have interfaces to one or more 818 networks. These are referred to as its "directly-connected 819 networks". The protocol relies on access to certain information 820 about each of these networks. The most important is its metric or 821 "cost". The metric of a network is an integer between 1 and 15 822 inclusive. It is set in some manner not specified in this protocol. 823 Most existing implementations always use a metric of 1. New 824 implementations should allow the system administrator to set the cost 825 of each network. In addition to the cost, each network will have an 826 IPv4 network number and a subnet mask associated with it. These are 827 to be set by the system administrator in a manner not specified in 828 this protocol. 830 Note that the rules specified in section 3.7 assume that there is a 831 single subnet mask applying to each IPv4 network, and that only the 832 subnet masks for directly-connected networks are known. There may be 833 systems that use different subnet masks for different subnets within 834 a single network. There may also be instances where it is desirable 835 for a system to know the subnets masks of distant networks. However, 836 such situations will require modifications of the rules which govern 837 the spread of subnet information. Such modifications raise issues of 838 interoperability, and thus must be viewed as modifying the protocol. 840 Each router that implements RIP is assumed to have a routing table. 841 This table has one entry for every destination that is reachable 842 throughout the system operating RIP. Each entry contains at least 843 the following information: 845 - The IPv4 address of the destination. 847 - A metric, which represents the total cost of getting a datagram 848 from the router to that destination. This metric is the sum of the 849 costs associated with the networks that would be traversed to get 850 to the destination. 852 - The IPv4 address of the next router along the path to the 853 destination (i.e., the next hop). If the destination is on one of 854 the directly-connected networks, this item is not needed. 856 - A flag to indicate that information about the route has changed 857 recently. This will be referred to as the "route change flag." 859 - Various timers associated with the route. See section 3.6 for more 860 details on timers. 862 The entries for the directly-connected networks are set up by the 863 router using information gathered by means not specified in this 864 protocol. The metric for a directly-connected network is set to the 865 cost of that network. As mentioned, 1 is the usual cost. In that 866 case, the RIP metric reduces to a simple hop-count. More complex 867 metrics may be used when it is desirable to show preference for some 868 networks over others (e.g., to indicate of differences in bandwidth 869 or reliability). 871 Implementors may also choose to allow the system administrator to 872 enter additional routes. These would most likely be routes to hosts 873 or networks outside the scope of the routing system. They are 874 referred to as "static routes." Entries for destinations other than 875 these initial ones are added and updated by the algorithms described 876 in the following sections. 878 In order for the protocol to provide complete information on routing, 879 every router in the AS must participate in the protocol. In cases 880 where multiple IGPs are in use, there must be at least one router 881 which can leak routing information between the protocols. 883 3.6 Message Format 885 RIP is a UDP-based protocol. Each router that uses RIP has a routing 886 process that sends and receives datagrams on UDP port number 520, the 887 RIP-1/RIP-2 port. All communications intended for another routers's 888 RIP process are sent to the RIP port. All routing update messages 889 are sent from the RIP port. Unsolicited routing update messages have 890 both the source and destination port equal to the RIP port. Update 891 messages sent in response to a request are sent to the port from 892 which the request came. Specific queries may be sent from ports 893 other than the RIP port, but they must be directed to the RIP port on 894 the target machine. 896 The RIP packet format is: 898 0 1 2 3 899 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 900 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 901 | command (1) | version (1) | must be zero (2) | 902 +---------------+---------------+-------------------------------+ 903 | | 904 ~ RIP Entry (20) ~ 905 | | 906 +---------------+---------------+---------------+---------------+ 908 There may be between 1 and 25 (inclusive) RIP entries. A RIP-1 entry 909 has the following format: 911 0 1 2 3 912 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 913 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 914 | address family identifier (2) | must be zero (2) | 915 +-------------------------------+-------------------------------+ 916 | IPv4 address (4) | 917 +---------------------------------------------------------------+ 918 | must be zero (4) | 919 +---------------------------------------------------------------+ 920 | must be zero (4) | 921 +---------------------------------------------------------------+ 922 | metric (4) | 923 +---------------------------------------------------------------+ 925 Field sizes are given in octets. Unless otherwise specified, fields 926 contain binary integers, in network byte order, with the most- 927 significant octet first (big-endian). Each tick mark represents one 928 bit. 930 Every message contains a RIP header which consists of a command and a 931 version number. This section of the document describes version 1 of 932 the protocol; section 4 describes the version 2 extensions. The 933 command field is used to specify the purpose of this message. The 934 commands implemented in version 1 and 2 are: 936 1 - request A request for the responding system to send all or 937 part of its routing table. 939 2 - response A message containing all or part of the sender's 940 routing table. This message may be sent in response 941 to a request, or it may be an unsolicited routing 942 update generated by the sender. 944 For each of these message types, in version 1, the remainder of the 945 datagram contains a list of Route Entries (RTEs). Each RTE in this 946 list contains an Address Family Identifier (AFI), destination IPv4 947 address, and the cost to reach that destination (metric). 949 The AFI is the type of address. For RIP-1, only AF_INET (2) is 950 generally supported. 952 The metric field contains a value between 1 and 15 (inclusive) which 953 specifies the current metric for the destination; or the value 16 954 (infinity), which indicates that the destination is not reachable. 956 3.7 Addressing Considerations 958 Distance vector routing can be used to describe routes to individual 959 hosts or to networks. The RIP protocol allows either of these 960 possibilities. The destinations appearing in request and response 961 messages can be networks, hosts, or a special code used to indicate a 962 default address. In general, the kinds of routes actually used will 963 depend upon the routing strategy used for the particular network. 964 Many networks are set up so that routing information for individual 965 hosts is not needed. If every node on a given network or subnet is 966 accessible through the same routers, then there is no reason to 967 mention individual hosts in the routing tables. However, networks 968 that include point-to-point lines sometimes require routers to keep 969 track of routes to certain nodes. Whether this feature is required 970 depends upon the addressing and routing approach used in the system. 971 Thus, some implementations may choose not to support host routes. If 972 host routes are not supported, they are to be dropped when they are 973 received in response messages (see section 3.7.2). 975 The RIP-1 packet format does not distinguish among various types of 976 address. Fields that are labeled "address" can contain any of the 977 following: 979 host address subnet number network number zero (default route) 981 Entities which use RIP-1 are assumed to use the most specific 982 information available when routing a datagram. That is, when routing 983 a datagram, its destination address must first be checked against the 984 list of node addresses. Then it must be checked to see whether it 985 matches any known subnet or network number. Finally, if none of 986 these match, the default route is used. 988 When a node evaluates information that it receives via RIP-1, its 989 interpretation of an address depends upon whether it knows the subnet 990 mask that applies to the net. If so, then it is possible to 991 determine the meaning of the address. For example, consider net 992 128.6. It has a subnet mask of 255.255.255.0. Thus 128.6.0.0 is a 993 network number, 128.6.4.0 is a subnet number, and 128.6.4.1 is a node 994 address. However, if the node does not know the subnet mask, 995 evaluation of an address may be ambiguous. If there is a non-zero 996 node part, there is no clear way to determine whether the address 997 represents a subnet number or a node address. As a subnet number 998 would be useless without the subnet mask, addresses are assumed to 999 represent nodes in this situation. In order to avoid this sort of 1000 ambiguity, when using version 1, nodes must not send subnet routes to 1001 nodes that cannot be expected to know the appropriate subnet mask. 1002 Normally hosts only know the subnet masks for directly-connected 1003 networks. Therefore, unless special provisions have been made, 1004 routes to a subnet must not be sent outside the network of which the 1005 subnet is a part. RIP-2 (see section 4) eliminates the subnet/host 1006 ambiguity by including the subnet mask in the routing entry. 1008 This filtering is carried out by the routers at the "border" of the 1009 subnetted network. These are routers which connect that network with 1010 some other network. Within the subnetted network, each subnet is 1011 treated as an individual network. Routing entries for each subnet 1012 are circulated by RIP. However, border routers send only a single 1013 entry for the network as a whole to nodes in other networks. This 1014 means that a border router will send different information to 1015 different neighbors. For neighbors connected to the subnetted 1016 network, it generates a list of all subnets to which it is directly 1017 connected, using the subnet number. For neighbors connected to other 1018 networks, it makes a single entry for the network as a whole, showing 1019 the metric associated with that network. This metric would normally 1020 be the smallest metric for the subnets to which the router is 1021 attached. 1023 Similarly, border routers must not mention host routes for nodes 1024 within one of the directly-connected networks in messages to other 1025 networks. Those routes will be subsumed by the single entry for the 1026 network as a whole. 1028 The special address 0.0.0.0 is used to describe a default route. A 1029 default route is used when it is not convenient to list every 1030 possible network in the RIP updates, and when one or more closely- 1031 connected routers in the system are prepared to handle traffic to the 1032 networks that are not listed explicitly. These routers should create 1033 RIP entries for the address 0.0.0.0, just as if it were a network to 1034 which they are connected. The decision as to how routers create 1035 entries for 0.0.0.0 is left to the implementor. Most commonly, the 1036 system administrator will be provided with a way to specify which 1037 routers should create entries for 0.0.0.0; however, other mechanisms 1038 are possible. For example, an implementor might decide that any 1039 router which speaks BGP should be declared to be a default router. 1040 It may be useful to allow the network administrator to choose the 1041 metric to be used in these entries. If there is more than one 1042 default router, this will make it possible to express a preference 1043 for one over the other. The entries for 0.0.0.0 are handled by RIP 1044 in exactly the same manner as if there were an actual network with 1045 this address. System administrators should take care to make sure 1046 that routes to 0.0.0.0 do not propagate further than is intended. 1047 Generally, each autonomous system has its own preferred default 1048 router. Thus, routes involving 0.0.0.0 should generally not leave 1049 the boundary of an autonomous system. The mechanisms for enforcing 1050 this are not specified in this document. 1052 3.8 Timers 1054 This section describes all events that are triggered by timers. 1056 Every 30 seconds, the RIP process is awakened to send an unsolicited 1057 Response message containing the complete routing table (see section 1058 3.9 on Split Horizon) to every neighboring router. When there are 1059 many routers on a single network, there is a tendency for them to 1060 synchronize with each other such that they all issue updates at the 1061 same time. This can happen whenever the 30 second timer is affected 1062 by the processing load on the system. It is undesirable for the 1063 update messages to become synchronized, since it can lead to 1064 unnecessary collisions on broadcast networks. Therefore, 1065 implementations are required to take one of two precautions: 1067 - The 30-second updates are triggered by a clock whose rate is not 1068 affected by system load or the time required to service the 1069 previous update timer. 1071 - The 30-second timer is offset by a small random time (+/- 0 to 5 1072 seconds) each time it is set. (Implementors may wish to consider 1073 even larger variation in the light of recent research results [10]) 1075 There are two timers associated with each route, a "timeout" and a 1076 "garbage-collection" time. Upon expiration of the timeout, the route 1077 is no longer valid; however, it is retained in the routing table for 1078 a short time so that neighbors can be notified that the route has 1079 been dropped. Upon expiration of the garbage-collection timer, the 1080 route is finally removed from the routing table. 1082 The timeout is initialized when a route is established, and any time 1083 an update message is received for the route. If 180 seconds elapse 1084 from the last time the timeout was initialized, the route is 1085 considered to have expired, and the deletion process described below 1086 begins for that route. 1088 Deletions can occur for one of two reasons: the timeout expires, or 1089 the metric is set to 16 because of an update received from the 1090 current router (see section 3.7.2 for a discussion of processing 1091 updates from other routers). In either case, the following events 1092 happen: 1094 - The garbage-collection timer is set for 120 seconds. 1096 - The metric for the route is set to 16 (infinity). This causes the 1097 route to be removed from service. 1099 - The route change flag is set to indicate that this entry has been 1100 changed. 1102 - The output process is signalled to trigger a response. 1104 Until the garbage-collection timer expires, the route is included in 1105 all updates sent by this router. When the garbage-collection timer 1106 expires, the route is deleted from the routing table. 1108 Should a new route to this network be established while the garbage- 1109 collection timer is running, the new route will replace the one that 1110 is about to be deleted. In this case the garbage-collection timer 1111 must be cleared. 1113 Triggered updates also use a small timer; however, this is best 1114 described in section 3.9.1. 1116 3.9 Input Processing 1118 This section will describe the handling of datagrams received on the 1119 RIP port. Processing will depend upon the value in the command 1120 field. 1122 See sections 4.6 and 5.1 for details on handling version numbers. 1124 3.9.1 Request Messages 1126 A Request is used to ask for a response containing all or part of a 1127 routers's routing table. Normally, Requests are sent as broadcasts 1128 (multicasts for RIP-2), from the RIP port, by routers which have just 1129 come up and are seeking to fill in their routing tables as quickly as 1130 possible. However, there may be situations (e.g., router monitoring) 1131 where the routing table of only a single router is needed. In this 1132 case, the Request should be sent directly to that router from a UDP 1133 port other than the RIP port. If such a Request is received, the 1134 router responds directly to the requestor's address and port. 1136 The Request is processed entry by entry. If there are no entries, no 1137 response is given. There is one special case. If there is exactly 1138 one entry in the request, and it has an address family identifier of 1139 zero and a metric of infinity (i.e., 16), then this is a request to 1140 send the entire routing table. In that case, a call is made to the 1141 output process to send the routing table to the requesting 1142 address/port. Except for this special case, processing is quite 1143 simple. Examine the list of RTEs in the Request one by one. For 1144 each entry, look up the destination in the router's routing database 1145 and, if there is a route, put that route's metric in the metric field 1146 of the RTE. If there is no explicit route to the specified 1147 destination, put infinity in the metric field. Once all the entries 1148 have been filled in, change the command from Request to Response and 1149 send the datagram back to the requestor. 1151 Note that there is a difference in metric handling for specific and 1152 whole-table requests. If the request is for a complete routing 1153 table, normal output processing is done, including Split Horizon (see 1154 section 3.9 on Split Horizon). If the request is for specific 1155 entries, they are looked up in the routing table and the information 1156 is returned as is; no Split Horizon processing is done. The reason 1157 for this distinction is the expectation that these requests are 1158 likely to be used for different purposes. When a router first comes 1159 up, it multicasts a Request on every connected network asking for a 1160 complete routing table. It is assumed that these complete routing 1161 tables are to be used to update the requestor's routing table. For 1162 this reason, Split Horizon must be done. It is further assumed that 1163 a Request for specific networks is made only by diagnostic software, 1164 and is not used for routing. In this case, the requester would want 1165 to know the exact contents of the routing table and would not want 1166 any information hidden or modified. 1168 3.9.2 Response Messages 1170 A Response can be received for one of several different reasons: 1172 - response to a specific query 1173 - regular update (unsolicited response) 1174 - triggered update caused by a route change 1176 Processing is the same no matter why the Response was generated. 1178 Because processing of a Response may update the router's routing 1179 table, the Response must be checked carefully for validity. The 1180 Response must be ignored if it is not from the RIP port. The 1181 datagram's IPv4 source address should be checked to see whether the 1182 datagram is from a valid neighbor; the source of the datagram must be 1183 on a directly-connected network. It is also worth checking to see 1184 whether the response is from one of the router's own addresses. 1185 Interfaces on broadcast networks may receive copies of their own 1186 broadcasts/multicasts immediately. If a router processes its own 1187 output as new input, confusion is likely so such datagrams must be 1188 ignored. 1190 Once the datagram as a whole has been validated, process the RTEs in 1191 the Response one by one. Again, start by doing validation. 1192 Incorrect metrics and other format errors usually indicate 1193 misbehaving neighbors and should probably be brought to the 1194 administrator's attention. For example, if the metric is greater 1195 than infinity, ignore the entry but log the event. The basic 1196 validation tests are: 1198 - is the destination address valid (e.g., unicast; not net 0 or 127) 1199 - is the metric valid (i.e., between 1 and 16, inclusive) 1201 If any check fails, ignore that entry and proceed to the next. 1202 Again, logging the error is probably a good idea. 1204 Once the entry has been validated, update the metric by adding the 1205 cost of the network on which the message arrived. If the result is 1206 greater than infinity, use infinity. That is, 1208 metric = MIN (metric + cost, infinity) 1210 Now, check to see whether there is already an explicit route for the 1211 destination address. If there is no such route, add this route to 1212 the routing table, unless the metric is infinity (there is no point 1213 in adding a route which is unusable). Adding a route to the routing 1214 table consists of: 1216 - Setting the destination address to the destination address in the 1217 RTE 1219 - Setting the metric to the newly calculated metric (as described 1220 above) 1222 - Set the next hop address to be the address of the router from which 1223 the datagram came 1225 - Initialize the timeout for the route. If the garbage-collection 1226 timer is running for this route, stop it (see section 3.6 for a 1227 discussion of the timers) 1229 - Set the route change flag 1231 - Signal the output process to trigger an update (see section 3.8.1) 1233 If there is an existing route, compare the next hop address to the 1234 address of the router from which the datagram came. If this datagram 1235 is from the same router as the existing route, reinitialize the 1236 timeout. Next, compare the metrics. If the datagram is from the 1237 same router as the existing route, and the new metric is different 1238 than the old one; or, if the new metric is lower than the old one; do 1239 the following actions: 1241 - Adopt the route from the datagram (i.e., put the new metric in and 1242 adjust the next hop address, if necessary). 1244 - Set the route change flag and signal the output process to trigger 1245 an update 1247 - If the new metric is infinity, start the deletion process 1248 (described above); otherwise, re-initialize the timeout 1250 If the new metric is infinity, the deletion process begins for the 1251 route, which is no longer used for routing packets. Note that the 1252 deletion process is started only when the metric is first set to 1253 infinity. If the metric was already infinity, then a new deletion 1254 process is not started. 1256 If the new metric is the same as the old one, it is simplest to do 1257 nothing further (beyond re-initializing the timeout, as specified 1258 above); but, there is a heuristic which could be applied. Normally, 1259 it is senseless to replace a route if the new route has the same 1260 metric as the existing route; this would cause the route to bounce 1261 back and forth, which would generate an intolerable number of 1262 triggered updates. However, if the existing route is showing signs 1263 of timing out, it may be better to switch to an equally-good 1264 alternative route immediately, rather than waiting for the timeout to 1265 happen. Therefore, if the new metric is the same as the old one, 1266 examine the timeout for the existing route. If it is at least 1267 halfway to the expiration point, switch to the new route. This 1268 heuristic is optional, but highly recommended. 1270 Any entry that fails these tests is ignored, as it is no better than 1271 the current route. 1273 3.10 Output Processing 1275 This section describes the processing used to create response 1276 messages that contain all or part of the routing table. This 1277 processing may be triggered in any of the following ways: 1279 - By input processing, when a Request is received (this Response is 1280 unicast to the requestor; see section 3.7.1) 1282 - By the regular routing update (broadcast/multicast every 30 1283 seconds) router. 1285 - By triggered updates (broadcast/multicast when a route changes) 1287 When a Response is to be sent to all neighbors (i.e., a regular or 1288 triggered update), a Response message is directed to the router at 1289 the far end of each connected point-to-point link, and is broadcast 1290 (multicast for RIP-2) on all connected networks which support 1291 broadcasting. Thus, one Response is prepared for each directly- 1292 connected network, and sent to the appropriate address (direct or 1293 broadcast/multicast). In most cases, this reaches all neighboring 1294 routers. However, there are some cases where this may not be good 1295 enough. This may involve a network that is not a broadcast network 1296 (e.g., the ARPANET), or a situation involving dumb routers. In such 1297 cases, it may be necessary to specify an actual list of neighboring 1298 routers and send a datagram to each one explicitly. It is left to 1299 the implementor to determine whether such a mechanism is needed, and 1300 to define how the list is specified. 1302 3.10.1 Triggered Updates 1304 Triggered updates require special handling for two reasons. First, 1305 experience shows that triggered updates can cause excessive load on 1306 networks with limited capacity or networks with many routers on them. 1307 Therefore, the protocol requires that implementors include provisions 1308 to limit the frequency of triggered updates. After a triggered 1309 update is sent, a timer should be set for a random interval between 1 1310 and 5 seconds. If other changes that would trigger updates occur 1311 before the timer expires, a single update is triggered when the timer 1312 expires. The timer is then reset to another random value between 1 1313 and 5 seconds. A triggered update should be suppressed if a regular 1314 update is due by the time the triggered update would be sent. 1316 Second, triggered updates do not need to include the entire routing 1317 table. In principle, only those routes which have changed need to be 1318 included. Therefore, messages generated as part of a triggered 1319 update must include at least those routes that have their route 1320 change flag set. They may include additional routes, at the 1321 discretion of the implementor; however, sending complete routing 1322 updates is strongly discouraged. When a triggered update is 1323 processed, messages should be generated for every directly-connected 1324 network. Split Horizon processing is done when generating triggered 1325 updates as well as normal updates (see section 3.9). If, after Split 1326 Horizon processing for a given network, a changed route will appear 1327 unchanged on that network (e.g., it appears with an infinite metric), 1328 the route need not be sent. If no routes need be sent on that 1329 network, the update may be omitted. Once all of the triggered 1330 updates have been generated, the route change flags should be 1331 cleared. 1333 If input processing is allowed while output is being generated, 1334 appropriate interlocking must be done. The route change flags should 1335 not be changed as a result of processing input while a triggered 1336 update message is being generated. 1338 The only difference between a triggered update and other update 1339 messages is the possible omission of routes that have not changed. 1340 The remaining mechanisms, described in the next section, must be 1341 applied to all updates. 1343 3.10.2 Generating Response Messages 1345 This section describes how a Response message is generated for a 1346 particular directly-connected network: 1348 Set the version number to either 1 or 2. The mechanism for deciding 1349 which version to send is implementation specific; however, if this is 1350 the Response to a Request, the Response version should match the 1351 Request version. Set the command to Response. Set the bytes labeled 1352 "must be zero" to zero. Start filling in RTEs. Recall that there is 1353 a limit of 25 RTEs to a Response; if there are more, send the current 1354 Response and start a new one. There is no defined limit to the 1355 number of datagrams which make up a Response. 1357 To fill in the RTEs, examine each route in the routing table. If a 1358 triggered update is being generated, only entries whose route change 1359 flags are set need be included. If, after Split Horizon processing, 1360 the route should not be included, skip it. If the route is to be 1361 included, then the destination address and metric are put into the 1362 RTE. Routes must be included in the datagram even if their metrics 1363 are infinite. 1365 4. Protocol Extensions 1367 This section does not change the RIP protocol per se. Rather, it 1368 provides extensions to the message format which allows routers to 1369 share important additional information. 1371 The same header format is used for RIP-1 and RIP-2 messages (see 1372 section 3.4). The format for the 20-octet route entry (RTE) for 1373 RIP-2 is: 1375 0 1 2 3 3 1376 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1378 | Address Family Identifier (2) | Route Tag (2) | 1379 +-------------------------------+-------------------------------+ 1380 | IP Address (4) | 1381 +---------------------------------------------------------------+ 1382 | Subnet Mask (4) | 1383 +---------------------------------------------------------------+ 1384 | Next Hop (4) | 1385 +---------------------------------------------------------------+ 1386 | Metric (4) | 1387 +---------------------------------------------------------------+ 1389 The Address Family Identifier, IP Address, and Metric all have the 1390 meanings defined in section 3.4. The Version field will specify 1391 version number 2 for RIP messages which use authentication or carry 1392 information in any of the newly defined fields. 1394 4.1 Authentication 1396 Since authentication is a per message function, and since there is 1397 only one 2-octet field available in the message header, and since any 1398 reasonable authentication scheme will require more than two octets, 1399 the authentication scheme for RIP version 2 will use the space of an 1400 entire RIP entry. If the Address Family Identifier of the first (and 1401 only the first) entry in the message is 0xFFFF, then the remainder of 1402 the entry contains the authentication. This means that there can be, 1403 at most, 24 RIP entries in the remainder of the message. If 1404 authentication is not in use, then no entries in the message should 1405 have an Address Family Identifier of 0xFFFF. A RIP message which 1406 contains an authentication entry would begin with the following 1407 format: 1409 0 1 2 3 3 1410 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1411 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1412 | Command (1) | Version (1) | unused | 1413 +---------------+---------------+-------------------------------+ 1414 | 0xFFFF | Authentication Type (2) | 1415 +-------------------------------+-------------------------------+ 1416 ~ Authentication (16) ~ 1417 +---------------------------------------------------------------+ 1419 Currently, the only Authentication Type is simple password and it 1420 is type 2. The remaining 16 octets contain the plain text password. If 1421 the password is under 16 octets, it must be left-justified and 1422 padded to the right with nulls (0x00). 1424 4.2 Route Tag 1426 The Route Tag (RT) field is an attribute assigned to a route which 1427 must be preserved and readvertised with a route. The intended use 1428 of the Route Tag is to provide a method of separating "internal" 1429 RIP routes (routes for networks within the RIP routing domain) 1430 from "external" RIP routes, which may have been imported from an 1431 EGP or another IGP. 1433 Routers supporting protocols other than RIP should be configurable 1434 to allow the Route Tag to be configured for routes imported from 1435 different sources. For example, routes imported from EGP or BGP 1436 should be able to have their Route Tag either set to an arbitrary 1437 value, or at least to the number of the Autonomous System from 1438 which the routes were learned. 1440 Other uses of the Route Tag are valid, as long as all routers in 1441 the RIP domain use it consistently. This allows for the 1442 possibility of a BGP-RIP protocol interactions document, which 1443 would describe methods for synchronizing routing in a transit 1444 network. 1446 4.3 Subnet mask 1448 The Subnet Mask field contains the subnet mask which is applied to 1449 the IP address to yield the non-host portion of the address. If this 1450 field is zero, then no subnet mask has been included for this entry. 1452 On an interface where a RIP-1 router may hear and operate on the 1453 information in a RIP-2 routing entry the following rules apply: 1455 1) information internal to one network must never be advertised into 1456 another network, 1458 2) information about a more specific subnet may not be advertised 1459 where RIP-1 routers would consider it a host route, and 1461 3) supernet routes (routes with a netmask less specific than 1462 the "natural" network mask) must not be advertised where they 1463 could be misinterpreted by RIP-1 routers. 1465 4.4 Next Hop 1467 The immediate next hop IP address to which packets to the destination 1468 specified by this route entry should be forwarded. Specifying a 1469 value of 0.0.0.0 in this field indicates that routing should be via 1470 the originator of the RIP advertisement. An address specified as 1471 a next hop must, per force, be directly reachable on the logical 1472 subnet over which the advertisement is made. 1474 The purpose of the Next Hop field is to eliminate packets being routed 1475 through extra hops in the system. It is particularly useful when RIP 1476 is not being run on all of the routers on a network. A simple example 1477 is given in Appendix A. Note that Next Hop is an "advisory" field. That 1478 is, if the provided information is ignored, a possibly sub-optimal, 1479 but absolutely valid, route may be taken. If the received Next Hop 1480 is not directly reachable, it should be treated as 0.0.0.0. 1482 4.5 Multicasting 1484 In order to reduce unnecessary load on those hosts which are not 1485 listening to RIP-2 messages, an IP multicast address will be used for 1486 periodic broadcasts. The IP multicast address is 224.0.0.9. Note that 1487 IGMP is not needed since these are inter-router messages which are not 1488 forwarded. 1490 On NBMA networks, unicast addressing may be used. However, if a 1491 response addressed to the RIP-2 multicast address is received, it 1492 should be accepted. 1494 In order to maintain backwards compatibility, the use of the 1495 multicast address will be configurable, as described in section 5.1. If 1496 multicasting is used, it should be used on all interfaces which support 1497 it. 1499 4.6 Queries 1501 If a RIP-2 router receives a RIP-1 Request, it should respond with a 1502 RIP-1 Response. If the router is configured to send only RIP-2 1503 messages, it should not respond to a RIP-1 Request. 1505 5. Compatibility 1507 RFC 1058 showed considerable forethought in its specification of 1508 the handling of version numbers. It specifies that RIP messages of 1509 version 0 are to be discarded, that RIP messages of version 1 are 1510 to be discarded if any Must Be Zero (MBZ) field is non-zero, and that 1511 RIP messages of any version greater than 1 should not be discarded 1512 simply because an MBZ field contains a value other than zero. This 1513 means that the new version of RIP is totally backwards compatible 1514 with existing RIP implementations which adhere to this part of the 1515 specification. 1517 5.1 Compatibility Switch 1519 A compatibility switch is necessary for two reasons. First, there 1520 are implementations of RIP-1 in the field which do not follow RFC 1521 1058 as described above. Second, the use of multicasting would 1522 prevent RIP-1 systems from receiving RIP-2 updates (which may 1523 be a desired feature in some cases). This switch should be configurable 1524 on a per-interface basis. 1526 The switch has four settings: RIP-1, in which only RIP-1 messages are 1527 sent; RIP-1 compatibility, in which RIP-2 messages are broadcast; 1528 RIP-2, in which RIP-2 messages are multicast; and "none", which 1529 disables the sending of RIP messages. It is recommended that the 1530 default setting be either RIP-1 or RIP-2, but not RIP-1 compatibility. 1531 This is because of the potential problems which can occur on some 1532 topologies. RIP-1 compatibility should only be used when all of the 1533 consequences of its use are well understood by the network administrator. 1535 For completeness, routers should also implement a receive control 1536 switch which would determine whether to accept, RIP-1 only, RIP-2 1537 only, both, or none. It should also be configurable on a 1538 per-interface basis. It is recommended that the default be compatible 1539 with the default chosen for sending updates. 1541 5.2 Authentication 1543 The following algorithm should be used to authenticate a RIP message. If 1544 the router is not configured to authenticate RIP-2 messages, then RIP-1 1545 and unauthenticated RIP-2 messages will be accepted; authenticated 1546 RIP-2 messages shall be discarded. If the router is configured to 1547 authenticate RIP-2 messages, then RIP-1 messages and RIP-2 messages 1548 which pass authentication testing shall be accepted; unauthenticated 1549 and failed authentication RIP-2 messages shall be discarded. For 1550 maximum security, RIP-1 messages should be ignored when authentication 1551 is in use (see section 4.1); otherwise, the routing information from 1552 authenticated messages will be propagated by RIP-1 routers in an 1553 unauthenticated manner. 1555 Since an authentication entry is marked with an Address Family 1556 Identifier of 0xFFFF, a RIP-1 system would ignore this entry since 1557 it would belong to an address family other than IP. It should 1558 be noted, therefore, that use of authentication will not prevent 1559 RIP-1 systems from seeing RIP-2 messages. If desired, this may 1560 be done using multicasting, as described in sections 4.5 and 5.1. 1562 5.3 Larger Infinity 1564 While on the subject of compatibility, there is one item which people 1565 have requested: increasing infinity. The primary reason that this 1566 cannot be done is that it would violate backwards compatibility. A 1567 larger infinity would obviously confuse older versions of rip. At 1568 best, they would ignore the route as they would ignore a metric of 1569 16. There was also a proposal to make the Metric a single octet and reuse 1570 the high three octets, but this would break any implementations which 1571 treat the metric as a 4-octet entity. 1573 5.4 Addressless Links 1575 As in RIP-1, addressless links will not be supported by RIP-2. 1577 6. Security Considerations 1579 The basic RIP protocol is not a secure protocol. To bring RIP-2 1580 in line with more modern routing protocols, an extensible authentication 1581 mechanism has been incorporated into the protocol enhancements. This 1582 mechanism is described in sections 4.1 and 5.2. Security is further 1583 enhanced by the mechanism described in [3]. 1585 Appendix A 1587 This is a simple example of the use of the next hop field in a rip entry. 1589 ----- ----- ----- ----- ----- ----- 1590 |IR1| |IR2| |IR3| |XR1| |XR2| |XR3| 1591 --+-- --+-- --+-- --+-- --+-- --+-- 1592 | | | | | | 1593 --+-------+-------+---------------+-------+-------+-- 1594 <-------------RIP-2-------------> 1596 Assume that IR1, IR2, and IR3 are all "internal" routers which are 1597 under one administration (e.g. a campus) which has elected to use 1598 RIP-2 as its IGP. XR1, XR2, and XR3, on the other hand, are under 1599 separate administration (e.g. a regional network, of which the campus 1600 is a member) and are using some other routing protocol (e.g. OSPF). 1601 XR1, XR2, and XR3 exchange routing information among themselves such 1602 that they know that the best routes to networks N1 and N2 are via 1603 XR1, to N3, N4, and N5 are via XR2, and to N6 and N7 are via XR3. By 1604 setting the Next Hop field correctly (to XR2 for N3/N4/N5, to XR3 for 1605 N6/N7), only XR1 need exchange RIP-2 routes with IR1/IR2/IR3 for 1606 routing to occur without additional hops through XR1. Without the 1607 Next Hop (for example, if RIP-1 were used) it would be necessary for 1608 XR2 and XR3 to also participate in the RIP-2 protocol to eliminate 1609 extra hops. 1611 References 1613 [1] Hedrick, C., Routing Information Protocol, Request For Comments 1614 (RFC) 1058, Rutgers University, June 1988. 1616 [2] Malkin, G., and F. Baker, RIP Version 2 MIB Extension, Request 1617 For Comments (RFC) 1389, Xylogics, Inc., Advanced Computer 1618 Communications, January 1993. 1620 [3] Baker, F., Atkinson, R., "RIP-II MD5 Authentication", draft- 1621 ietf-ripv2-md5-auth-00.txt, March 1997. 1623 [4] Bellman, R. E., "Dynamic Programming", Princeton University 1624 Press, Princeton, N.J., 1957. 1626 [5] Bertsekas, D. P., and Gallaher, R. G., "Data Networks", 1627 Prentice-Hall, Englewood Cliffs, N.J., 1987. 1629 [6] Braden, R., and Postel, J., "Requirements for Internet Gateways", 1630 USC/Information Sciences Institute, RFC-1009, June 1987. 1632 [7] Boggs, D. R., Shoch, J. F., Taft, E. A., and Metcalfe, R. M., 1633 "Pup: An Internetwork Architecture", IEEE Transactions on 1634 Communications, April 1980. 1636 [8] Ford, L. R. Jr., and Fulkerson, D. R., "Flows in Networks", 1637 Princeton University Press, Princeton, N.J., 1962. 1639 [9] Xerox Corp., "Internet Transport Protocols", Xerox System 1640 Integration Standard XSIS 028112, December 1981. 1642 Author's Address 1644 Gary Scott Malkin 1645 Bay Networks 1646 8 Federal Street 1647 Billerica, MA 01821 1649 Phone: (978) 916-4237 1650 EMail: gmalkin@baynetworks.com