home *** CD-ROM | disk | FTP | other *** search
/ Handbook of Infosec Terms 2.0 / Handbook_of_Infosec_Terms_Version_2.0_ISSO.iso / text / rfcs / rfc0789.txt < prev    next >
Text File  |  1996-05-07  |  27KB  |  820 lines

  1.                                                            RFC 789 
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.     Vulnerabilities of Network Control Protocols: An Example 
  20.  
  21.  
  22.  
  23.                           Eric C. Rosen 
  24.  
  25.                    Bolt Beranek and Newman Inc. 
  26.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  27.  
  28.      This paper has appeared in the January 1981 edition  of  the 
  29.  
  30. SIGSOFT  Software  Engineering Notes, and will soon appear in the 
  31.  
  32. SIGCOMM Computer Communications Review.  It is  being  circulated 
  33.  
  34. as  an  RFC because it is thought that it may be of interest to a 
  35.  
  36. wider audience, particularly to the internet community.  It is  a 
  37.  
  38. case  study  of  a  particular  kind of problem that can arise in 
  39.  
  40. large distributed systems,  and  of  the  approach  used  in  the 
  41.  
  42. ARPANET to deal with one such problem. 
  43.  
  44.       On  October 27, 1980, there was an unusual occurrence on the 
  45.  
  46. ARPANET.  For a period of several hours, the network appeared  to 
  47.  
  48. be  unusable,  due to what was later diagnosed as a high priority 
  49.  
  50. software  process   running   out   of   control.    Network-wide 
  51.  
  52. disturbances  are  extremely  unusual  in  the  ARPANET (none has 
  53.  
  54. occurred in several years), and as a  result,  many  people  have 
  55.  
  56. expressed  interest  in  learning more about the etiology of this 
  57.  
  58. particular incident.  The purpose of this note is to explain what 
  59.  
  60. the symptoms of the problem  were,  what  the  underlying  causes 
  61.  
  62. were,  and  what  lessons  can  be  drawn.   As we shall see, the 
  63.  
  64. immediate cause of the problem was  a  rather  freakish  hardware 
  65.  
  66. malfunction  (which is not likely to recur) which caused a faulty 
  67.  
  68. sequence of network control packets to be generated.  This faulty 
  69.  
  70. sequence of control packets in turn affected the apportionment of 
  71.  
  72. software resources in the IMPs, causing one of the IMP  processes 
  73.  
  74. to  use  an  excessive  amount  of resources, to the detriment of 
  75.  
  76. other  IMP  processes.   Restoring  the  network  to  operational 
  77.  
  78.                                - 1 - 
  79.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  80.  
  81. condition  was  a  relatively straightforward task.  There was no 
  82.  
  83. damage other than the outage itself,  and  no  residual  problems 
  84.  
  85. once  the  network  was  restored.   Nevertheless,  it  is  quite 
  86.  
  87. interesting to see the way  in  which  unusual  (indeed,  unique) 
  88.  
  89. circumstances  can  bring  out vulnerabilities in network control 
  90.  
  91. protocols, and that shall be the focus of this paper. 
  92.  
  93.       The problem began suddenly when  we  discovered  that,  with 
  94.  
  95. very few exceptions, no IMP was able to communicate reliably with 
  96.  
  97. any other IMP.  Attempts to go from a TIP to a host on some other 
  98.  
  99. IMP   only   brought  forth  the  "net  trouble"  error  message, 
  100.  
  101. indicating that no physical path  existed  between  the  pair  of 
  102.  
  103. IMPs.   Connections  which already existed were summarily broken. 
  104.  
  105. A flood of phone calls to the Network Control Center  (NCC)  from 
  106.  
  107. all  around  the  country  indicated  that  the  problem  was not 
  108.  
  109. localized, but rather seemed to be affecting virtually every IMP. 
  110.  
  111.       As a first step towards trying to find out what the state of 
  112.  
  113. the network actually was, we dialed up a number  of  TIPs  around 
  114.  
  115. the  country.  What we generally found was that the TIPs were up, 
  116.  
  117. but  that  their  lines  were  down.   That  is,  the  TIPs  were 
  118.  
  119. communicating  properly  with the user over the dial-up line, but 
  120.  
  121. no connections to other IMPs were possible. 
  122.  
  123.       We tried manually restarting a number of IMPs which  are  in 
  124.  
  125. our own building (after taking dumps, of course).  This procedure 
  126.  
  127. initializes  all  of  the IMPs' dynamic data structures, and will 
  128.  
  129.                                - 2 - 
  130.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  131.  
  132. often clear up problems which arise when, as sometimes happens in 
  133.  
  134. most complex software systems, the IMPs'  software  gets  into  a 
  135.  
  136. "funny"  state.   The IMPs which were restarted worked well until 
  137.  
  138. they were connected to the rest of  the  net,  after  which  they 
  139.  
  140. exhibited  the same complex of symptoms as the IMPs which had not 
  141.  
  142. been restarted. 
  143.  
  144.       From the facts so far presented, we  were  able  to  draw  a 
  145.  
  146. number  of  conclusions.   Any  problem  which  affects  all IMPs 
  147.  
  148. throughout the network is usually a routing problem.   Restarting 
  149.  
  150. an  IMP  re-initializes  the routing data structures, so the fact 
  151.  
  152. that restarting an IMP did not alleviate the problem in that  IMP 
  153.  
  154. suggested  that  the problem was due to one or more "bad" routing 
  155.  
  156. updates circulating in the network.  IMPs  which  were  restarted 
  157.  
  158. would  just receive the bad updates from those of their neighbors 
  159.  
  160. which were not restarted.  The fact that IMPs  seemed  unable  to 
  161.  
  162. keep  their lines up was also a significant clue as to the nature 
  163.  
  164. of the problem.  Each  pair  of  neighboring  IMPs  runs  a  line 
  165.  
  166. up/down protocol to determine whether the line connecting them is 
  167.  
  168. of  sufficient  quality  to be put into operation.  This protocol 
  169.  
  170. involves the sending of HELLO and I-HEARD-YOU messages.  We  have 
  171.  
  172. noted  in  the  past that under conditions of extremely heavy CPU 
  173.  
  174. utilization, so many buffers can pile up waiting to be served  by 
  175.  
  176. the  bottleneck  CPU process, that the IMPs are unable to acquire 
  177.  
  178. the  buffers  needed  for  receiving  the  HELLO  or  I-HEARD-YOU 
  179.  
  180. messages.  If a condition like this lasts for any length of time, 
  181.  
  182.                                - 3 - 
  183.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  184.  
  185. the  IMPs  may  not be able to run the line up/down protocol, and 
  186.  
  187. lines will be declared down by the IMPs' software.  On the  basis 
  188.  
  189. of  all  these  facts,  our  tentative  conclusion  was that some 
  190.  
  191. malformed update was causing the routing process in the  IMPs  to 
  192.  
  193. use  an excessive amount of CPU time, possibly even to be running 
  194.  
  195. in an infinite loop.  (This would be  quite  a  surprise  though, 
  196.  
  197. since  we  tried very hard to protect ourselves against malformed 
  198.  
  199. updates when we designed the routing process.)  As we shall  see, 
  200.  
  201. this  tentative  conclusion, although on the right track, was not 
  202.  
  203. quite correct, and the actual situation turned  out  to  be  much 
  204.  
  205. more complex. 
  206.  
  207.       When we examined core dumps from several IMPs, we noted that 
  208.  
  209. most,  in  some cases all, of the IMPs' buffers contained routing 
  210.  
  211. updates  waiting  to  be  processed.   Before   describing   this 
  212.  
  213. situation further, it is necessary to explain some of the details 
  214.  
  215. of  the  routing  algorithm's  updating  scheme.   (The following 
  216.  
  217. explanation will of course be very brief and incomplete.  Readers 
  218.  
  219. with a greater  level  of  interest  are  urged  to  consult  the 
  220.  
  221. references.)  Every so often, each IMP generates a routing update 
  222.  
  223. indicating  which  other  IMPs  are  its immediate neighbors over 
  224.  
  225. operational  lines,  and  the  average   per-packet   delay   (in 
  226.  
  227. milliseconds)  over that line.  Every IMP is required to generate 
  228.  
  229. such an update at least once per minute, and no IMP is  permitted 
  230.  
  231. to  generate  more than a dozen such updates over the course of a 
  232.  
  233. minute.  Each  update  has  a  6-bit  sequence  number  which  is 
  234.  
  235.                                - 4 - 
  236.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  237.  
  238. advanced by 1 (modulo 64) for each successive update generated by 
  239.  
  240. a  particular IMP.  If two updates generated by the same IMP have 
  241.  
  242. sequence numbers n and m, update n  is  considered  to  be  LATER 
  243.  
  244. (i.e.,  more recently generated) than update m if and only if one 
  245.  
  246. of the following two conditions hold: 
  247.  
  248.  
  249.  
  250.          (a) n > m, and n - m <= 32 
  251.  
  252.          (b) n < m, and m - n > 32  
  253.  
  254. (where the comparisons and subtractions treat n and m as unsigned 
  255.  
  256. 6-bit numbers, with  no  modulus).   When  an  IMP  generates  an 
  257.  
  258. update,  it sends a copy of the update to each neighbor.  When an 
  259.  
  260. IMP A receives an update u1 which was generated  by  a  different 
  261.  
  262. IMP  B,  it  first  compares  the  sequence number of u1 with the 
  263.  
  264. sequence number of the last update, u2, that it accepted from  B. 
  265.  
  266. If  this  comparison  indicates  that  u2 is LATER than u1, u1 is 
  267.  
  268. simply discarded.  If, on the other hand, u1 appears  to  be  the 
  269.  
  270. LATER  update, IMP A will send u1 to all its neighbors (including 
  271.  
  272. the one from which it was received).  The sequence number  of  u1 
  273.  
  274. will be retained in A's tables as the LATEST received update from 
  275.  
  276. B.   Of  course,  u1 is always accepted if A has seen no previous 
  277.  
  278. update from B.  Note that this procedure is  designed  to  ensure 
  279.  
  280. that  an  update  generated  by  a  particular  IMP  is received, 
  281.  
  282. unchanged, by all other  IMPs  in  the  network,  IN  THE  PROPER 
  283.  
  284. SEQUENCE.    Each routing update is broadcast (or flooded) to all 
  285.  
  286. IMPs, not just to immediate neighbors of the IMP which  generated 
  287.  
  288.                                - 5 - 
  289.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  290.  
  291. the update (as in some other routing algorithms).  The purpose of 
  292.  
  293. the  sequence numbers is to ensure that all IMPs will agree as to 
  294.  
  295. which update from a given IMP  is  the  most  recently  generated 
  296.  
  297. update from that IMP. 
  298.  
  299.       For  reliability,  there  is  a  protocol for retransmitting 
  300.  
  301. updates over individual links.  Let X and Y be neighboring  IMPs, 
  302.  
  303. and let A be a third IMP.  Suppose X receives an update which was 
  304.  
  305. generated by A, and transmits it to Y.  Now if in the next 100 ms 
  306.  
  307. or  so, X does not receive from Y an update which originated at A 
  308.  
  309. and whose sequence number is at least as recent as  that  of  the 
  310.  
  311. update  X  sent  to  Y,  X concludes that its transmission of the 
  312.  
  313. update did not get through to Y, and  that  a  retransmission  is 
  314.  
  315. required.   (This  conclusion is warranted, since an update which 
  316.  
  317. is  received  and  adjudged  to  be  the  most  recent  from  its 
  318.  
  319. originating  IMP is sent to all neighbors, including the one from 
  320.  
  321. which it was received.)  The IMPs do not keep the original update 
  322.  
  323. packets  buffered  pending  retransmission.   Rather,   all   the 
  324.  
  325. information  in  the  update  packet  is  kept in tables, and the 
  326.  
  327. packet  is  re-created  from  the  tables  if  necessary  for   a 
  328.  
  329. retransmission. 
  330.  
  331.       This  transmission  protocol  ("flooding")  distributes  the 
  332.  
  333. routing updates  in a  very  rapid  and  reliable  manner.   Once 
  334.  
  335. generated by an IMP, an update will almost always reach all other 
  336.  
  337. IMPs  in  a time period on the order of 100 ms.  Since an IMP can 
  338.  
  339. generate no more than a dozen updates per minute, and  there  are 
  340.  
  341.                               - 6 - 
  342.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  343.  
  344. 64  possible sequence numbers, sequence number wrap-around is not 
  345.  
  346. a problem.  There is only one exception  to  this.   Suppose  two 
  347.  
  348. IMPs  A  and  B  are  out  of  communication for a period of time 
  349.  
  350. because there is no physical path between them.  (This may be due 
  351.  
  352. either to a network partition, or to a more  mundane  occurrence, 
  353.  
  354. such  as  one  of  the  IMPs  being down.)  When communication is 
  355.  
  356. re-established, A and B have no way of knowing how long they have 
  357.  
  358. been out of communication, or how many times the other's sequence 
  359.  
  360. numbers may have wrapped around.  Comparing the  sequence  number 
  361.  
  362. of  a newly received update with the sequence number of an update 
  363.  
  364. received before the outage may give an incorrect result.  To deal 
  365.  
  366. with this problem, the following scheme is adopted.   Let  t0  be 
  367.  
  368. the time at which IMP A receives update number n generated by IMP 
  369.  
  370. B.   Let  t1 be t0 plus 1 minute.  If by t1, A receives no update 
  371.  
  372. generated by B with a LATER sequence number than n, A will accept 
  373.  
  374. any update from B as being more recent than n.  So  if  two  IMPs 
  375.  
  376. are  out  of  communication  for  a  period of time which is long 
  377.  
  378. enough for the sequence numbers  to  have  wrapped  around,  this 
  379.  
  380. procedure  ensures  that  proper  resynchronization  of  sequence 
  381.  
  382. numbers is effected when communication is re-established. 
  383.  
  384.       There is just one more facet of the updating  process  which 
  385.  
  386. needs  to  be  discussed.   Because  of  the way the line up/down 
  387.  
  388. protocol works, a line cannot be  brought  up  until  60  seconds 
  389.  
  390. after  its performance becomes good enough to warrant operational 
  391.  
  392. use.  (Roughly speaking, this is the time it takes  to  determine 
  393.  
  394.                                - 7 - 
  395.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  396.  
  397. that  the  line's  performance  is  good  enough.)   During  this 
  398.  
  399. 60-second period, no data is sent  over  the  line,  but  routing 
  400.  
  401. updates are transmitted.  Remember that every node is required to 
  402.  
  403. generate  a  routing update at least once per minute.  Therefore, 
  404.  
  405. this procedure ensures that if two IMPs are out of  communication 
  406.  
  407. because  of  the  failure  of some line, each has the most recent 
  408.  
  409. update  from   the   other   by   the   time   communication   is 
  410.  
  411. re-established. 
  412.  
  413.       This  very  short  introduction  to  the routing algorithm's 
  414.  
  415. updating protocol should provide enough background to enable  the 
  416.  
  417. reader  to  understand  the  particular problem under discussion; 
  418.  
  419. further justification and detail can be found in the  references. 
  420.  
  421.       Let  us  return now to the discussion of the network outage. 
  422.  
  423. I have already mentioned that the core dumps  showed  almost  all 
  424.  
  425. buffers   holding  routing  updates  which  were  waiting  to  be 
  426.  
  427. processed.  Close inspection showed that  all  the  updates  were 
  428.  
  429. from  a  single  IMP, IMP 50.  By a strange "coincidence," IMP 50 
  430.  
  431. had been  malfunctioning  just  before  the  network-wide  outage 
  432.  
  433. occurred,  and  was  off the net during the period of the outage. 
  434.  
  435. Hence it was not generating any updates during the period of  the 
  436.  
  437. outage.   In  addition,  IMP 29, an immediate neighbor of IMP 50, 
  438.  
  439. was also suffering hardware malfunctions (in particular, dropping 
  440.  
  441. bits), but was up (though somewhat flakey) while the network  was 
  442.  
  443. in  bad  shape.  Furthermore, the malfunction in IMP 50 had to do 
  444.  
  445. with its ability to communicate properly with the neighboring IMP 
  446.  
  447.                               - 8 - 
  448.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  449.  
  450. 29.  Although we did not yet understand how it was  possible  for 
  451.  
  452. so  many updates from one IMP to be extant simultaneously, we did 
  453.  
  454. understand enough to be able to get the network to recover.   All 
  455.  
  456. that was necessary was to patch the IMPs to disregard any updates 
  457.  
  458. from  IMP  50, which after all was down anyway.  When the network 
  459.  
  460. is operating normally, broadcasting a patch to all  IMPs  can  be 
  461.  
  462. done  in  a  matter of minutes.  With the network operating as it 
  463.  
  464. was during the period of the outage, this can take as much  as  3 
  465.  
  466. or  4 hours.  (Remember that the IMPs are generally unmanned, and 
  467.  
  468. that the only way of controlling them from the  NCC  is  via  the 
  469.  
  470. network  itself.   This  is perfectly satisfactory when an outage 
  471.  
  472. affects only a small group of IMPs, but  is  an  obvious  problem 
  473.  
  474. when  the  outage  has network-wide effects.)  This procedure was 
  475.  
  476. fully successful in bringing the network back up. 
  477.  
  478.       When we looked closely at the dumps, we saw  that  not  only 
  479.  
  480. were  all  the updates on the queue from IMP 50, but they all had 
  481.  
  482. one of three sequence numbers (either 8, 40,  or  44),  and  were 
  483.  
  484. ordered        in        the        queue       as       follows: 
  485.  
  486. 8, 40, 44, 8, 40, 44, 8, 40, 44, ...  Note that by the definition 
  487.  
  488. of LATER, 44 is LATER than 40 (44 > 40 and 44 - 40 <= 32), 40  is 
  489.  
  490. LATER  than  8  (40 > 8 and 40 - 8 <= 32), and 8 is LATER than 44 
  491.  
  492. (8 < 44 and 44 - 8 > 32).  Given the presence  of  three  updates 
  493.  
  494. from the same IMP with these three sequence numbers, this is what 
  495.  
  496. would  be  expected.   Since each update is LATER than one of the 
  497.  
  498. others, a cycle is formed which keeps the three updates  floating 
  499.  
  500.                                - 9 - 
  501.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  502.  
  503. around  the  network  indefinitely.   Thus the IMPs spend most of 
  504.  
  505. their CPU time and buffer space in processing these updates.  The 
  506.  
  507. problem was to figure out how these three updates could  possibly 
  508.  
  509. have  existed at the same time.  After all, getting from update 8 
  510.  
  511. to update 40  should  require  2  or  3  full  minutes,  plus  31 
  512.  
  513. intervening  sequence  numbers.   So  how could 8 still be around 
  514.  
  515. when  40  was  generated,  especially  since  no   updates   with 
  516.  
  517. intervening sequence numbers were present? 
  518.  
  519.       Our  first thought was that maybe the real-time clock in IMP 
  520.  
  521. 50 was running one or two orders of magnitude faster than normal, 
  522.  
  523. invalidating our assumptions about the maximum number of  updates 
  524.  
  525. which  could  be  generated  in  a  given  time.   An alternative 
  526.  
  527. hypothesis suggested itself however when we looked at the  binary 
  528.  
  529. representations of the three sequence numbers: 
  530.  
  531.            8 - 001000 
  532.  
  533.          40 - 101000 
  534.  
  535.          44 - 101100 
  536.  
  537.  Note  that  44  has only one more bit than 40, which has only one 
  538.  
  539. more bit than 8.  Furthermore, the three different  updates  were 
  540.  
  541. completely  identical,  except  for their sequence numbers.  This 
  542.  
  543. suggests that  there  was  really  only  one  update,  44,  whose 
  544.  
  545. sequence number was twice corrupted by dropped bits.  (Of course, 
  546.  
  547. it's  also  possible  that  the  "real"  update  was  8,  and was 
  548.  
  549. corrupted by added bits.  However, bit-dropping has proven itself 
  550.  
  551.                               - 10 - 
  552.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  553.  
  554. to be a much  more  common  sort  of  hardware  malfunction  than 
  555.  
  556. bit-adding,  although  spontaneously  dropped  bits may sometimes 
  557.  
  558. come back on spontaneously.) 
  559.  
  560.       Surely, the reader will object,  there  must  be  protection 
  561.  
  562. against  dropped  bits.   Yes there is protection, but apparently 
  563.  
  564. not enough.  The update packets themselves are checksummed, so  a 
  565.  
  566. dropped  bit  in  an update packet is readily detected.  Remember 
  567.  
  568. though that if  an  update  needs  to  be  retransmitted,  it  is 
  569.  
  570. recreated  from tabled information.  For maximal reliability, the 
  571.  
  572. tables must  be  checksummed  also,  and  the  checksum  must  be 
  573.  
  574. recomputed every time the table is accessed.  However, this would 
  575.  
  576. require  either  a  large  number  of  CPU  cycles  (for frequent 
  577.  
  578. checksumming of a large area of memory)  or  a  large  amount  of 
  579.  
  580. memory  (to store the checksums for a lot of small areas).  Since 
  581.  
  582. CPU cycles and memory are both potentially scarce resources, this 
  583.  
  584. did not seem to us to  be  a  cost-effective  way  to  deal  with 
  585.  
  586. problems  that  arise, say, once per year (this is the first such 
  587.  
  588. problem encountered in a year and a half of running this  routing 
  589.  
  590. algorithm).   Time  and  space  can  be  saved by recomputing the 
  591.  
  592. checksum at  a  somewhat  slower  frequency,  but  this  is  less 
  593.  
  594. reliable,  in  that it allows a certain number of dropped bits to 
  595.  
  596. "fall between the cracks."  It seems likely then that one of  the 
  597.  
  598. malfunctioning  IMPs  had to retransmit update 44 at least twice, 
  599.  
  600. (recreating it each time from tabled information), retransmitting 
  601.  
  602. it at least once with the corrupted sequence number  40,  and  at 
  603.  
  604.                               - 11 - 
  605.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  606.  
  607. least  once  with  the  corrupted  sequence number 8.  This would 
  608.  
  609. cause those three sequence numbers to be extant  in  the  network 
  610.  
  611. simultaneously,  even  though protocol is supposed to ensure that 
  612.  
  613. this is impossible. 
  614.  
  615.       Actually, the detection of dropped bits is most  properly  a 
  616.  
  617. hardware function.  The next generation of IMP hardware (the "C30 
  618.  
  619. IMP")  will  be able to detect and correct all single-bit errors, 
  620.  
  621. and will detect all other bit errors.  Uncorrectable  bit  errors 
  622.  
  623. will  cause  the  IMP to go into its "loader/dumper."  (An IMP in 
  624.  
  625. its loader/dumper is not usable for  transferring  data,  and  is 
  626.  
  627. officially   in  the  "down"  state.   However,  an  IMP  in  its 
  628.  
  629. loader/dumper is easily controllable from the  NCC,  and  can  be 
  630.  
  631. restarted  or  reloaded  without  on-site intervention.)  Current 
  632.  
  633. hardware does have parity checking (which  should  detect  single 
  634.  
  635. dropped  bits),  but  this feature has had to be turned off since 
  636.  
  637. (a) there are too many spurious parity "errors,"  i.e.,  most  of 
  638.  
  639. the  time when the machines complain of parity errors there don't 
  640.  
  641. really seem to be any, and (b) parity errors cause  the  machines 
  642.  
  643. to  simply  halt, rather than go into their loader/dumpers, which 
  644.  
  645. means that on-site intervention is required to restart them. 
  646.  
  647.       Pending the introduction of improved hardware, what  can  be 
  648.  
  649. done  to prevent problems like this from recurring in the future? 
  650.  
  651. It is easy to think of many  ways  of  avoiding  this  particular 
  652.  
  653. problem,  especially  if  one does not consider the problems that 
  654.  
  655. may arise from the "fixes."  For example, we  might  be  able  to 
  656.  
  657.                              - 12 - 
  658.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  659.  
  660. avoid  this  sort of problem by spending a lot more CPU cycles on 
  661.  
  662. checksumming, but this may be too expensive because of  the  side 
  663.  
  664. effects  it  would  introduce.   (Also,  it is not clear that any 
  665.  
  666. memory checksumming strategy can be totally free of "cracks.")  A 
  667.  
  668. very  simple  and  conservative  fix  to  prevent this particular 
  669.  
  670. problem from recurring is to modify clause (a) of the  definition 
  671.  
  672. of  LATER  so  that  the  "<="  is replaced by "<" (strictly less 
  673.  
  674. than).  We will implement this fix, but it cannot  be  guaranteed 
  675.  
  676. that no related problems will ever arise. 
  677.  
  678.       What  is  really  needed  is  not some particular fix to the 
  679.  
  680. routing algorithm, but a more general fix.  In  some  sense,  the 
  681.  
  682. problem  we  saw  was  not really a routing problem.  The routing 
  683.  
  684. code was working correctly, and the routes  that  were  generated 
  685.  
  686. were correct and consistent.  The real problem is that a freakish 
  687.  
  688. hardware  malfunction caused a high priority process to run wild, 
  689.  
  690. devouring resources needed by other processes, thereby making the 
  691.  
  692. network unusable.  The fact that the wild process was the routing 
  693.  
  694. process is incidental.  In  designing  the  routing  process,  we 
  695.  
  696. carefully  considered the amount of resource utilization it would 
  697.  
  698. require.  By strictly controlling and limiting the rate at  which 
  699.  
  700. updates  can  be  generated, we tried to prevent any situation in 
  701.  
  702. which the routing process would make  excessive  demands  on  the 
  703.  
  704. system.   As  we  have  seen  though, even our carefully designed 
  705.  
  706. mechanisms were unable to protect against every possible sort  of 
  707.  
  708. hardware  failure.  We need a better means of detecting that some 
  709.  
  710.                               - 13 - 
  711.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  712.  
  713. high priority process in the IMP, despite all the  safeguards  we 
  714.  
  715. have  built in, is still consuming too many resources.  Once this 
  716.  
  717. is  detected,  the  IMP  can  be  automatically  placed  in   its 
  718.  
  719. loader/dumper.  In the case under discussion, we would have liked 
  720.  
  721. to  have  all  the  IMPs  go  into  their loader/dumpers when the 
  722.  
  723. problem arose.  This would have enabled us to  re-initialize  and 
  724.  
  725. restart  all  the  IMPs  much more quickly.  (Although restarting 
  726.  
  727. individual  IMPs  did  little  good,  restarting  all  the   IMPs 
  728.  
  729. simultaneously would have cleared up the problem instantly, since 
  730.  
  731. all  routing  tables  in  all  IMPs  would  have been initialized 
  732.  
  733. simultaneously.)  It took us no more than an hour to  figure  out 
  734.  
  735. how  to  restore  the  network;  several  additional  hours  were 
  736.  
  737. required because it took so long for us to gain  control  of  the 
  738.  
  739. misbehaving  IMPs  and  get  them  back  to  normal.   A built-in 
  740.  
  741. software alarm system (assuming,  of  course,  that  it  was  not 
  742.  
  743. subject  to  false  alarms)  might have enabled us to restore the 
  744.  
  745. network more quickly, significantly reducing the duration of  the 
  746.  
  747. outage.   This  is  not  to  say  that a better alarm and control 
  748.  
  749. system could ever be a replacement for careful study  and  design 
  750.  
  751. which   attempts   to  properly  distribute  the  utilization  of 
  752.  
  753. important resources, but only that it is a necessary adjunct,  to 
  754.  
  755. handle  the cases that will inevitably fall between the cracks of 
  756.  
  757. even the most careful design. 
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.                              - 14 - 
  766.  RFC 789                              Bolt Beranek and Newman Inc.                                                     Eric C. Rosen 
  767.  
  768.                            REFERENCES 
  769.  
  770.  
  771.  
  772. "The New Routing Algorithm for the ARPANET," IEEE TRANSACTIONS ON 
  773.  
  774. COMMUNICATIONS, May 1980, J.M. McQuillan, I. Richer, E.C.  Rosen. 
  775.  
  776.  "The  Updating  Protocol  of  ARPANET's  New  Routing Algorithm," 
  777.  
  778. COMPUTER NETWORKS, February 1980, E.C. Rosen. 
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.                               - 15 - 
  819.  
  820.