idnits 2.17.1 draft-ietf-ripv2-protocol-v2-04.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-25) 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 (June 1998) is 9446 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) ** 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' -- Possible downref: Non-RFC (?) normative reference: ref. '10' Summary: 14 errors (**), 0 flaws (~~), 3 warnings (==), 9 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 June 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[11], 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 235 The main body of this document is organized into two parts, which 236 occupy the next two sections: 238 A conceptual development and justification of distance vector 239 algorithms in general. 241 The actual protocol description. 243 Each of these two sections can largely stand on its own. Section 3.4 244 attempts to give an informal presentation of the mathematical 245 underpinnings of the algorithm. Note that the presentation follows a 246 "spiral" method. An initial, fairly simple algorithm is described. 247 Then refinements are added to it in successive sections. Section 3.5 248 is the actual protocol description. Except where specific references 249 are made to section 3.4, it should be possible to implement RIP 250 entirely from the specifications given in section 3.5. 252 3.4 Distance Vector Algorithms 254 Routing is the task of finding a path from a sender to a desired 255 destination. In the IP "Internet model" this reduces primarily to a 256 matter of finding a series of routers between the source and 257 destination networks. As long as a message or datagram remains on a 258 single network or subnet, any forwarding problems are the 259 responsibility of technology that is specific to the network. For 260 example, Ethernet and the ARPANET each define a way in which any 261 sender can talk to any specified destination within that one network. 262 IP routing comes in primarily when messages must go from a sender on 263 one network to a destination on a different one. In that case, the 264 message must pass through one or more routers connecting the 265 networks. If the networks are not adjacent, the message may pass 266 through several intervening networks, and the routers connecting 267 them. Once the message gets to a router that is on the same network 268 as the destination, that network's own technology is used to get to 269 the destination. 271 Throughout this section, the term "network" is used generically to 272 cover a single broadcast network (e.g., an Ethernet), a point to 273 point line, or the ARPANET. The critical point is that a network is 274 treated as a single entity by IP. Either no forwarding decision is 275 necessary (as with a point to point line), or that forwarding is done 276 in a manner that is transparent to IP, allowing IP to treat the 277 entire network as a single fully-connected system (as with an 278 Ethernet or the ARPANET). Note that the term "network" is used in a 279 somewhat different way in discussions of IP addressing. 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 carried in update messages. Each entity that participates in the 346 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 in each router listing the best route to every 355 destination in the system. Of course, in order to define which route 356 is best, we have to have some way of measuring goodness. This is 357 referred to as 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 that 605 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. In the following example the letters correspond to 608 routers, and the 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 The router requirements RFC[11] specifies that all implementation of 746 RIP must use split horizon and should also use split horizon with 747 poisoned reverse, although there may be a knob to disable poisoned 748 reverse. 750 3.4.4 Triggered updates 752 Split horizon with poisoned reverse will prevent any routing loops 753 that involve only two routers. However, it is still possible to end 754 up with patterns in which three routers are engaged in mutual 755 deception. For example, A may believe it has a route through B, B 756 through C, and C through A. Split horizon cannot stop such a loop. 757 This loop will only be resolved when the metric reaches infinity and 758 the network involved is then declared unreachable. Triggered updates 759 are an attempt to speed up this convergence. To get triggered 760 updates, we simply add a rule that whenever a router changes the 761 metric for a route, it is required to send update messages almost 762 immediately, even if it is not yet time for one of the regular update 763 message. (The timing details will differ from protocol to protocol. 764 Some distance vector protocols, including RIP, specify a small time 765 delay, in order to avoid having triggered updates generate excessive 766 network traffic.) Note how this combines with the rules for 767 computing new metrics. Suppose a router's route to destination N 768 goes through router G. If an update arrives from G itself, the 769 receiving router is required to believe the new information, whether 770 the new metric is higher or lower than the old one. If the result is 771 a change in metric, then the receiving router will send triggered 772 updates to all the hosts and routers directly connected to it. They 773 in turn may each send updates to their neighbors. The result is a 774 cascade of triggered updates. It is easy to show which routers and 775 hosts are involved in the cascade. Suppose a router G times out a 776 route to destination N. G will send triggered updates to all of its 777 neighbors. However, the only neighbors who will believe the new 778 information are those whose routes for N go through G. The other 779 routers and hosts will see this as information about a new route that 780 is worse than the one they are already using, and ignore it. The 781 neighbors whose routes go through G will update their metrics and 782 send triggered updates to all of their neighbors. Again, only those 783 neighbors whose routes go through them will pay attention. Thus, the 784 triggered updates will propagate backwards along all paths leading to 785 router G, updating the metrics to infinity. This propagation will 786 stop as soon as it reaches a portion of the network whose route to 787 destination N takes some other path. 789 If the system could be made to sit still while the cascade of 790 triggered updates happens, it would be possible to prove that 791 counting to infinity will never happen. Bad routes would always be 792 removed immediately, and so no routing loops could form. 794 Unfortunately, things are not so nice. While the triggered updates 795 are being sent, regular updates may be happening at the same time. 796 Routers that haven't received the triggered update yet will still be 797 sending out information based on the route that no longer exists. It 798 is possible that after the triggered update has gone through a 799 router, it might receive a normal update from one of these routers 800 that hasn't yet gotten the word. This could reestablish an orphaned 801 remnant of the faulty route. If triggered updates happen quickly 802 enough, this is very unlikely. However, counting to infinity is 803 still possible. 805 The router requirements RFC[11] specifies that all implementation of 806 RIP must implement triggered update for deleted routes and may 807 implement triggered updates for new routes or change of routes. RIP 808 implementations must also limit the rate which of triggered updates 809 may be trandmitted. (see section 3.10.1) 811 3.5 Protocol Specification 813 RIP is intended to allow routers to exchange information for 814 computing routes through an IPv4-based network. Any router that uses 815 RIP is assumed to have interfaces to one or more networks, otherwise 816 it isn't really a router. These are referred to as its directly- 817 connected networks. The protocol relies on access to certain 818 information about each of these networks, the most important of which 819 is its metric. The RIP metric of a network is an integer between 1 820 and 15, inclusive. It is set in some manner not specified in this 821 protocol; however, given the maximum path limit of 15, a value of 1 822 is usually used. Implementations should allow the system 823 administrator to set the metric of each network. In addition to the 824 metric, each network will have an IPv4 destination address and subnet 825 mask associated with it. These are to be set by the system 826 administrator in a manner not specified in this protocol. 828 Any host that uses RIP is assumed to have interfaces to one or more 829 networks. These are referred to as its "directly-connected 830 networks". The protocol relies on access to certain information 831 about each of these networks. The most important is its metric or 832 "cost". The metric of a network is an integer between 1 and 15 833 inclusive. It is set in some manner not specified in this protocol. 834 Most existing implementations always use a metric of 1. New 835 implementations should allow the system administrator to set the cost 836 of each network. In addition to the cost, each network will have an 837 IPv4 network number and a subnet mask associated with it. These are 838 to be set by the system administrator in a manner not specified in 839 this protocol. 841 Note that the rules specified in section 3.7 assume that there is a 842 single subnet mask applying to each IPv4 network, and that only the 843 subnet masks for directly-connected networks are known. There may be 844 systems that use different subnet masks for different subnets within 845 a single network. There may also be instances where it is desirable 846 for a system to know the subnets masks of distant networks. However, 847 such situations will require modifications of the rules which govern 848 the spread of subnet informa tion. Such modifications raise issues 849 of interoperability, and thus must be viewed as modifying the 850 protocol. 852 Each router that implements RIP is assumed to have a routing table. 853 This table has one entry for every destination that is reachable 854 throughout the system operating RIP. Each entry contains at least 855 the following information: 857 - The IPv4 address of the destination. 859 - A metric, which represents the total cost of getting a datagram 860 from the router to that destination. This metric is the sum of the 861 costs associated with the networks that would be traversed to get 862 to the destination. 864 - The IPv4 address of the next router along the path to the 865 destination (i.e., the next hop). If the destination is on one of 866 the directly-connected networks, this item is not needed. 868 - A flag to indicate that information about the route has changed 869 recently. This will be referred to as the "route change flag." 871 - Various timers associated with the route. See section 3.6 for more 872 details on timers. 874 The entries for the directly-connected networks are set up by the 875 router using information gathered by means not specified in this 876 protocol. The metric for a directly-connected network is set to the 877 cost of that network. As mentioned, 1 is the usual cost. In that 878 case, the RIP metric reduces to a simple hop-count. More complex 879 metrics may be used when it is desirable to show preference for some 880 networks over others (e.g., to indicate of differences in bandwidth 881 or reliability). 883 Implementors may also choose to allow the system administrator to 884 enter additional routes. These would most likely be routes to hosts 885 or networks outside the scope of the routing system. They are 886 referred to as "static routes." Entries for destinations other than 887 these initial ones are added and updated by the algorithms described 888 in the following sections. 890 In order for the protocol to provide complete information on routing, 891 every router in the AS must participate in the protocol. In cases 892 where multiple IGPs are in use, there must be at least one router 893 which can leak routing information between the protocols. 895 3.6 Message Format 897 RIP is a UDP-based protocol. Each router that uses RIP has a routing 898 process that sends and receives datagrams on UDP port number 520, the 899 RIP-1/RIP-2 port. All communications intended for another routers's 900 RIP process are sent to the RIP port. All routing update messages 901 are sent from the RIP port. Unsolicited routing update messages have 902 both the source and destination port equal to the RIP port. Update 903 messages sent in response to a request are sent to the port from 904 which the request came. Specific queries may be sent from ports 905 other than the RIP port, but they must be directed to the RIP port on 906 the target machine. 908 The RIP packet format is: 910 0 1 2 3 911 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 912 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 913 | command (1) | version (1) | must be zero (2) | 914 +---------------+---------------+-------------------------------+ 915 | | 916 ~ RIP Entry (20) ~ 917 | | 918 +---------------+---------------+---------------+---------------+ 920 There may be between 1 and 25 (inclusive) RIP entries. A RIP-1 entry 921 has the following format: 923 0 1 2 3 924 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 925 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 926 | address family identifier (2) | must be zero (2) | 927 +-------------------------------+-------------------------------+ 928 | IPv4 address (4) | 929 +---------------------------------------------------------------+ 930 | must be zero (4) | 931 +---------------------------------------------------------------+ 932 | must be zero (4) | 933 +---------------------------------------------------------------+ 934 | metric (4) | 935 +---------------------------------------------------------------+ 937 Field sizes are given in octets. Unless otherwise specified, fields 938 contain binary integers, in network byte order, with the most- 939 significant octet first (big-endian). Each tick mark represents one 940 bit. 942 Every message contains a RIP header which consists of a command and a 943 version number. This section of the document describes version 1 of 944 the protocol; section 4 describes the version 2 extensions. The 945 command field is used to specify the purpose of this message. The 946 commands implemented in version 1 and 2 are: 948 1 - request A request for the responding system to send all or 949 part of its routing table. 951 2 - response A message containing all or part of the sender's 952 routing table. This message may be sent in response 953 to a request, or it may be an unsolicited routing 954 update generated by the sender. 956 For each of these message types, in version 1, the remainder of the 957 datagram contains a list of Route Entries (RTEs). Each RTE in this 958 list contains an Address Family Identifier (AFI), destination IPv4 959 address, and the cost to reach that destination (metric). 961 The AFI is the type of address. For RIP-1, only AF_INET (2) is 962 generally supported. 964 The metric field contains a value between 1 and 15 (inclusive) which 965 specifies the current metric for the destination; or the value 16 966 (infinity), which indicates that the destination is not reachable. 968 3.7 Addressing Considerations 970 Distance vector routing can be used to describe routes to individual 971 hosts or to networks. The RIP protocol allows either of these 972 possibilities. The destinations appearing in request and response 973 messages can be networks, hosts, or a special code used to indicate a 974 default address. In general, the kinds of routes actually used will 975 depend upon the routing strategy used for the particular network. 976 Many networks are set up so that routing information for individual 977 hosts is not needed. If every node on a given network or subnet is 978 accessible through the same routers, then there is no reason to 979 mention individual hosts in the routing tables. However, networks 980 that include point-to-point lines sometimes require routers to keep 981 track of routes to certain nodes. Whether this feature is required 982 depends upon the addressing and routing approach used in the system. 983 Thus, some implementations may choose not to support host routes. If 984 host routes are not supported, they are to be dropped when they are 985 received in response messages (see section 3.7.2). 987 The RIP-1 packet format does not distinguish among various types of 988 address. Fields that are labeled "address" can contain any of the 989 following: 991 host address subnet number network number zero (default route) 993 Entities which use RIP-1 are assumed to use the most specific 994 information available when routing a datagram. That is, when routing 995 a datagram, its destination address must first be checked against the 996 list of node addresses. Then it must be checked to see whether it 997 matches any known subnet or network number. Finally, if none of 998 these match, the default route is used. 1000 When a node evaluates information that it receives via RIP-1, its 1001 interpretation of an address depends upon whether it knows the subnet 1002 mask that applies to the net. If so, then it is possible to 1003 determine the meaning of the address. For example, consider net 1004 128.6. It has a subnet mask of 255.255.255.0. Thus 128.6.0.0 is a 1005 network number, 128.6.4.0 is a subnet number, and 128.6.4.1 is a node 1006 address. However, if the node does not know the subnet mask, 1007 evaluation of an address may be ambiguous. If there is a non-zero 1008 node part, there is no clear way to determine whether the address 1009 represents a subnet number or a node address. As a subnet number 1010 would be useless without the subnet mask, addresses are assumed to 1011 represent nodes in this situation. In order to avoid this sort of 1012 ambiguity, when using version 1, nodes must not send subnet routes to 1013 nodes that cannot be expected to know the appropriate subnet mask. 1014 Normally hosts only know the subnet masks for directly-connected 1015 networks. Therefore, unless special provisions have been made, 1016 routes to a subnet must not be sent outside the network of which the 1017 subnet is a part. RIP-2 (see section 4) eliminates the subnet/host 1018 ambiguity by including the subnet mask in the routing entry. 1020 This filtering is carried out by the routers at the "border" of the 1021 subnetted network. These are routers which connect that network with 1022 some other network. Within the subnetted network, each subnet is 1023 treated as an individual network. Routing entries for each subnet 1024 are circulated by RIP. However, border routers send only a single 1025 entry for the network as a whole to nodes in other networks. This 1026 means that a border router will send different information to 1027 different neighbors. For neighbors connected to the subnetted 1028 network, it generates a list of all subnets to which it is directly 1029 connected, using the subnet number. For neighbors connected to other 1030 networks, it makes a single entry for the network as a whole, showing 1031 the metric associated with that network. This metric would normally 1032 be the smallest metric for the subnets to which the router is 1033 attached. 1035 Similarly, border routers must not mention host routes for nodes 1036 within one of the directly-connected networks in messages to other 1037 networks. Those routes will be subsumed by the single entry for the 1038 network as a whole. 1040 The router requirements RFC[11] specifies that all implementation of 1041 RIP should support host routes but if they do not then they must 1042 ignore any received host routes. 1044 The special address 0.0.0.0 is used to describe a default route. A 1045 default route is used when it is not convenient to list every 1046 possible network in the RIP updates, and when one or more closely- 1047 connected routers in the system are prepared to handle traffic to the 1048 networks that are not listed explicitly. These routers should create 1049 RIP entries for the address 0.0.0.0, just as if it were a network to 1050 which they are connected. The decision as to how routers create 1051 entries for 0.0.0.0 is left to the implementor. Most commonly, the 1052 system administrator will be provided with a way to specify which 1053 routers should create entries for 0.0.0.0; however, other mechanisms 1054 are possible. For example, an implementor might decide that any 1055 router which speaks BGP should be declared to be a default router. 1056 It may be useful to allow the network administrator to choose the 1057 metric to be used in these entries. If there is more than one 1058 default router, this will make it possible to express a preference 1059 for one over the other. The entries for 0.0.0.0 are handled by RIP 1060 in exactly the same manner as if there were an actual network with 1061 this address. System administrators should take care to make sure 1062 that routes to 0.0.0.0 do not propagate further than is intended. 1063 Generally, each autonomous system has its own preferred default 1064 router. Thus, routes involving 0.0.0.0 should generally not leave 1065 the boundary of an autonomous system. The mechanisms for enforcing 1066 this are not specified in this document. 1068 3.8 Timers 1070 This section describes all events that are triggered by timers. 1072 Every 30 seconds, the RIP process is awakened to send an unsolicited 1073 Response message containing the complete routing table (see section 1074 3.9 on Split Horizon) to every neighboring router. When there are 1075 many routers on a single network, there is a tendency for them to 1076 synchronize with each other such that they all issue updates at the 1077 same time. This can happen whenever the 30 second timer is affected 1078 by the processing load on the system. It is undesirable for the 1079 update messages to become synchronized, since it can lead to 1080 unnecessary collisions on broadcast networks. Therefore, 1081 implementations are required to take one of two precautions: 1083 - The 30-second updates are triggered by a clock whose rate is not 1084 affected by system load or the time required to service the 1085 previous update timer. 1087 - The 30-second timer is offset by a small random time (+/- 0 to 5 1088 seconds) each time it is set. (Implementors may wish to consider 1089 even larger variation in the light of recent research results [10]) 1091 There are two timers associated with each route, a "timeout" and a 1092 "garbage-collection" time. Upon expiration of the timeout, the route 1093 is no longer valid; however, it is retained in the routing table for 1094 a short time so that neighbors can be notified that the route has 1095 been dropped. Upon expiration of the garbage-collection timer, the 1096 route is finally removed from the routing table. 1098 The timeout is initialized when a route is established, and any time 1099 an update message is received for the route. If 180 seconds elapse 1100 from the last time the timeout was initialized, the route is 1101 considered to have expired, and the deletion process described below 1102 begins for that route. 1104 Deletions can occur for one of two reasons: the timeout expires, or 1105 the metric is set to 16 because of an update received from the 1106 current router (see section 3.7.2 for a discussion of processing 1107 updates from other routers). In either case, the following events 1108 happen: 1110 - The garbage-collection timer is set for 120 seconds. 1112 - The metric for the route is set to 16 (infinity). This causes the 1113 route to be removed from service. 1115 - The route change flag is set to indicate that this entry has been 1116 changed. 1118 - The output process is signalled to trigger a response. 1120 Until the garbage-collection timer expires, the route is included in 1121 all updates sent by this router. When the garbage-collection timer 1122 expires, the route is deleted from the routing table. 1124 Should a new route to this network be established while the garbage- 1125 collection timer is running, the new route will replace the one that 1126 is about to be deleted. In this case the garbage-collection timer 1127 must be cleared. 1129 Triggered updates also use a small timer; however, this is best 1130 described in section 3.9.1. 1132 3.9 Input Processing 1134 This section will describe the handling of datagrams received on the 1135 RIP port. Processing will depend upon the value in the command 1136 field. 1138 See sections 4.6 and 5.1 for details on handling version numbers. 1140 3.9.1 Request Messages 1142 A Request is used to ask for a response containing all or part of a 1143 router's routing table. Normally, Requests are sent as broadcasts 1144 (multicasts for RIP-2), from the RIP port, by routers which have just 1145 come up and are seeking to fill in their routing tables as quickly as 1146 possible. However, there may be situations (e.g., router monitoring) 1147 where the routing table of only a single router is needed. In this 1148 case, the Request should be sent directly to that router from a UDP 1149 port other than the RIP port. If such a Request is received, the 1150 router responds directly to the requestor's address and port. 1152 The Request is processed entry by entry. If there are no entries, no 1153 response is given. There is one special case. If there is exactly 1154 one entry in the request, and it has an address family identifier of 1155 zero and a metric of infinity (i.e., 16), then this is a request to 1156 send the entire routing table. In that case, a call is made to the 1157 output process to send the routing table to the requesting 1158 address/port. Except for this special case, processing is quite 1159 simple. Examine the list of RTEs in the Request one by one. For 1160 each entry, look up the destination in the router's routing database 1161 and, if there is a route, put that route's metric in the metric field 1162 of the RTE. If there is no explicit route to the specified 1163 destination, put infinity in the metric field. Once all the entries 1164 have been filled in, change the command from Request to Response and 1165 send the datagram back to the requestor. 1167 Note that there is a difference in metric handling for specific and 1168 whole-table requests. If the request is for a complete routing 1169 table, normal output processing is done, including Split Horizon (see 1170 section 3.9 on Split Horizon). If the request is for specific 1171 entries, they are looked up in the routing table and the information 1172 is returned as is; no Split Horizon processing is done. The reason 1173 for this distinction is the expectation that these requests are 1174 likely to be used for different purposes. When a router first comes 1175 up, it multicasts a Request on every connected network asking for a 1176 complete routing table. It is assumed that these complete routing 1177 tables are to be used to update the requestor's routing table. For 1178 this reason, Split Horizon must be done. It is further assumed that 1179 a Request for specific networks is made only by diagnostic software, 1180 and is not used for routing. In this case, the requester would want 1181 to know the exact contents of the routing table and would not want 1182 any information hidden or modified. 1184 3.9.2 Response Messages 1186 A Response can be received for one of several different reasons: 1188 - response to a specific query 1189 - regular update (unsolicited response) 1190 - triggered update caused by a route change 1192 Processing is the same no matter why the Response was generated. 1194 Because processing of a Response may update the router's routing 1195 table, the Response must be checked carefully for validity. The 1196 Response must be ignored if it is not from the RIP port. The 1197 datagram's IPv4 source address should be checked to see whether the 1198 datagram is from a valid neighbor; the source of the datagram must be 1199 on a directly-connected network. It is also worth checking to see 1200 whether the response is from one of the router's own addresses. 1201 Interfaces on broadcast networks may receive copies of their own 1202 broadcasts/multicasts immediately. If a router processes its own 1203 output as new input, confusion is likely so such datagrams must be 1204 ignored. 1206 Once the datagram as a whole has been validated, process the RTEs in 1207 the Response one by one. Again, start by doing validation. 1208 Incorrect metrics and other format errors usually indicate 1209 misbehaving neighbors and should probably be brought to the 1210 administrator's attention. For example, if the metric is greater 1211 than infinity, ignore the entry but log the event. The basic 1212 validation tests are: 1214 - is the destination address valid (e.g., unicast; not net 0 or 127) 1215 - is the metric valid (i.e., between 1 and 16, inclusive) 1217 If any check fails, ignore that entry and proceed to the next. 1218 Again, logging the error is probably a good idea. 1220 Once the entry has been validated, update the metric by adding the 1221 cost of the network on which the message arrived. If the result is 1222 greater than infinity, use infinity. That is, 1224 metric = MIN (metric + cost, infinity) 1226 Now, check to see whether there is already an explicit route for the 1227 destination address. If there is no such route, add this route to 1228 the routing table, unless the metric is infinity (there is no point 1229 in adding a route which is unusable). Adding a route to the routing 1230 table consists of: 1232 - Setting the destination address to the destination address in the 1233 RTE 1235 - Setting the metric to the newly calculated metric (as described 1236 above) 1238 - Set the next hop address to be the address of the router from which 1239 the datagram came 1241 - Initialize the timeout for the route. If the garbage-collection 1242 timer is running for this route, stop it (see section 3.6 for a 1243 discussion of the timers) 1245 - Set the route change flag 1247 - Signal the output process to trigger an update (see section 3.8.1) 1249 If there is an existing route, compare the next hop address to the 1250 address of the router from which the datagram came. If this datagram 1251 is from the same router as the existing route, reinitialize the 1252 timeout. Next, compare the metrics. If the datagram is from the 1253 same router as the existing route, and the new metric is different 1254 than the old one; or, if the new metric is lower than the old one; do 1255 the following actions: 1257 - Adopt the route from the datagram (i.e., put the new metric in and 1258 adjust the next hop address, if necessary). 1260 - Set the route change flag and signal the output process to trigger 1261 an update 1263 - If the new metric is infinity, start the deletion process 1264 (described above); otherwise, re-initialize the timeout 1266 If the new metric is infinity, the deletion process begins for the 1267 route, which is no longer used for routing packets. Note that the 1268 deletion process is started only when the metric is first set to 1269 infinity. If the metric was already infinity, then a new deletion 1270 process is not started. 1272 If the new metric is the same as the old one, it is simplest to do 1273 nothing further (beyond re-initializing the timeout, as specified 1274 above); but, there is a heuristic which could be applied. Normally, 1275 it is senseless to replace a route if the new route has the same 1276 metric as the existing route; this would cause the route to bounce 1277 back and forth, which would generate an intolerable number of 1278 triggered updates. However, if the existing route is showing signs 1279 of timing out, it may be better to switch to an equally-good 1280 alternative route immediately, rather than waiting for the timeout to 1281 happen. Therefore, if the new metric is the same as the old one, 1282 examine the timeout for the existing route. If it is at least 1283 halfway to the expiration point, switch to the new route. This 1284 heuristic is optional, but highly recommended. 1286 Any entry that fails these tests is ignored, as it is no better than 1287 the current route. 1289 3.10 Output Processing 1291 This section describes the processing used to create response 1292 messages that contain all or part of the routing table. This 1293 processing may be triggered in any of the following ways: 1295 - By input processing, when a Request is received (this Response is 1296 unicast to the requestor; see section 3.7.1) 1298 - By the regular routing update (broadcast/multicast every 30 1299 seconds) router. 1301 - By triggered updates (broadcast/multicast when a route changes) 1303 When a Response is to be sent to all neighbors (i.e., a regular or 1304 triggered update), a Response message is directed to the router at 1305 the far end of each connected point-to-point link, and is broadcast 1306 (multicast for RIP-2) on all connected networks which support 1307 broadcasting. Thus, one Response is prepared for each directly- 1308 connected network, and sent to the appropriate address (direct or 1309 broadcast/multicast). In most cases, this reaches all neighboring 1310 routers. However, there are some cases where this may not be good 1311 enough. This may involve a network that is not a broadcast network 1312 (e.g., the ARPANET), or a situation involving dumb routers. In such 1313 cases, it may be necessary to specify an actual list of neighboring 1314 routers and send a datagram to each one explicitly. It is left to 1315 the implementor to determine whether such a mechanism is needed, and 1316 to define how the list is specified. 1318 3.10.1 Triggered Updates 1320 Triggered updates require special handling for two reasons. First, 1321 experience shows that triggered updates can cause excessive load on 1322 networks with limited capacity or networks with many routers on them. 1323 Therefore, the protocol requires that implementors include provisions 1324 to limit the frequency of triggered updates. After a triggered 1325 update is sent, a timer should be set for a random interval between 1 1326 and 5 seconds. If other changes that would trigger updates occur 1327 before the timer expires, a single update is triggered when the timer 1328 expires. The timer is then reset to another random value between 1 1329 and 5 seconds. A triggered update should be suppressed if a regular 1330 update is due by the time the triggered update would be sent. 1332 Second, triggered updates do not need to include the entire routing 1333 table. In principle, only those routes which have changed need to be 1334 included. Therefore, messages generated as part of a triggered 1335 update must include at least those routes that have their route 1336 change flag set. They may include additional routes, at the 1337 discretion of the implementor; however, sending complete routing 1338 updates is strongly discouraged. When a triggered update is 1339 processed, messages should be generated for every directly-connected 1340 network. Split Horizon processing is done when generating triggered 1341 updates as well as normal updates (see section 3.9). If, after Split 1342 Horizon processing for a given network, a changed route will appear 1343 unchanged on that network (e.g., it appears with an infinite metric), 1344 the route need not be sent. If no routes need be sent on that 1345 network, the update may be omitted. Once all of the triggered 1346 updates have been generated, the route change flags should be 1347 cleared. 1349 If input processing is allowed while output is being generated, 1350 appropriate interlocking must be done. The route change flags should 1351 not be changed as a result of processing input while a triggered 1352 update message is being generated. 1354 The only difference between a triggered update and other update 1355 messages is the possible omission of routes that have not changed. 1356 The remaining mechanisms, described in the next section, must be 1357 applied to all updates. 1359 3.10.2 Generating Response Messages 1361 This section describes how a Response message is generated for a 1362 particular directly-connected network: 1364 Set the version number to either 1 or 2. The mechanism for deciding 1365 which version to send is implementation specific; however, if this is 1366 the Response to a Request, the Response version should match the 1367 Request version. Set the command to Response. Set the bytes labeled 1368 "must be zero" to zero. Start filling in RTEs. Recall that there is 1369 a limit of 25 RTEs to a Response; if there are more, send the current 1370 Response and start a new one. There is no defined limit to the 1371 number of datagrams which make up a Response. 1373 To fill in the RTEs, examine each route in the routing table. If a 1374 triggered update is being generated, only entries whose route change 1375 flags are set need be included. If, after Split Horizon processing, 1376 the route should not be included, skip it. If the route is to be 1377 included, then the destination address and metric are put into the 1378 RTE. Routes must be included in the datagram even if their metrics 1379 are infinite. 1381 4. Protocol Extensions 1383 This section does not change the RIP protocol per se. Rather, it 1384 provides extensions to the message format which allows routers to 1385 share important additional information. 1387 The same header format is used for RIP-1 and RIP-2 messages (see 1388 section 3.4). The format for the 20-octet route entry (RTE) for 1389 RIP-2 is: 1391 0 1 2 3 3 1392 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 1393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1394 | Address Family Identifier (2) | Route Tag (2) | 1395 +-------------------------------+-------------------------------+ 1396 | IP Address (4) | 1397 +---------------------------------------------------------------+ 1398 | Subnet Mask (4) | 1399 +---------------------------------------------------------------+ 1400 | Next Hop (4) | 1401 +---------------------------------------------------------------+ 1402 | Metric (4) | 1403 +---------------------------------------------------------------+ 1405 The Address Family Identifier, IP Address, and Metric all have the 1406 meanings defined in section 3.4. The Version field will specify 1407 version number 2 for RIP messages which use authentication or carry 1408 information in any of the newly defined fields. 1410 4.1 Authentication 1412 Since authentication is a per message function, and since there is 1413 only one 2-octet field available in the message header, and since any 1414 reasonable authentication scheme will require more than two octets, 1415 the authentication scheme for RIP version 2 will use the space of an 1416 entire RIP entry. If the Address Family Identifier of the first (and 1417 only the first) entry in the message is 0xFFFF, then the remainder of 1418 the entry contains the authentication. This means that there can be, 1419 at most, 24 RIP entries in the remainder of the message. If 1420 authentication is not in use, then no entries in the message should 1421 have an Address Family Identifier of 0xFFFF. A RIP message which 1422 contains an authentication entry would begin with the following 1423 format: 1425 0 1 2 3 3 1426 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 1427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1428 | Command (1) | Version (1) | unused | 1429 +---------------+---------------+-------------------------------+ 1430 | 0xFFFF | Authentication Type (2) | 1431 +-------------------------------+-------------------------------+ 1432 ~ Authentication (16) ~ 1433 +---------------------------------------------------------------+ 1435 Currently, the only Authentication Type is simple password and it 1436 is type 2. The remaining 16 octets contain the plain text password. If 1437 the password is under 16 octets, it must be left-justified and 1438 padded to the right with nulls (0x00). 1440 4.2 Route Tag 1442 The Route Tag (RT) field is an attribute assigned to a route which 1443 must be preserved and readvertised with a route. The intended use 1444 of the Route Tag is to provide a method of separating "internal" 1445 RIP routes (routes for networks within the RIP routing domain) 1446 from "external" RIP routes, which may have been imported from an 1447 EGP or another IGP. 1449 Routers supporting protocols other than RIP should be configurable 1450 to allow the Route Tag to be configured for routes imported from 1451 different sources. For example, routes imported from EGP or BGP 1452 should be able to have their Route Tag either set to an arbitrary 1453 value, or at least to the number of the Autonomous System from 1454 which the routes were learned. 1456 Other uses of the Route Tag are valid, as long as all routers in 1457 the RIP domain use it consistently. This allows for the 1458 possibility of a BGP-RIP protocol interactions document, which 1459 would describe methods for synchronizing routing in a transit 1460 network. 1462 4.3 Subnet mask 1464 The Subnet Mask field contains the subnet mask which is applied to 1465 the IP address to yield the non-host portion of the address. If this 1466 field is zero, then no subnet mask has been included for this entry. 1468 On an interface where a RIP-1 router may hear and operate on the 1469 information in a RIP-2 routing entry the following rules apply: 1471 1) information internal to one network must never be advertised into 1472 another network, 1474 2) information about a more specific subnet may not be advertised 1475 where RIP-1 routers would consider it a host route, and 1477 3) supernet routes (routes with a netmask less specific than 1478 the "natural" network mask) must not be advertised where they 1479 could be misinterpreted by RIP-1 routers. 1481 4.4 Next Hop 1483 The immediate next hop IP address to which packets to the destination 1484 specified by this route entry should be forwarded. Specifying a 1485 value of 0.0.0.0 in this field indicates that routing should be via 1486 the originator of the RIP advertisement. An address specified as 1487 a next hop must, per force, be directly reachable on the logical 1488 subnet over which the advertisement is made. 1490 The purpose of the Next Hop field is to eliminate packets being routed 1491 through extra hops in the system. It is particularly useful when RIP 1492 is not being run on all of the routers on a network. A simple example 1493 is given in Appendix A. Note that Next Hop is an "advisory" field. That 1494 is, if the provided information is ignored, a possibly sub-optimal, 1495 but absolutely valid, route may be taken. If the received Next Hop 1496 is not directly reachable, it should be treated as 0.0.0.0. 1498 4.5 Multicasting 1500 In order to reduce unnecessary load on those hosts which are not 1501 listening to RIP-2 messages, an IP multicast address will be used for 1502 periodic broadcasts. The IP multicast address is 224.0.0.9. Note that 1503 IGMP is not needed since these are inter-router messages which are not 1504 forwarded. 1506 On NBMA networks, unicast addressing may be used. However, if a 1507 response addressed to the RIP-2 multicast address is received, it 1508 should be accepted. 1510 In order to maintain backwards compatibility, the use of the 1511 multicast address will be configurable, as described in section 5.1. If 1512 multicasting is used, it should be used on all interfaces which support 1513 it. 1515 4.6 Queries 1517 If a RIP-2 router receives a RIP-1 Request, it should respond with a 1518 RIP-1 Response. If the router is configured to send only RIP-2 1519 messages, it should not respond to a RIP-1 Request. 1521 5. Compatibility 1523 RFC [1] showed considerable forethought in its specification of 1524 the handling of version numbers. It specifies that RIP messages of 1525 version 0 are to be discarded, that RIP messages of version 1 are 1526 to be discarded if any Must Be Zero (MBZ) field is non-zero, and that 1527 RIP messages of any version greater than 1 should not be discarded 1528 simply because an MBZ field contains a value other than zero. This 1529 means that the new version of RIP is totally backwards compatible 1530 with existing RIP implementations which adhere to this part of the 1531 specification. 1533 5.1 Compatibility Switch 1535 A compatibility switch is necessary for two reasons. First, there 1536 are implementations of RIP-1 in the field which do not follow RFC 1537 [1] as described above. Second, the use of multicasting would 1538 prevent RIP-1 systems from receiving RIP-2 updates (which may 1539 be a desired feature in some cases). This switch should be configurable 1540 on a per-interface basis. 1542 The switch has four settings: RIP-1, in which only RIP-1 messages are 1543 sent; RIP-1 compatibility, in which RIP-2 messages are broadcast; 1544 RIP-2, in which RIP-2 messages are multicast; and "none", which 1545 disables the sending of RIP messages. It is recommended that the 1546 default setting be either RIP-1 or RIP-2, but not RIP-1 compatibility. 1547 This is because of the potential problems which can occur on some 1548 topologies. RIP-1 compatibility should only be used when all of the 1549 consequences of its use are well understood by the network administrator. 1551 For completeness, routers should also implement a receive control 1552 switch which would determine whether to accept, RIP-1 only, RIP-2 1553 only, both, or none. It should also be configurable on a 1554 per-interface basis. It is recommended that the default be compatible 1555 with the default chosen for sending updates. 1557 5.2 Authentication 1559 The following algorithm should be used to authenticate a RIP message. If 1560 the router is not configured to authenticate RIP-2 messages, then RIP-1 1561 and unauthenticated RIP-2 messages will be accepted; authenticated 1562 RIP-2 messages shall be discarded. If the router is configured to 1563 authenticate RIP-2 messages, then RIP-1 messages and RIP-2 messages 1564 which pass authentication testing shall be accepted; unauthenticated 1565 and failed authentication RIP-2 messages shall be discarded. For 1566 maximum security, RIP-1 messages should be ignored when authentication 1567 is in use (see section 4.1); otherwise, the routing information from 1568 authenticated messages will be propagated by RIP-1 routers in an 1569 unauthenticated manner. 1571 Since an authentication entry is marked with an Address Family 1572 Identifier of 0xFFFF, a RIP-1 system would ignore this entry since 1573 it would belong to an address family other than IP. It should 1574 be noted, therefore, that use of authentication will not prevent 1575 RIP-1 systems from seeing RIP-2 messages. If desired, this may 1576 be done using multicasting, as described in sections 4.5 and 5.1. 1578 5.3 Larger Infinity 1579 While on the subject of compatibility, there is one item which people 1580 have requested: increasing infinity. The primary reason that this 1581 cannot be done is that it would violate backwards compatibility. A 1582 larger infinity would obviously confuse older versions of rip. At 1583 best, they would ignore the route as they would ignore a metric of 1584 16. There was also a proposal to make the Metric a single octet and reuse 1585 the high three octets, but this would break any implementations which 1586 treat the metric as a 4-octet entity. 1588 5.4 Addressless Links 1590 As in RIP-1, addressless links will not be supported by RIP-2. 1592 6. Security Considerations 1594 The basic RIP protocol is not a secure protocol. To bring RIP-2 1595 in line with more modern routing protocols, an extensible authentication 1596 mechanism has been incorporated into the protocol enhancements. This 1597 mechanism is described in sections 4.1 and 5.2. Security is further 1598 enhanced by the mechanism described in [3]. 1600 Appendix A 1602 This is a simple example of the use of the next hop field in a rip entry. 1604 ----- ----- ----- ----- ----- ----- 1605 |IR1| |IR2| |IR3| |XR1| |XR2| |XR3| 1606 --+-- --+-- --+-- --+-- --+-- --+-- 1607 | | | | | | 1608 --+-------+-------+---------------+-------+-------+-- 1609 <-------------RIP-2-------------> 1611 Assume that IR1, IR2, and IR3 are all "internal" routers which are 1612 under one administration (e.g. a campus) which has elected to use 1613 RIP-2 as its IGP. XR1, XR2, and XR3, on the other hand, are under 1614 separate administration (e.g. a regional network, of which the campus 1615 is a member) and are using some other routing protocol (e.g. OSPF). 1616 XR1, XR2, and XR3 exchange routing information among themselves such 1617 that they know that the best routes to networks N1 and N2 are via 1618 XR1, to N3, N4, and N5 are via XR2, and to N6 and N7 are via XR3. By 1619 setting the Next Hop field correctly (to XR2 for N3/N4/N5, to XR3 for 1620 N6/N7), only XR1 need exchange RIP-2 routes with IR1/IR2/IR3 for 1621 routing to occur without additional hops through XR1. Without the 1622 Next Hop (for example, if RIP-1 were used) it would be necessary for 1623 XR2 and XR3 to also participate in the RIP-2 protocol to eliminate 1624 extra hops. 1626 References 1628 [1] Hedrick, C., Routing Information Protocol, Request For Comments 1629 (RFC) 1058, Rutgers University, June 1988. 1631 [2] Malkin, G., and F. Baker, RIP Version 2 MIB Extension, Request 1632 For Comments (RFC) 1389, Xylogics, Inc., Advanced Computer 1633 Communications, January 1993. 1635 [3] Baker, F., Atkinson, R., "RIP-II MD5 Authentication", draft- 1636 ietf-ripv2-md5-auth-00.txt, March 1997. 1638 [4] Bellman, R. E., "Dynamic Programming", Princeton University 1639 Press, Princeton, N.J., 1957. 1641 [5] Bertsekas, D. P., and Gallaher, R. G., "Data Networks", 1642 Prentice-Hall, Englewood Cliffs, N.J., 1987. 1644 [6] Braden, R., and Postel, J., "Requirements for Internet Gateways", 1645 USC/Information Sciences Institute, RFC-1009, June 1987. 1647 [7] Boggs, D. R., Shoch, J. F., Taft, E. A., and Metcalfe, R. M., 1648 "Pup: An Internetwork Architecture", IEEE Transactions on 1649 Communications, April 1980. 1651 [8] Ford, L. R. Jr., and Fulkerson, D. R., "Flows in Networks", 1652 Princeton University Press, Princeton, N.J., 1962. 1654 [9] Xerox Corp., "Internet Transport Protocols", Xerox System 1655 Integration Standard XSIS 028112, December 1981. 1657 [10] Floyd, S., and V. Jacobson, "The synchronization of Periodic 1658 Routing Messages," ACM Sigcom '93 symposium, September 1993. 1660 [11] Baker, F., "Requirements for IP Version 4 Routers." RFC 1812, 1661 June 1995, section 2.2.5 1663 Author's Address 1665 Gary Scott Malkin 1666 Bay Networks 1667 8 Federal Street 1668 Billerica, MA 01821 1670 Phone: (978) 916-4237 1671 EMail: gmalkin@baynetworks.com