home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 800s / rfc827.txt < prev    next >
Text File  |  1991-10-16  |  66KB  |  2,669 lines

  1.                                                                RFC 827
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                       EXTERIOR GATEWAY PROTOCOL (EGP)
  27.  
  28.  
  29.                                Eric C. Rosen
  30.  
  31.  
  32.                        Bolt Beranek and Newman Inc.
  33.  
  34.  
  35.                                October 1982
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. It is proposed to establish a standard for Gateway to Gateway procedures
  49. that allow the Gateways to be mutually suspicious.  This document is a
  50. DRAFT for that standard.  Your comments are strongly encouraged.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.      RFC 827                              Bolt Beranek and Newman Inc.
  60.                                                          Eric C. Rosen
  61.  
  62.  
  63.  
  64.                              Table of Contents
  65.  
  66.  
  67.  
  68.  
  69.      1   INTRODUCTION.......................................... 1
  70.      2   NEIGHBOR ACQUISITION.................................. 8
  71.      3   NEIGHBOR REACHABILITY PROTOCOL....................... 11
  72.      4   NETWORK REACHABILITY (NR) MESSAGE.................... 15
  73.      5   POLLING FOR NR MESSAGES.............................. 22
  74.      6   SENDING NR MESSAGES.................................. 25
  75.      7   INDIRECT NEIGHBORS................................... 27
  76.      8   HOW TO BE A STUB GATEWAY............................. 28
  77.      9   LIMITATIONS.......................................... 32
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.                                    - i -
  113.  
  114.  
  115.  
  116.  
  117.      RFC 827                              Bolt Beranek and Newman Inc.
  118.                                                          Eric C. Rosen
  119.  
  120.  
  121.  
  122.      1  INTRODUCTION
  123.  
  124.  
  125.           The DARPA Catenet is expected to be a continuously expanding
  126.  
  127.      system,  with  more  and  more  hosts  on  more and more networks
  128.  
  129.      participating in it.  Of course, this will require more and  more
  130.  
  131.      gateways.   In  the  past,  such  expansion  has taken place in a
  132.  
  133.      relatively unstructured manner.  New gateways,  often  containing
  134.  
  135.      radically different software than the existing gateways, would be
  136.  
  137.      added and would immediately begin  participating  in  the  common
  138.  
  139.      routing algorithm via the GGP protocol.  However, as the internet
  140.  
  141.      grows larger and larger, this simple method of expansion  becomes
  142.  
  143.      less and less feasible.  There are a number of reasons for this:
  144.  
  145.  
  146.           - the overhead of the routing algorithm becomes  excessively
  147.  
  148.             large;
  149.  
  150.  
  151.           - the  proliferation   of   radically   different   gateways
  152.  
  153.             participating  in  a single common routing algorithm makes
  154.  
  155.             maintenance and fault isolation nearly  impossible,  since
  156.  
  157.             it  becomes  impossible  to  regard  the  internet  as  an
  158.  
  159.             integrated communications system;
  160.  
  161.  
  162.           - the  gateway  software  and  algorithms,  especially   the
  163.  
  164.             routing  algorithm, become too rigid and inflexible, since
  165.  
  166.             any proposed change must be made  in  too  many  different
  167.  
  168.             places and by too many different people.
  169.  
  170.  
  171.  
  172.                                    - 1 -
  173.  
  174.  
  175.      RFC 827                              Bolt Beranek and Newman Inc.
  176.                                                          Eric C. Rosen
  177.  
  178.  
  179.  
  180.           In the future, the internet is expected to evolve into a set
  181.  
  182.      of  separate  domains  or  "autonomous  systems",  each  of which
  183.  
  184.      consists of a set of one or more relatively homogeneous gateways.
  185.  
  186.      The  protocols,  and  in  particular  the routing algorithm which
  187.  
  188.      these gateways use among themselves, will be  a  private  matter,
  189.  
  190.      and  need never be implemented in gateways outside the particular
  191.  
  192.      domain or system.
  193.  
  194.  
  195.           In the simplest case, an autonomous system might consist  of
  196.  
  197.      just a single gateway connecting, for example, a local network to
  198.  
  199.      the ARPANET.  Such a gateway might be called  a  "stub  gateway",
  200.  
  201.      since  its  only purpose is to interface the local network to the
  202.  
  203.      rest of the internet, and it is  not  intended  to  be  used  for
  204.  
  205.      handling  any traffic which neither originated in nor is destined
  206.  
  207.      for that particular local network.  In the near-term  future,  we
  208.  
  209.      will  begin  to  think  of  the  internet  as a set of autonomous
  210.  
  211.      systems, one of which consists of the DARPA gateways  on  ARPANET
  212.  
  213.      and  SATNET,  and  the others of which are stub gateways to local
  214.  
  215.      networks.   The former system, which we  shall  call  the  "core"
  216.  
  217.      system,  will be used as a transport or "long-haul" system by the
  218.  
  219.      latter systems.
  220.  
  221.  
  222.           Ultimately, however, the internet may consist of a number of
  223.  
  224.      co-equal  autonomous  systems,  any  of  which  may be used (with
  225.  
  226.      certain  restrictions  which  will  be  discussed  later)  as   a
  227.  
  228.  
  229.  
  230.                                    - 2 -
  231.  
  232.  
  233.      RFC 827                              Bolt Beranek and Newman Inc.
  234.                                                          Eric C. Rosen
  235.  
  236.  
  237.  
  238.      transport  medium  for  traffic  originating  in  any  system and
  239.  
  240.      destined for any system.  When this  more  complex  configuration
  241.  
  242.      comes  into  being,  it  will  be inappropriate to regard any one
  243.  
  244.      autonomous  system  as  a  "core"  system.   For  the   sake   of
  245.  
  246.      concreteness, however, and because the initial implementations of
  247.  
  248.      the Exterior Gateway Protocol are expected to focus  on  the  the
  249.  
  250.      case  of  connecting  "stub  gateways"  to  the DARPA gateways on
  251.  
  252.      ARPANET and SATNET, we will often use the term "core" gateways in
  253.  
  254.      our examples and discussion.
  255.  
  256.  
  257.           The purpose of the Exterior Gateway  Protocol  (EGP)  is  to
  258.  
  259.      enable  one  or  more  autonomous systems to be used as transport
  260.  
  261.      media for traffic originating in some other autonomous system and
  262.  
  263.      destined  for yet another, while allowing the end-user to see the
  264.  
  265.      composite of all the autonomous systems  as  a  single  internet,
  266.  
  267.      with  a  flat, uniform address space.  The route which a datagram
  268.  
  269.      takes through the internet, and the number of autonomous  systems
  270.  
  271.      which  it  traverses,  are  to  be  transparent  to  the end-user
  272.  
  273.      (unless, of course, the end-user makes  use  of  the  IP  "source
  274.  
  275.      route" option).
  276.  
  277.  
  278.           In  describing  the  Exterior  Gateway  Protocol,  we   have
  279.  
  280.      deliberately  left  a great deal of latitude to the designers and
  281.  
  282.      implementers of particular autonomous systems, particularly  with
  283.  
  284.      regard to timer values.  We have done this because we expect that
  285.  
  286.  
  287.  
  288.                                    - 3 -
  289.  
  290.  
  291.      RFC 827                              Bolt Beranek and Newman Inc.
  292.                                                          Eric C. Rosen
  293.  
  294.  
  295.  
  296.      different  gateway   implementations   and   different   internet
  297.  
  298.      environments  may  just have different requirements and goals, so
  299.  
  300.      that no single strict implementation specification could apply to
  301.  
  302.      all.   However,  this does NOT mean that ANY implementation which
  303.  
  304.      conforms to the specification will work well, or that  the  areas
  305.  
  306.      in  which  we  have left latitude are not crucial to performance.
  307.  
  308.      The fact that some time-out value, for example, is not  specified
  309.  
  310.      here does not mean that everything will work no matter what value
  311.  
  312.      is assigned.
  313.  
  314.  
  315.           Autonomous systems will be  assigned  16-bit  identification
  316.  
  317.      numbers  (in  much  the same ways as network and protocol numbers
  318.  
  319.      are now assigned), and every EGP message header contains one word
  320.  
  321.      for  this  number.   Zero  will not be assigned to any autonomous
  322.  
  323.      system; rather, the  presence  of  a  zero  in  this  field  will
  324.  
  325.      indicate that no number is present.
  326.  
  327.  
  328.           We need to introduce the concept  of  one  gateway  being  a
  329.  
  330.      NEIGHBOR  of  another.   In the simplest and most common case, we
  331.  
  332.      call two gateways "neighbors" if there is a network to which each
  333.  
  334.      has  an interface.  However, we will need a somewhat more general
  335.  
  336.      notion of "neighbor" to allow the following two cases:
  337.  
  338.  
  339.           a) Two gateways may be regarded as  neighbors  if  they  are
  340.  
  341.              directly  connected  not by a network (in the usual sense
  342.  
  343.  
  344.  
  345.  
  346.                                    - 4 -
  347.  
  348.  
  349.      RFC 827                              Bolt Beranek and Newman Inc.
  350.                                                          Eric C. Rosen
  351.  
  352.  
  353.  
  354.              of the term), but by a simple wire, or HDLC line, or some
  355.  
  356.              similar means of "direct connection".
  357.  
  358.  
  359.           b) Two gateways may be regarded as  neighbors  if  they  are
  360.  
  361.              connected  by an "internet" which is transparent to them.
  362.  
  363.              That is, we would  like  to  be  able  to  say  that  two
  364.  
  365.              gateways  are  neighbors even if they are connected by an
  366.  
  367.              internet, as long as the gateways utilize no knowledge of
  368.  
  369.              the  internal  structure  of  that  internet in their own
  370.  
  371.              packet-forwarding algorithms.
  372.  
  373.  
  374.      In order to handle all these cases, let us say that two  gateways
  375.  
  376.      are NEIGHBORS if they are connected by some communications medium
  377.  
  378.      whose internal structure is transparent to them.   (See  IEN  184
  379.  
  380.      for a more general discussion of this notion of neighbor.)
  381.  
  382.  
  383.           If two neighbors are part of the same autonomous system,  we
  384.  
  385.      call  them  INTERIOR  NEIGHBORS; if two neighbors are not part of
  386.  
  387.      the same autonomous system, we call them EXTERIOR NEIGHBORS.   In
  388.  
  389.      order  for  one  system  to  use  another  as a transport medium,
  390.  
  391.      gateways which are exterior neighbors of each other must be  able
  392.  
  393.      to find out which networks can be reached through the other.  The
  394.  
  395.      Exterior Gateway Protocol enables this information to  be  passed
  396.  
  397.      between  exterior  neighbors.  Since it is a polling protocol, it
  398.  
  399.      also enables each gateway to control the rate at which  it  sends
  400.  
  401.  
  402.  
  403.  
  404.                                    - 5 -
  405.  
  406.  
  407.      RFC 827                              Bolt Beranek and Newman Inc.
  408.                                                          Eric C. Rosen
  409.  
  410.  
  411.  
  412.      and  receives  network  reachability  information,  allowing each
  413.  
  414.      system to control its own overhead.  It also enables each  system
  415.  
  416.      to  have  an independent routing algorithm whose operation cannot
  417.  
  418.      be disrupted by failures of other systems.
  419.  
  420.  
  421.           It must be clearly understood that any autonomous system  in
  422.  
  423.      which  routing  needs  to be performed among gateways within that
  424.  
  425.      system must implement its  own  routing  algorithm.   (A  routing
  426.  
  427.      algorithm  is  not  generally  necessary  for a simple autonomous
  428.  
  429.      system which consists of a single stub  gateway.)   The  Exterior
  430.  
  431.      Gateway Protocol is NOT a routing algorithm.  It enables exterior
  432.  
  433.      neighbors to exchange information which is likely to be needed by
  434.  
  435.      any  routing algorithm, but it does NOT specify what the gateways
  436.  
  437.      are to do with this information.  The "routing updates"  of  some
  438.  
  439.      autonomous  system's interior routing algorithm may or may not be
  440.  
  441.      similar in  format  to  the  messages  of  the  exterior  gateway
  442.  
  443.      protocol.  The gateways in the DARPA "core" system will initially
  444.  
  445.      use the GGP protocol (the old Gateway-Gateway protocol) as  their
  446.  
  447.      routing  algorithm, but this will be subject to change.  Gateways
  448.  
  449.      in other autonomous systems may use their  own  Interior  Gateway
  450.  
  451.      Protocols  (IGPs),  which may or may not be similar to the IGP of
  452.  
  453.      any other autonomous system.  They may, of course, use  GGP,  but
  454.  
  455.      will  not  be permitted to exchange GGP messages with gateways in
  456.  
  457.      other autonomous systems.
  458.  
  459.  
  460.  
  461.  
  462.                                    - 6 -
  463.  
  464.  
  465.      RFC 827                              Bolt Beranek and Newman Inc.
  466.                                                          Eric C. Rosen
  467.  
  468.  
  469.  
  470.           It must also be clearly understood that the Exterior Gateway
  471.  
  472.      Protocol  is  NOT  intended to provide information which could be
  473.  
  474.      used as input  to  a  completely  general  area  or  hierarchical
  475.  
  476.      routing  algorithm.   It  is  intended  for  a  set of autonomous
  477.  
  478.      systems which are connected in a tree, with no cycles.   It  does
  479.  
  480.      not  enable  the  passing  of  sufficient  information to prevent
  481.  
  482.      routing loops if cycles in the topology do exist.
  483.  
  484.  
  485.           The Exterior Gateway Protocol has three parts: (a)  Neighbor
  486.  
  487.      Acquisition Protocol, (b) Neighbor Reachability Protocol, and (c)
  488.  
  489.      Network  Reachability  determination.   Note  that  all  messages
  490.  
  491.      defined  by EGP are intended to travel only a single "hop".  That
  492.  
  493.      is, they originate at one gateway and are sent to  a  neighboring
  494.  
  495.      gateway   without  the  mediation  of  any  intervening  gateway.
  496.  
  497.      Therefore, the time-to-live field should be set to a  very  small
  498.  
  499.      value.   Gateways  which  encounter EGP messages in their message
  500.  
  501.      streams which are not addressed to them may discard them.
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.                                    - 7 -
  521.  
  522.  
  523.      RFC 827                              Bolt Beranek and Newman Inc.
  524.                                                          Eric C. Rosen
  525.  
  526.  
  527.  
  528.      2  NEIGHBOR ACQUISITION
  529.  
  530.  
  531.           Before it is possible to obtain routing information from  an
  532.  
  533.      exterior  gateway,  it  is necessary to acquire that gateway as a
  534.  
  535.      direct neighbor.  (The distinction between  direct  and  indirect
  536.  
  537.      neighbors  will  be  made  in a later section.)  In order for two
  538.  
  539.      gateways to become direct neighbors, they must be  neighbors,  in
  540.  
  541.      the  sense  defined  above,  and  they  must execute the NEIGHBOR
  542.  
  543.      ACQUISITION  PROTOCOL,  which  is  simply  a  standard  three-way
  544.  
  545.      handshake.
  546.  
  547.  
  548.           A gateway that wishes to initiate neighbor acquisition  with
  549.  
  550.      another  sends  it  a Neighbor Acquisition Request.  This message
  551.  
  552.      should be repeatedly transmitted (at a reasonable  rate,  perhaps
  553.  
  554.      once  every  30 seconds or so) until a Neighbor Acquisition Reply
  555.  
  556.      is received.  The Request will contain an  identification  number
  557.  
  558.      which  is  copied into the reply so that request and reply can be
  559.  
  560.      matched up.
  561.  
  562.  
  563.           A gateway receiving  a  Neighbor  Acquisition  Request  must
  564.  
  565.      determine  whether  it  wishes to become a direct neighbor of the
  566.  
  567.      source of the Request.  If not, it may, at  its  option,  respond
  568.  
  569.      with   a   Neighbor   Acquisition   Refusal  message,  optionally
  570.  
  571.      specifying the reason for refusal.  Otherwise, it should  send  a
  572.  
  573.      Neighbor Acquisition Reply message.  It must also send a Neighbor
  574.  
  575.  
  576.  
  577.  
  578.                                    - 8 -
  579.  
  580.  
  581.      RFC 827                              Bolt Beranek and Newman Inc.
  582.                                                          Eric C. Rosen
  583.  
  584.  
  585.  
  586.      Acquisition Request message, unless it has done so already.
  587.  
  588.  
  589.           Two gateways become direct neighbors when each  has  sent  a
  590.  
  591.      Neighbor  Acquisition  Message to, and received the corresponding
  592.  
  593.      Neighbor Acquisition Reply from, the other.
  594.  
  595.  
  596.           Unmatched Replies or Refusals should be  discarded  after  a
  597.  
  598.      reasonable  period  of time.  However, information about any such
  599.  
  600.      unmatched messages may be useful for diagnostic purposes.
  601.  
  602.  
  603.           A Neighbor Acquisition  Message  from  a  gateway  which  is
  604.  
  605.      already a direct neighbor should be responded to with a Reply and
  606.  
  607.      a Neighbor Acquisition Message.
  608.  
  609.  
  610.           If  a  Neighbor  Acquisition  Reply  is  received   from   a
  611.  
  612.      prospective neighbor, but a period of time passes during which no
  613.  
  614.      Neighbor Acquisition Message is received  from  that  prospective
  615.  
  616.      neighbor,  the  neighbor  acquisition  protocol  shall  be deemed
  617.  
  618.      incomplete.  A Neighbor Cease message (see below) should then  be
  619.  
  620.      sent.   If  one  gateway  still desires to acquire the other as a
  621.  
  622.      neighbor, the protocol must be repeated from the beginning.
  623.  
  624.  
  625.           If  a  gateway  wishes  to  cease  being  a  neighbor  of  a
  626.  
  627.      particular  exterior  gateway, it sends a Neighbor Cease message.
  628.  
  629.      A gateway  receiving  a  Neighbor  Cease  message  should  always
  630.  
  631.      respond with a Neighbor Cease Acknowledgment.  It should cease to
  632.  
  633.  
  634.  
  635.  
  636.                                    - 9 -
  637.  
  638.  
  639.      RFC 827                              Bolt Beranek and Newman Inc.
  640.                                                          Eric C. Rosen
  641.  
  642.  
  643.  
  644.      treat the sender of the message as a neighbor in any way.   Since
  645.  
  646.      there  is  a  significant  amount  of protocol run between direct
  647.  
  648.      neighbors (see below), if some gateway no longer needs  to  be  a
  649.  
  650.      direct  neighbor  of  some other, it is "polite" to indicate this
  651.  
  652.      fact with a Neighbor Cease Message.  The Neighbor  Cease  Message
  653.  
  654.      should  be  retransmitted  (up  to some number of times) until an
  655.  
  656.      acknowledgment for it is received.
  657.  
  658.  
  659.           Once  a  Neighbor  Cease  message  has  been  received,  the
  660.  
  661.      Neighbor   Reachability  Protocol  (below)  should  cease  to  be
  662.  
  663.      executed.
  664.  
  665.  
  666.           NOTE THAT WE HAVE NOT SPECIFIED THE WAY IN WHICH ONE GATEWAY
  667.  
  668.      INITIALLY  DECIDES THAT IT WANTS TO BECOME A NEIGHBOR OF ANOTHER.
  669.  
  670.      While this is hardly a trivial problem, it is  not  part  of  the
  671.  
  672.      External Gateway Protocol.
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.                                   - 10 -
  695.  
  696.  
  697.      RFC 827                              Bolt Beranek and Newman Inc.
  698.                                                          Eric C. Rosen
  699.  
  700.  
  701.  
  702.      3  NEIGHBOR REACHABILITY PROTOCOL
  703.  
  704.  
  705.           It is important for a gateway to keep real-time  information
  706.  
  707.      as  to the reachability of its neighbors.  If a gateway concludes
  708.  
  709.      that a particular neighbor cannot be  reached,  it  should  cease
  710.  
  711.      forwarding  traffic to that gateway.  To make that determination,
  712.  
  713.      a NEIGHBOR REACHABILITY protocol is  needed.   The  EGP  protocol
  714.  
  715.      provides two messages types for this purpose -- a "Hello" message
  716.  
  717.      and an "I Heard You" message.
  718.  
  719.  
  720.           When a "Hello" message is received from a  direct  neighbor,
  721.  
  722.      an "I Heard You" must be returned to that neighbor "immediately".
  723.  
  724.      The delay between receiving a "Hello" and returning an  "I  Heard
  725.  
  726.      You" should never be more than a few seconds.
  727.  
  728.  
  729.           At  the  current  time,   the   reachability   determination
  730.  
  731.      algorithm  is  left to the designers of a particular gateway.  We
  732.  
  733.      have in mind algorithms like the following:
  734.  
  735.  
  736.           A reachable  neighbor  shall  be  declared  unreachable  if,
  737.  
  738.      during the time in which we sent our last n "Hello"s, we received
  739.  
  740.      fewer than k "I Heard You"s in return.  An  unreachable  neighbor
  741.  
  742.      shall  be declared reachable if, during the time in which we sent
  743.  
  744.      our last m "Hello"s, we received at least j  "I  Heard  You"s  in
  745.  
  746.      return.
  747.  
  748.  
  749.  
  750.  
  751.  
  752.                                   - 11 -
  753.  
  754.  
  755.      RFC 827                              Bolt Beranek and Newman Inc.
  756.                                                          Eric C. Rosen
  757.  
  758.  
  759.  
  760.           However, the frequency with which the "Hello"s are sent, and
  761.  
  762.      the  values  of the parameters k, n, j, and m cannot be specified
  763.  
  764.      here.  For best results, this will depend on the  characteristics
  765.  
  766.      of  the  neighbor  and of the network which the neighbors have in
  767.  
  768.      common.  THIS IMPLIES THAT THE PROPER PARAMETERS MAY NEED  TO  BE
  769.  
  770.      DETERMINED  JOINTLY  BY THE DESIGNERS AND IMPLEMENTERS OF THE TWO
  771.  
  772.      NEIGHBORING  GATEWAYS;  choosing  algorithms  and  parameters  in
  773.  
  774.      isolation,   without   considering  the  characteristics  of  the
  775.  
  776.      neighbor and the connecting network, would  not  be  expected  to
  777.  
  778.      result in optimum reachability determinations.
  779.  
  780.  
  781.           The "Hello" and "I Heard You" messages have a  status  field
  782.  
  783.      which  the sending gateway uses to indicate whether it thinks the
  784.  
  785.      receiving gateway is reachable or not.  This information  can  be
  786.  
  787.      useful  for  diagnostic  purposes.  It also allows one gateway to
  788.  
  789.      make its reachability determination parasitic on the other:  only
  790.  
  791.      one  gateway  actually  needs  to  send "Hello" messages, and the
  792.  
  793.      other can declare it up or down based on the status field in  the
  794.  
  795.      "Hello".   That  is,  the  "passive" gateway (which sends only "I
  796.  
  797.      Heard  You"s)  declares  the  "active"  one  (which  sends   only
  798.  
  799.      "Hello"s)  to  be reachable when the "Hello"s from the active one
  800.  
  801.      indicate that it has declared the passive one  to  be  reachable.
  802.  
  803.      Of  course,  this can only work if there is prior agreement as to
  804.  
  805.      which neighbor is to be the active one.  (Ways of coming to  this
  806.  
  807.  
  808.  
  809.  
  810.                                   - 12 -
  811.  
  812.  
  813.      RFC 827                              Bolt Beranek and Newman Inc.
  814.                                                          Eric C. Rosen
  815.  
  816.  
  817.  
  818.      "prior agreement" are not part of the Exterior Gateway Protocol.)
  819.  
  820.  
  821.           A  direct  neighbor  gateway   should   also   be   declared
  822.  
  823.      unreachable  if  the  network  connecting it supplies lower level
  824.  
  825.      protocol information from which this can be deduced.   Thus,  for
  826.  
  827.      example,  if  a gateway receives an 1822 Destination Dead message
  828.  
  829.      from the ARPANET which indicates that a direct neighbor is  dead,
  830.  
  831.      it should declare that neighbor unreachable.  The neighbor should
  832.  
  833.      not be declared reachable again until  the  requisite  number  of
  834.  
  835.      Hello/I-Heard-You packets have been exchanged.
  836.  
  837.  
  838.           A direct neighbor which  has  become  unreachable  does  not
  839.  
  840.      thereby  cease  to  be  a  direct  neighbor.  The neighbor can be
  841.  
  842.      declared reachable again without  any  need  to  go  through  the
  843.  
  844.      neighbor  acquisition  protocol  again.  However, if the neighbor
  845.  
  846.      remains unreachable for an extremely long period of time, such as
  847.  
  848.      an  hour,  the  gateway  should  cease to treat it as a neighbor,
  849.  
  850.      i.e., should cease sending Hello messages to  it.   The  neighbor
  851.  
  852.      acquisition  protocol  would  then  need to be repeated before it
  853.  
  854.      could become a direct neighbor again.
  855.  
  856.  
  857.           "Hello" and "I Heard You" messages from gateway G to gateway
  858.  
  859.      G'  also  carry  the identification number of the NR poll message
  860.  
  861.      (see below) which G has most recently received from G'.
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.                                   - 13 -
  869.  
  870.  
  871.      RFC 827                              Bolt Beranek and Newman Inc.
  872.                                                          Eric C. Rosen
  873.  
  874.  
  875.  
  876.           "Hello" and "I Heard You" messages from gateway G to gateway
  877.  
  878.      G'  also  carry  the  minimum interval in minutes with which G is
  879.  
  880.      willing to be polled by G' for NR messages (see below).
  881.  
  882.  
  883.           "Hello" messages from sources other  than  direct  neighbors
  884.  
  885.      should  simply  be ignored.  However, logging the presence of any
  886.  
  887.      such messages might provide useful diagnostic information.
  888.  
  889.  
  890.           A gateway which is going down, or  whose  interface  to  the
  891.  
  892.      network which connects it to a particular neighbor is going down,
  893.  
  894.      should send a Gateway Going Down message to all direct  neighbors
  895.  
  896.      which  will  no longer be able to reach it.  It should retransmit
  897.  
  898.      that message (up to some number of times)  until  it  receives  a
  899.  
  900.      Gateway  Going  Down Acknowledgment.  This provides the neighbors
  901.  
  902.      with an advance warning of an outage, and enables them to prepare
  903.  
  904.      for  it  in  a  way  which  will  minimize disruption to existing
  905.  
  906.      traffic.
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.                                   - 14 -
  927.  
  928.  
  929.      RFC 827                              Bolt Beranek and Newman Inc.
  930.                                                          Eric C. Rosen
  931.  
  932.  
  933.  
  934.      4  NETWORK REACHABILITY (NR) MESSAGE
  935.  
  936.  
  937.           Terminology: Let gateway G have an interface to  network  N.
  938.  
  939.      We  say  that G is AN APPROPRIATE FIRST HOP to network M relative
  940.  
  941.      to network N (where M and N are distinct networks) if and only if
  942.  
  943.      the following condition holds:
  944.  
  945.  
  946.           Traffic which is destined for network M, and  which  arrives
  947.  
  948.           at gateway G over its network N interface, will be forwarded
  949.  
  950.           to M by G over a path  which  does  not  include  any  other
  951.  
  952.           gateway with an interface to network N.
  953.  
  954.  
  955.           In short, G is  an  appropriate  first  hop  for  network  M
  956.  
  957.      relative  to network N just in case there is no better gateway on
  958.  
  959.      network N through which to route traffic which  is  destined  for
  960.  
  961.      network  M.   For  optimal routing, traffic in network N which is
  962.  
  963.      destined for network M ought always to be forwarded to a  gateway
  964.  
  965.      which is an appropriate first hop.
  966.  
  967.  
  968.           In  order  for  exterior  neighbors  G  and  G'  (which  are
  969.  
  970.      neighbors  over network N) to be able to use each other as packet
  971.  
  972.      switches for forwarding traffic to remote networks, each needs to
  973.  
  974.      know  the  list of networks for which the other is an appropriate
  975.  
  976.      first hop.  The Exterior  Gateway  Protocol  defines  a  message,
  977.  
  978.      called  the  Network  Reachability  Message  (or NR message), for
  979.  
  980.      transferring this information.
  981.  
  982.  
  983.  
  984.                                   - 15 -
  985.  
  986.  
  987.      RFC 827                              Bolt Beranek and Newman Inc.
  988.                                                          Eric C. Rosen
  989.  
  990.  
  991.  
  992.           Let G be a gateway on network N.  Then the NR message  which
  993.  
  994.      G sends about network N must contain the following information:
  995.  
  996.  
  997.           A list of all the networks for which  G  is  an  appropriate
  998.  
  999.           first hop relative to network N.
  1000.  
  1001.  
  1002.      If G' can obtain this information from exterior neighbor G,  then
  1003.  
  1004.      it  knows  that no traffic destined for networks which are NOT in
  1005.  
  1006.      that list should be forwarded to G.  (It cannot simply  conclude,
  1007.  
  1008.      however,  that all traffic for any networks in that list ought to
  1009.  
  1010.      be forwarded via G, since G' may also have other neighbors  which
  1011.  
  1012.      are also appropriate first hops to network N.  For example, G and
  1013.  
  1014.      G'' might each be neighbors of G',  but  might  be  "equidistant"
  1015.  
  1016.      from  some  network  M.   Then each could be an appropriate first
  1017.  
  1018.      hop.)
  1019.  
  1020.  
  1021.           For each network in the list, the NR message also contains a
  1022.  
  1023.      byte  which  specifies  the  "distance" (according to some metric
  1024.  
  1025.      whose definition is left  to  the  designers  of  the  autonomous
  1026.  
  1027.      system  of  which  gateway G is a member) from G to that network.
  1028.  
  1029.      This information might (or might not) be useful in  the  interior
  1030.  
  1031.      routing algorithm of gateway G', or for diagnostic purposes.
  1032.  
  1033.  
  1034.           The maximum value of distance (255.) shall be taken to  mean
  1035.  
  1036.      that  the network is UNREACHABLE.  ALL OTHER VALUES WILL BE TAKEN
  1037.  
  1038.      TO MEAN THAT THE NETWORK IS REACHABLE.
  1039.  
  1040.  
  1041.  
  1042.                                   - 16 -
  1043.  
  1044.  
  1045.      RFC 827                              Bolt Beranek and Newman Inc.
  1046.                                                          Eric C. Rosen
  1047.  
  1048.  
  1049.  
  1050.           If an NR message from some gateway G fails to  mention  some
  1051.  
  1052.      network  N which was mentioned in the previous NR message from G,
  1053.  
  1054.      it shall be assumed that N is still reachable from  G.   HOWEVER,
  1055.  
  1056.      IF  N IS NOT MENTIONED IN TWO SUCCESSIVE NR MESSAGES FROM G, THAT
  1057.  
  1058.      SHALL BE TAKEN TO MEAN THAT N IS  NO  LONGER  REACHABLE  FROM  G.
  1059.  
  1060.      This  procedure is necessary to ensure that networks which can no
  1061.  
  1062.      longer be  reached,  but  which  are  never  explicitly  declared
  1063.  
  1064.      unreachable, are timed out and removed from the list of reachable
  1065.  
  1066.      networks.
  1067.  
  1068.  
  1069.           It may often be the case that where G and  G'  are  exterior
  1070.  
  1071.      neighbors on network N, G knows of many more gateway neighbors on
  1072.  
  1073.      network N, and knows for which networks those other neighbors are
  1074.  
  1075.      the appropriate first hop.  Since G' may not know about all these
  1076.  
  1077.      other neighbors, it is convenient and often more efficient for it
  1078.  
  1079.      to be able to obtain this information from G.  Therefore, the EGP
  1080.  
  1081.      NR message also contains fields which  allow  G  to  specify  the
  1082.  
  1083.      following information:
  1084.  
  1085.  
  1086.           a) A list of all neighbors (both interior and exterior) of G
  1087.  
  1088.              (on  network  N)  which  G  has reliably determined to be
  1089.  
  1090.              reachable.  Gateways should be included in this list only
  1091.  
  1092.              if  G  is  actively  running  its  neighbor  reachability
  1093.  
  1094.              protocol with them.
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                                   - 17 -
  1101.  
  1102.  
  1103.      RFC 827                              Bolt Beranek and Newman Inc.
  1104.                                                          Eric C. Rosen
  1105.  
  1106.  
  1107.  
  1108.           b) For each of those neighbors, the  list  of  networks  for
  1109.  
  1110.              which that neighbor is an appropriate first hop (relative
  1111.  
  1112.              to network N).
  1113.  
  1114.  
  1115.           c) For each such <neighbor, network>  pair,  the  "distance"
  1116.  
  1117.              from that neighbor to that network.
  1118.  
  1119.  
  1120.           Thus the NR message provides a means of allowing  a  gateway
  1121.  
  1122.      to  "discover" new neighbors by seeing whether a neighbor that it
  1123.  
  1124.      already knows  of  has  any  additional  neighbors  on  the  same
  1125.  
  1126.      network.  This information also makes possible the implementation
  1127.  
  1128.      of the INDIRECT NEIGHBOR strategy defined below.
  1129.  
  1130.  
  1131.           A  more  precise  description  of  the  NR  message  is  the
  1132.  
  1133.      following.
  1134.  
  1135.  
  1136.           The data portion of the  message  will  consist  largely  of
  1137.  
  1138.      blocks  of data.  Each block will be headed by a gateway address,
  1139.  
  1140.      which will be the address  either  of  the  gateway  sending  the
  1141.  
  1142.      message  or  of  one  of  that gateway's neighbors.  Each gateway
  1143.  
  1144.      address will be followed by a list of the networks for which that
  1145.  
  1146.      gateway  is  an appropriate first hop, and the distance from that
  1147.  
  1148.      gateway to each network.
  1149.  
  1150.  
  1151.           Preceding the list of data blocks is:
  1152.  
  1153.           a) The address of the network which this message  is  about.
  1154.  
  1155.  
  1156.  
  1157.  
  1158.                                   - 18 -
  1159.  
  1160.  
  1161.      RFC 827                              Bolt Beranek and Newman Inc.
  1162.                                                          Eric C. Rosen
  1163.  
  1164.  
  1165.  
  1166.              If  G  and  G' are neighbors on network N, then in the NR
  1167.  
  1168.              message going from G  to  G',  this  is  the  address  of
  1169.  
  1170.              network   N.   For  convenience,  four  bytes  have  been
  1171.  
  1172.              allocated for this address -- the trailing one,  two,  or
  1173.  
  1174.              three bytes should be zero.
  1175.  
  1176.  
  1177.           b) The count (one byte) of the number of interior  neighbors
  1178.  
  1179.              of  G  for  which  this message contains data blocks.  By
  1180.  
  1181.              convention, this count will include the data block for  G
  1182.  
  1183.              itself, which should be the first one to appear.
  1184.  
  1185.  
  1186.           c) The count (one byte) of the number of exterior  neighbors
  1187.  
  1188.              of G for which this message contains data blocks.
  1189.  
  1190.  
  1191.           Then follow the data blocks themselves, first the block  for
  1192.  
  1193.      G itself, then the blocks for all the interior neighbors of G (if
  1194.  
  1195.      any), then the blocks for  the  exterior  neighbors.   Since  all
  1196.  
  1197.      gateways  mentioned  are  on  the same network, whose address has
  1198.  
  1199.      already been given, the gateway  addresses  are  given  with  the
  1200.  
  1201.      network  address part (one, two, or three bytes) omitted, to save
  1202.  
  1203.      space.
  1204.  
  1205.  
  1206.           Each block includes  a  one-byte  count  of  the  number  of
  1207.  
  1208.      networks for which that gateway is the appropriate first hop.  In
  1209.  
  1210.      the list of networks, each network address is either one, two, or
  1211.  
  1212.      three  bytes,  depending  on whether it is a class A, class B, or
  1213.  
  1214.  
  1215.  
  1216.                                   - 19 -
  1217.  
  1218.  
  1219.      RFC 827                              Bolt Beranek and Newman Inc.
  1220.                                                          Eric C. Rosen
  1221.  
  1222.  
  1223.  
  1224.      class C network.  No trailing bytes are used.
  1225.  
  1226.  
  1227.           It may sometimes be necessary to fragment  the  NR  message.
  1228.  
  1229.      The  NR  message  contains  a  byte indicating the number of this
  1230.  
  1231.      fragment (fragments will be  numbered  from  zero),  and  a  byte
  1232.  
  1233.      containing  the  number  of  the last fragment (NOT the number of
  1234.  
  1235.      fragments).  If fragmentation is not used, these bytes must  both
  1236.  
  1237.      be  zero.   EACH  FRAGMENT  MUST  BE  A  FULLY  SELF-CONTAINED NR
  1238.  
  1239.      MESSAGE.  That is, each fragment  will  begin  with  a  count  of
  1240.  
  1241.      interior  and  exterior  neighbors,  and  will have some integral
  1242.  
  1243.      number of gateway data blocks.  The number of data blocks in each
  1244.  
  1245.      fragment  must correspond to the neighbor counts at the beginning
  1246.  
  1247.      of that fragment.  However, only the first fragment should  begin
  1248.  
  1249.      with a data block describing the sending gateway.
  1250.  
  1251.  
  1252.           This  scheme  enables  each   fragment   to   be   processed
  1253.  
  1254.      independently, and requires no complex reassembly mechanisms.  It
  1255.  
  1256.      also enables processing of a message all of whose fragments  have
  1257.  
  1258.      not been received.  If, after some amount of time and some number
  1259.  
  1260.      of retransmissions  of  a  poll,  not  all  fragments  have  been
  1261.  
  1262.      received,  the  fragments which are present shall be processed as
  1263.  
  1264.      if they constituted the complete NR message.   (This  means  that
  1265.  
  1266.      networks  mentioned  only in the missing fragment will retain the
  1267.  
  1268.      "distance" values they had in the previous NR message  from  that
  1269.  
  1270.      gateway.   However,  if  no new value for a particular network is
  1271.  
  1272.  
  1273.  
  1274.                                   - 20 -
  1275.  
  1276.  
  1277.      RFC 827                              Bolt Beranek and Newman Inc.
  1278.                                                          Eric C. Rosen
  1279.  
  1280.  
  1281.  
  1282.      received in the next NR message from that  gateway,  the  network
  1283.  
  1284.      will be declared unreachable.)
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.                                   - 21 -
  1333.  
  1334.  
  1335.      RFC 827                              Bolt Beranek and Newman Inc.
  1336.                                                          Eric C. Rosen
  1337.  
  1338.  
  1339.  
  1340.      5  POLLING FOR NR MESSAGES
  1341.  
  1342.  
  1343.           No gateway is required to send  NR  messages  to  any  other
  1344.  
  1345.      gateway,  except  as  a  response  to  an  NR  Poll from a direct
  1346.  
  1347.      neighbor.  However, a gateway is required to  respond  to  an  NR
  1348.  
  1349.      Poll  from  a  direct neighbor within several seconds (subject to
  1350.  
  1351.      the qualification two paragraphs  hence),  even  if  the  gateway
  1352.  
  1353.      believes that neighbor to be down.
  1354.  
  1355.  
  1356.           The EGP NR Poll message is defined  for  this  purpose.   No
  1357.  
  1358.      gateway  may  poll another for an NR message more often than once
  1359.  
  1360.      per minute.  A gateway receiving more than one  poll  per  minute
  1361.  
  1362.      may  simply  ignore  the  excess  polls,  or  may return an error
  1363.  
  1364.      message.  The Hello and I Heard  You  messages  which  gateway  G
  1365.  
  1366.      sends  to  gateway  G' indicate the minimum interval which G will
  1367.  
  1368.      accept as the polling interval from G'.  That  is,  G'  will  not
  1369.  
  1370.      guarantee  to  respond to polls from G that arrive less than that
  1371.  
  1372.      interval apart.
  1373.  
  1374.  
  1375.           Polls must only  be  sent  to  direct  neighbors  which  are
  1376.  
  1377.      declared reachable by the neighbor reachability protocol.
  1378.  
  1379.  
  1380.           An NR Poll message contains an identification number  chosen
  1381.  
  1382.      by  the  polling  gateway.   The  polled gateway will return this
  1383.  
  1384.      number in the NR message it sends in response  to  the  poll,  to
  1385.  
  1386.      enable  the polling gateway to match up received NR messages with
  1387.  
  1388.  
  1389.  
  1390.                                   - 22 -
  1391.  
  1392.  
  1393.      RFC 827                              Bolt Beranek and Newman Inc.
  1394.                                                          Eric C. Rosen
  1395.  
  1396.  
  1397.  
  1398.      polls.  It will be the responsibility of the polling  gateway  to
  1399.  
  1400.      choose an identification number which is sufficiently "unique" to
  1401.  
  1402.      allow detection of out-of-date NR messages  which  may  still  be
  1403.  
  1404.      floating   around   the  network.   Since  polls  are  relatively
  1405.  
  1406.      infrequent, this is  not  expected  to  be  much  of  a  problem.
  1407.  
  1408.      However,  to  aid in choosing an identification number, the Hello
  1409.  
  1410.      and I Heard You messages carry the identification number  of  the
  1411.  
  1412.      last  NR  poll received from the neighbor to which they are being
  1413.  
  1414.      sent.
  1415.  
  1416.  
  1417.           In general, a poll should be retransmitted  some  number  of
  1418.  
  1419.      times  (with a reasonable interval between retransmissions) until
  1420.  
  1421.      an NR message is received.  IF NO NR MESSAGE  IS  RECEIVED  AFTER
  1422.  
  1423.      THE MAXIMUM NUMBER OF RETRANSMISSIONS, THE POLLING GATEWAY SHOULD
  1424.  
  1425.      ASSUME THAT THE POLLED GATEWAY IS NOT AN  APPROPRIATE  FIRST  HOP
  1426.  
  1427.      FOR  ANY  NETWORK  WHATSOEVER.   The  optimum  parameters for the
  1428.  
  1429.      polling/retransmission  algorithm  will  be  dependent   on   the
  1430.  
  1431.      characteristics   of   the  two  neighbors  and  of  the  network
  1432.  
  1433.      connecting them.
  1434.  
  1435.  
  1436.           If only some fragments of an NR message are  received  after
  1437.  
  1438.      the  maximum  number  of  retransmissions, the fragments that are
  1439.  
  1440.      present shall be treated as constituting  the  whole  of  the  NR
  1441.  
  1442.      message.
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                                   - 23 -
  1449.  
  1450.  
  1451.      RFC 827                              Bolt Beranek and Newman Inc.
  1452.                                                          Eric C. Rosen
  1453.  
  1454.  
  1455.  
  1456.           Received NR messages whose  identification  numbers  do  not
  1457.  
  1458.      match  the  identification  number of the most recently sent poll
  1459.  
  1460.      shall be ignored.  There is no provision for multiple outstanding
  1461.  
  1462.      polls to the same neighbor.
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.                                   - 24 -
  1507.  
  1508.  
  1509.      RFC 827                              Bolt Beranek and Newman Inc.
  1510.                                                          Eric C. Rosen
  1511.  
  1512.  
  1513.  
  1514.      6  SENDING NR MESSAGES
  1515.  
  1516.  
  1517.           In general, NR messages are to be sent only in response to a
  1518.  
  1519.      poll.   However,  between  two  successive polls from an exterior
  1520.  
  1521.      neighbor, a gateway may send one  and  only  one  unsolicited  NR
  1522.  
  1523.      message  to  that  neighbor.   This  gives  it limited ability to
  1524.  
  1525.      quickly announce  network  reachability  changes  that  may  have
  1526.  
  1527.      occurred in the interval since the last poll.  Excess unsolicited
  1528.  
  1529.      NR messages may be ignored, or an error message may be returned.
  1530.  
  1531.  
  1532.           An NR message should be sent within  several  seconds  after
  1533.  
  1534.      receipt  of  a poll.  Failure to respond in a timely manner to an
  1535.  
  1536.      NR poll may result in the polling  gateway's  deciding  that  the
  1537.  
  1538.      polled gateway is not an appropriate first hop to any network.
  1539.  
  1540.  
  1541.           NR  messages  sent  in   response   to   polls   carry   the
  1542.  
  1543.      identification    number   of   the   poll   message   in   their
  1544.  
  1545.      "identification number" fields.  Unsolicited  NR  messages  carry
  1546.  
  1547.      the identification number of the last poll received, and have the
  1548.  
  1549.      "unsolicited" bit set.  (Note that this allows for only a  single
  1550.  
  1551.      unsolicited NR message per polling period.)
  1552.  
  1553.  
  1554.           To facilitate the sending of unsolicited NR messages, the NR
  1555.  
  1556.      poll  message  has  a  byte  indicating  the  polling interval in
  1557.  
  1558.      minutes.
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.                                   - 25 -
  1565.  
  1566.  
  1567.      RFC 827                              Bolt Beranek and Newman Inc.
  1568.                                                          Eric C. Rosen
  1569.  
  1570.  
  1571.  
  1572.           Polls from  non-neighbors,  from  neighbors  which  are  not
  1573.  
  1574.      declared  reachable, or with bad IP source network fields, should
  1575.  
  1576.      be responded to with an EGP error message  with  the  appropriate
  1577.  
  1578.      "reason"  field.   If  G  sends  an  NR poll to G' with IP source
  1579.  
  1580.      network N, and G' is not a neighbor of  G  on  its  interface  to
  1581.  
  1582.      network  N  (or G' does not have an interface to network N), then
  1583.  
  1584.      the source network field is considered "bad".
  1585.  
  1586.  
  1587.           Duplicated   polls   (successive   polls   with   the   same
  1588.  
  1589.      identification  number) should be responded to with duplicates of
  1590.  
  1591.      the same NR message.  If that message  is  fragmented,  the  same
  1592.  
  1593.      fragments  shall  be  sent  each  time.   Note  that  there is no
  1594.  
  1595.      provision for handling multiple outstanding polls from  a  single
  1596.  
  1597.      neighbor.   NOTE  THAT  IF  THE  SAME  FRAGMENTS  ARE NOT SENT IN
  1598.  
  1599.      RESPONSE TO DUPLICATED POLLS, INCORRECT REASSEMBLY  WILL  BE  THE
  1600.  
  1601.      PROBABLE  RESULT.   If  fragmentation is not being used, however,
  1602.  
  1603.      then no harm should result from responding to  a  duplicate  poll
  1604.  
  1605.      with a different (presumably more recent) NR message.
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.                                   - 26 -
  1623.  
  1624.  
  1625.      RFC 827                              Bolt Beranek and Newman Inc.
  1626.                                                          Eric C. Rosen
  1627.  
  1628.  
  1629.  
  1630.      7  INDIRECT NEIGHBORS
  1631.  
  1632.  
  1633.           Becoming a "direct neighbor" of an exterior gateway requires
  1634.  
  1635.      three  steps:  (a)  neighbor  acquisition, (b) running a neighbor
  1636.  
  1637.      reachability protocol, and (c) polling the neighbor  periodically
  1638.  
  1639.      for NR messages.  Suppose, however, that gateway G receives an NR
  1640.  
  1641.      message from G', in which G'  indicates  the  presence  of  other
  1642.  
  1643.      neighbors  G1, ..., Gn, each of which is an appropriate first hop
  1644.  
  1645.      for some set of networks to which G' itself is not an appropriate
  1646.  
  1647.      first hop.  Then G should be allowed to forward traffic for those
  1648.  
  1649.      networks directly to the appropriate one of G1, ..., Gn,  without
  1650.  
  1651.      having to send it to G' first.  In this case, G may be considered
  1652.  
  1653.      an INDIRECT NEIGHBOR of G1, ..., Gn, since it is  a  neighbor  of
  1654.  
  1655.      these  other  gateways for the purpose of forwarding traffic, but
  1656.  
  1657.      does not perform neighbor acquisition, neighbor reachability,  or
  1658.  
  1659.      exchange   of  NR  messages  with  them.   Neighbor  and  network
  1660.  
  1661.      reachability information is obtained indirectly via G', hence the
  1662.  
  1663.      designation  "indirect  neighbor".   We say that G is an indirect
  1664.  
  1665.      neighbor of G1, ..., Gn VIA G'.
  1666.  
  1667.  
  1668.           If G is an indirect neighbor of  G'  via  G'',  and  then  G
  1669.  
  1670.      receives  an  NR  message  from  G'' which does not mention G', G
  1671.  
  1672.      should treat G' as having become unreachable.
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                                   - 27 -
  1681.  
  1682.  
  1683.      RFC 827                              Bolt Beranek and Newman Inc.
  1684.                                                          Eric C. Rosen
  1685.  
  1686.  
  1687.  
  1688.      8  HOW TO BE A STUB GATEWAY
  1689.  
  1690.  
  1691.           The most common application of EGP will probably be its  use
  1692.  
  1693.      to  enable  a  stub  gateway to communicate with one of the DARPA
  1694.  
  1695.      core gateways,  so  as  to  enable  data  flow  between  networks
  1696.  
  1697.      accessible only via the stub and networks accessible only via the
  1698.  
  1699.      system of core gateways.  As discussed previously, a stub gateway
  1700.  
  1701.      can  be  considered  to  be a one-gateway internet system with no
  1702.  
  1703.      interior neighbors.  It is probably used  to  interface  a  local
  1704.  
  1705.      network  or  networks  to a long range transport network (such as
  1706.  
  1707.      ARPANET or SATNET) on which there is  a  core  gateway.  In  this
  1708.  
  1709.      case,  the stub will not want the core gateways to forward it any
  1710.  
  1711.      traffic other than traffic which is destined for the  network  or
  1712.  
  1713.      networks which can be reached only via the stub.  In general, the
  1714.  
  1715.      stub will not want to  perform  any  services  for  the  internet
  1716.  
  1717.      transport system which are not needed in order to be able to pass
  1718.  
  1719.      traffic to  and  from  the  networks  that  cannot  be  otherwise
  1720.  
  1721.      reached.
  1722.  
  1723.  
  1724.           The stub should have tables configured in with the addresses
  1725.  
  1726.      of  a  small  number  of  the  core gateways (no more than two or
  1727.  
  1728.      three) with which it has  a  common  network.   It  will  be  the
  1729.  
  1730.      responsibility  of the stub to initiate neighbor acquisition with
  1731.  
  1732.      these gateways.  When a stub and a  core  gateway  become  direct
  1733.  
  1734.      neighbors,  the  core  gateway will begin sending Hello messages.
  1735.  
  1736.  
  1737.  
  1738.                                   - 28 -
  1739.  
  1740.  
  1741.      RFC 827                              Bolt Beranek and Newman Inc.
  1742.                                                          Eric C. Rosen
  1743.  
  1744.  
  1745.  
  1746.      When the  stub  declares  the  core  gateways  which  are  direct
  1747.  
  1748.      neighbors  to  be reachable, it should poll those gateways for NR
  1749.  
  1750.      messages at a rate not to exceed once per minute (or as specified
  1751.  
  1752.      in the Hello messages from the core gateways).  The core gateways
  1753.  
  1754.      will also poll the stub for NR messages.
  1755.  
  1756.  
  1757.           The NR message sent by  the  stub  should  be  the  simplest
  1758.  
  1759.      allowable.   That  is,  it  should have only a single data block,
  1760.  
  1761.      headed by its own address (on the network it has in  common  with
  1762.  
  1763.      the neighboring core gateway), listing just the networks to which
  1764.  
  1765.      it is an appropriate first hop.  These will be just the  networks
  1766.  
  1767.      that can be reached no other way, in general.
  1768.  
  1769.  
  1770.           The core gateways will send complete NR messages, containing
  1771.  
  1772.      information about all other gateways on the common networks, both
  1773.  
  1774.      core gateways (which shall be listed as interior  neighbors)  and
  1775.  
  1776.      other  gateways (which shall be listed as exterior neighbors, and
  1777.  
  1778.      may include the stub itself).  This information will  enable  the
  1779.  
  1780.      stub  to become an indirect neighbor of all these other gateways.
  1781.  
  1782.      That is, the stub shall forward traffic directly to  these  other
  1783.  
  1784.      gateways  as  appropriate,  but shall not become direct neighbors
  1785.  
  1786.      with them.
  1787.  
  1788.  
  1789.           The core gateways will report distances less than 128 if the
  1790.  
  1791.      network  can  be  reached  without leaving the core system (i.e.,
  1792.  
  1793.  
  1794.  
  1795.  
  1796.                                   - 29 -
  1797.  
  1798.  
  1799.      RFC 827                              Bolt Beranek and Newman Inc.
  1800.                                                          Eric C. Rosen
  1801.  
  1802.  
  1803.  
  1804.      without traversing any gateway other than a  core  gateway),  and
  1805.  
  1806.      greater than or equal to 128 otherwise.
  1807.  
  1808.  
  1809.           The  stub  should  NEVER  forward  to   any   (directly   or
  1810.  
  1811.      indirectly)  neighboring  core gateway any traffic for which that
  1812.  
  1813.      gateway is not an appropriate first hop, as indicated  in  an  NR
  1814.  
  1815.      message.   Of  course, this does not apply to datagrams which are
  1816.  
  1817.      using the source route option; any such datagrams  should  always
  1818.  
  1819.      be  forwarded as indicated in the source route option field, even
  1820.  
  1821.      if that  requires  forwarding  to  a  gateway  which  is  not  an
  1822.  
  1823.      appropriate first hop.
  1824.  
  1825.  
  1826.           If the direct neighbors of a stub should all fail,  it  will
  1827.  
  1828.      be  the  responsibility  of  the stub to acquire at least one new
  1829.  
  1830.      direct neighbor.  It can do  so  by  choosing  one  of  the  core
  1831.  
  1832.      gateways  which it has had as an indirect neighbor, and executing
  1833.  
  1834.      the neighbor acquisition protocol with it.  (It is possible  that
  1835.  
  1836.      no  more than one core gateway will ever agree to become a direct
  1837.  
  1838.      neighbor with any given stub gateway at any one time.)
  1839.  
  1840.  
  1841.           If the stub gateway does not respond in a timely  manner  to
  1842.  
  1843.      Hello  messages  from  the  core  gateway,  it  may  be  declared
  1844.  
  1845.      unreachable.  If it does not respond to NR  poll  messages  in  a
  1846.  
  1847.      timely manner, its networks may be declared unreachable.  In both
  1848.  
  1849.      these cases, the core gateways may discard traffic  destined  for
  1850.  
  1851.  
  1852.  
  1853.  
  1854.                                   - 30 -
  1855.  
  1856.  
  1857.      RFC 827                              Bolt Beranek and Newman Inc.
  1858.                                                          Eric C. Rosen
  1859.  
  1860.  
  1861.  
  1862.      those  networks, returning ICMP "destination network unreachable"
  1863.  
  1864.      to the source hosts.
  1865.  
  1866.  
  1867.           The stub gateway is  expected  to  fully  execute  the  ICMP
  1868.  
  1869.      protocol,  as  well  as the EGP protocol.  In particular, it must
  1870.  
  1871.      respond to ICMP echo requests, and  must  send  ICMP  destination
  1872.  
  1873.      dead  messages  as appropriate.  It is also required to send ICMP
  1874.  
  1875.      Redirect messages as appropriate.
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                                   - 31 -
  1913.  
  1914.  
  1915.      RFC 827                              Bolt Beranek and Newman Inc.
  1916.                                                          Eric C. Rosen
  1917.  
  1918.  
  1919.  
  1920.      9  LIMITATIONS
  1921.  
  1922.  
  1923.           It must be clearly  understood  that  the  Exterior  Gateway
  1924.  
  1925.      Protocol   does  not  in  itself  constitute  a  network  routing
  1926.  
  1927.      algorithm.  In addition, it does not provide all the  information
  1928.  
  1929.      needed  to  implement  a  general area routing algorithm.  If the
  1930.  
  1931.      topology of the set of autonomous systems is not  tree-structured
  1932.  
  1933.      (i.e.,  if it has cycles), the Exterior Gateway Protocol does not
  1934.  
  1935.      provide enough topological information to prevent loops.
  1936.  
  1937.  
  1938.           If any gateway sends an NR message with  false  information,
  1939.  
  1940.      claiming  to be an appropriate first hop to a network which it in
  1941.  
  1942.      fact cannot even reach, traffic  destined  to  that  network  may
  1943.  
  1944.      never be delivered.  Implementers must bear this in mind.
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.                                   - 32 -
  1971.  
  1972.  
  1973.      RFC 827                              Bolt Beranek and Newman Inc.
  1974.                                                          Eric C. Rosen
  1975.  
  1976.  
  1977.  
  1978.                        NEIGHBOR ACQUISITION MESSAGE
  1979.  
  1980.  
  1981.  
  1982.  
  1983.       0                   1                   2                   3
  1984.       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
  1985.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1986.      ! EGP Version # !     Type      !     Code      !    Info       !
  1987.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1988.      !        Checksum               !       Autonomous System #     !
  1989.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1990.      !       Identification #        !
  1991.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1992.  
  1993.      Description:
  1994.  
  1995.           The Neighbor Acquisition messages are used by interior and
  1996.           exterior gateways to become neighbors of each other.
  1997.  
  1998.      EGP Version #
  1999.  
  2000.          1
  2001.  
  2002.      Type
  2003.  
  2004.          3
  2005.  
  2006.      Code
  2007.  
  2008.           Code = 0      Neighbor Acquisition Request
  2009.           Code = 1      Neighbor Acquisition Reply
  2010.           Code = 2      Neighbor Acquisition Refusal (see Info field)
  2011.           Code = 3      Neighbor Cease Message (see Info field)
  2012.           Code = 4      Neighbor Cease Acknowledgment
  2013.  
  2014.      Checksum
  2015.  
  2016.          The  EGP checksum is the 16-bit one's complement of the one's
  2017.          complement sum of the  EGP  message  starting  with  the  EGP
  2018.          version  number  field.   For  computing  the  checksum,  the
  2019.          checksum field should be zero.
  2020.  
  2021.      Autonomous System #
  2022.  
  2023.          This   16-bit   number   identifies   the  autonomous  system
  2024.          containing the gateway which is the source of this message.
  2025.  
  2026.  
  2027.  
  2028.                                   - 33 -
  2029.  
  2030.  
  2031.      RFC 827                              Bolt Beranek and Newman Inc.
  2032.                                                          Eric C. Rosen
  2033.  
  2034.  
  2035.  
  2036.      Info
  2037.  
  2038.          For Refusal message, gives reason for refusal:
  2039.  
  2040.           0  Unspecified
  2041.           1  Out of table space
  2042.           2  Administrative prohibition
  2043.  
  2044.          For Cease message, gives reason for ceasing to be neighbor:
  2045.  
  2046.           0 Unspecified
  2047.           1 Going down
  2048.           2 No longer needed
  2049.  
  2050.          Otherwise, this field MUST be zero.
  2051.  
  2052.      Identification Number
  2053.  
  2054.          An identification number to aid in matching requests and
  2055.          replies.
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.                                   - 34 -
  2087.  
  2088.  
  2089.      RFC 827                              Bolt Beranek and Newman Inc.
  2090.                                                          Eric C. Rosen
  2091.  
  2092.  
  2093.  
  2094.                    NEIGHBOR HELLO/I HEARD YOU MESSAGE
  2095.  
  2096.  
  2097.       0                   1                   2                   3
  2098.       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
  2099.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2100.      ! EGP Version # !    Type       !     Code      !    Status     !
  2101.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2102.      !    Checksum                   !    Autonomous System #        !
  2103.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2104.      !      Sequence #               !Min Poll Intvl !    Zero       !
  2105.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2106.      !      Last Poll Id #           !
  2107.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2108.  
  2109.      Description:
  2110.  
  2111.          Exterior  neighbors  use  EGP  Neighbor Hello and I Heard You
  2112.          Messages to determine neighbor connectivity.  When a  gateway
  2113.          receives  an  EGP  Neighbor  Hello message from a neighbor it
  2114.          should respond with an EGP I Heard You message.
  2115.  
  2116.      EGP Version #
  2117.  
  2118.          1
  2119.  
  2120.      Type
  2121.  
  2122.          5
  2123.  
  2124.      Code
  2125.  
  2126.           Code = 0 for Hello
  2127.           Code = 1 for I Heard you
  2128.  
  2129.      Checksum
  2130.  
  2131.          The  EGP checksum is the 16-bit one's complement of the one's
  2132.          complement sum of the  EGP  message  starting  with  the  EGP
  2133.          version  number  field.   For  computing  the  checksum,  the
  2134.          checksum field should be zero.
  2135.  
  2136.      Autonomous System #
  2137.  
  2138.          This   16-bit   number   identifies   the  autonomous  system
  2139.          containing the gateway which is the source of this message.
  2140.  
  2141.  
  2142.  
  2143.  
  2144.                                   - 35 -
  2145.  
  2146.  
  2147.      RFC 827                              Bolt Beranek and Newman Inc.
  2148.                                                          Eric C. Rosen
  2149.  
  2150.  
  2151.  
  2152.      Sequence Number
  2153.  
  2154.          A sequence number to aid in matching requests and replies.
  2155.  
  2156.      Status
  2157.  
  2158.           0  No status given
  2159.           1  You appear reachable to me
  2160.           2  You appear unreachable to me due to neighbor
  2161.              reachability protocol
  2162.           3  You appear unreachable to me due to network
  2163.              reachability information (such as 1822 "destination
  2164.              dead" messages from ARPANET)
  2165.           4  You appear unreachable to me due to problems
  2166.              with my network interface
  2167.  
  2168.      Last Poll Id Number
  2169.  
  2170.              The  identification  number of the most recently received
  2171.              NR poll message from the neighbor to which  this  message
  2172.              is being sent.
  2173.  
  2174.      Minimum Polling Interval
  2175.  
  2176.              This  gateway  should  not be polled for NR messages more
  2177.              often than once in this number of minutes.
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.                                   - 36 -
  2203.  
  2204.  
  2205.      RFC 827                              Bolt Beranek and Newman Inc.
  2206.                                                          Eric C. Rosen
  2207.  
  2208.  
  2209.  
  2210.                            NR POLL Message
  2211.  
  2212.  
  2213.  
  2214.       0                   1                   2                   3
  2215.       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
  2216.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2217.      ! EGP Version # !    Type       !     Code      !    Unused     !
  2218.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2219.      !    Checksum                   !       Autonomous System #     !
  2220.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2221.      !             IP Source Network                 !  Interval     !
  2222.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2223.      !    Identification #           !
  2224.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2225.  
  2226.      Description:
  2227.  
  2228.           A  gateway  that  wants  to  receive  an  NR message from an
  2229.           Exterior Gateway will send an NR Poll message.  Each gateway
  2230.           mentioned in the NR message will have an  interface  on  the
  2231.           network that is in the IP source network field.
  2232.  
  2233.      EGP Version #
  2234.  
  2235.          1
  2236.  
  2237.      Type
  2238.  
  2239.          2
  2240.  
  2241.      Code
  2242.  
  2243.          0
  2244.  
  2245.      Checksum
  2246.  
  2247.           The EGP checksum is the 16-bit one's complement of the one's
  2248.           complement  sum  of  the  EGP  message starting with the EGP
  2249.           version number  field.   For  computing  the  checksum,  the
  2250.           checksum field should be zero.
  2251.  
  2252.      Autonomous System #
  2253.  
  2254.          This   16-bit   number   identifies   the  autonomous  system
  2255.          containing the gateway which is the source of this message.
  2256.  
  2257.  
  2258.  
  2259.  
  2260.                                   - 37 -
  2261.  
  2262.  
  2263.      RFC 827                              Bolt Beranek and Newman Inc.
  2264.                                                          Eric C. Rosen
  2265.  
  2266.  
  2267.  
  2268.      Identification Number
  2269.  
  2270.           An  identification  number  to  aid in matching requests and
  2271.           replies.
  2272.  
  2273.      IP Source Network
  2274.  
  2275.           Each  gateway  mentioned  in  the  NR  message  will have an
  2276.           interface on the network that is in the  IP  source  network
  2277.           field.   The  IP  source  network  is  coded  as one byte of
  2278.           network number followed by two bytes of  zero  for  class  A
  2279.           networks,  two  bytes of network number followed by one byte
  2280.           of zero for class B networks, and  three  bytes  of  network
  2281.           number for class C networks.
  2282.  
  2283.      Interval
  2284.  
  2285.           The polling interval in minutes.
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.                                   - 38 -
  2319.  
  2320.  
  2321.      RFC 827                              Bolt Beranek and Newman Inc.
  2322.                                                          Eric C. Rosen
  2323.  
  2324.  
  2325.  
  2326.                          NETWORK REACHABILITY MESSAGE
  2327.  
  2328.  
  2329.       0                   1                   2                   3
  2330.       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
  2331.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2332.      ! EGP Version # !     Type      !   Code        !U! Zeroes      !
  2333.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2334.      !    Checksum                   !       Autonomous System #     !
  2335.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2336.      !  Fragment #   !# of last frg. !       Identification #        !
  2337.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2338.      !                      IP Source Network                        !
  2339.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2340.      ! # of Int Gwys ! # of Ext Gwys !
  2341.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2342.      !  # of Nets    !                                 ; # of nets for
  2343.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Gateway 1
  2344.      ! Gateway 1 IP address (without network #)      ! ; 1, 2 or 3 bytes
  2345.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2346.      !   net 1,1     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; 1, 2 or 3 bytes
  2347.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2348.      ! distance      !
  2349.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2350.      !   net 1,2     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ; 1, 2 or 3 bytes
  2351.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2352.      ! distance      !
  2353.      +-+-+-+-+-+-+-+-+
  2354.                   .
  2355.                   .
  2356.  
  2357.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2358.      !   net 1,m     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; m nets reachable
  2359.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ; via Gateway 1
  2360.                   .
  2361.                   .
  2362.      +-+-+-+-+-+-+-+-+
  2363.      !  # of nets    !       ;number of nets for Gateway n
  2364.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2365.      !             Gateway  n IP address (without network #)         !
  2366.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2367.      !   net n,1     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; 1, 2 or 3 bytes
  2368.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2369.      ! distance      !
  2370.      +-+-+-+-+-+-+-+-+
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.                                   - 39 -
  2377.  
  2378.  
  2379.      RFC 827                              Bolt Beranek and Newman Inc.
  2380.                                                          Eric C. Rosen
  2381.  
  2382.  
  2383.  
  2384.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2385.      !   net n,2     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; 1, 2 or 3 bytes
  2386.      +-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2387.      ! distance      !    .
  2388.      +-+-+-+-+-+-+-+-+    .
  2389.  
  2390.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2391.      !   net n,m     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  ; m nets reachable
  2392.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ; via Gateway n
  2393.      ! distance      !
  2394.      +-+-+-+-+-+-+-+-+
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.                                   - 40 -
  2435.  
  2436.  
  2437.      RFC 827                              Bolt Beranek and Newman Inc.
  2438.                                                          Eric C. Rosen
  2439.  
  2440.  
  2441.  
  2442.      Description:
  2443.  
  2444.           The  Network  Reachability  message (NR) is used to discover
  2445.      which networks may be reached through Exterior Gateways.  The  NR
  2446.      message is sent in response to an NR Poll message.
  2447.  
  2448.      EGP Version #
  2449.  
  2450.          1
  2451.  
  2452.      Type
  2453.  
  2454.          1
  2455.  
  2456.      Code
  2457.  
  2458.          0
  2459.  
  2460.      Checksum
  2461.  
  2462.          The  EGP checksum is the 16-bit one's complement of the one's
  2463.          complement sum of the  EGP  message  starting  with  the  EGP
  2464.          version  number  field.   For  computing  the  checksum,  the
  2465.          checksum field should be zero.
  2466.  
  2467.      Autonomous System #
  2468.  
  2469.          This   16-bit   number   identifies   the  autonomous  system
  2470.          containing the gateway which is the source of this message.
  2471.  
  2472.      U (Unsolicited) bit
  2473.  
  2474.          This bit is set if the NR message is being sent unsolicited.
  2475.  
  2476.  
  2477.      Identification Number
  2478.  
  2479.          The  identification  number  of  the  last  NR  poll  message
  2480.          received from the neighbor to whom this NR message  is  being
  2481.          sent.   This  number  is  used  to  aid in matching polls and
  2482.          replies.
  2483.  
  2484.      Fragment Number
  2485.  
  2486.           Which  Fragment  this  is  in  the  NR  Message.   Zero,  if
  2487.           fragmentation is not used.
  2488.  
  2489.  
  2490.  
  2491.  
  2492.                                   - 41 -
  2493.  
  2494.  
  2495.      RFC 827                              Bolt Beranek and Newman Inc.
  2496.                                                          Eric C. Rosen
  2497.  
  2498.  
  2499.  
  2500.      Number of Last Fragment
  2501.  
  2502.           Number  of  the  last  fragment in the NR Message.  Zero, if
  2503.           fragmentation is not used.
  2504.  
  2505.      IP Source Network
  2506.  
  2507.           Each  gateway  mentioned  in  the  NR  message  will have an
  2508.           interface on the network that is in the  IP  source  network
  2509.           field.
  2510.  
  2511.      # of Interior Gateways
  2512.  
  2513.           The  number  of interior gateways that are mentioned in this
  2514.           message.
  2515.  
  2516.      # of Exterior Gateways
  2517.  
  2518.           The  number  of exterior gateways that are mentioned in this
  2519.           message.
  2520.  
  2521.      # of Networks
  2522.  
  2523.           The  number  of  networks  for  which  the  gateway whose IP
  2524.           address immediately follows is the appropriate first hop.
  2525.  
  2526.      Gateway IP address
  2527.  
  2528.           1, 2 or 3 bytes of Gateway IP address (without network #).
  2529.  
  2530.      Network address
  2531.  
  2532.           1, 2,  or 3 bytes of network address of network which can be
  2533.           reached via the preceding gateway.
  2534.  
  2535.      Distance
  2536.  
  2537.          1 byte of distance in # of hops.
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.                                   - 42 -
  2551.  
  2552.  
  2553.      RFC 827                              Bolt Beranek and Newman Inc.
  2554.                                                          Eric C. Rosen
  2555.  
  2556.  
  2557.  
  2558.                               EGP ERROR MESSAGE
  2559.  
  2560.       0                   1                   2                   3
  2561.       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
  2562.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2563.      ! EGP Version # !    Type       !     Code      !    Unused     !
  2564.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2565.      !    Checksum                   !       Autonomous System #     !
  2566.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2567.      ! Error Type    !  Error Code   !    Id. # of Erroneous Msg.    !
  2568.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2569.      !       Sequence #              !
  2570.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2571.  
  2572.      Description:
  2573.  
  2574.          An  EGP  Error  Message is sent in response to an EGP Message
  2575.          that has a bad checksum or has an incorrect value in  one  of
  2576.          its fields.
  2577.  
  2578.      EGP Version #
  2579.  
  2580.          1
  2581.  
  2582.      Type
  2583.  
  2584.          8
  2585.  
  2586.      Code
  2587.  
  2588.          0
  2589.  
  2590.      Checksum
  2591.  
  2592.           The EGP checksum is the 16-bit one's complement of the one's
  2593.           complement  sum  of  the  EGP  message starting with the EGP
  2594.           version number  field.   For  computing  the  checksum,  the
  2595.           checksum field should be zero.
  2596.  
  2597.      Autonomous System #
  2598.  
  2599.          This   16-bit   number   identifies   the  autonomous  system
  2600.          containing the gateway which is the source of this message.
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.                                   - 43 -
  2609.  
  2610.  
  2611.      RFC 827                              Bolt Beranek and Newman Inc.
  2612.                                                          Eric C. Rosen
  2613.  
  2614.  
  2615.  
  2616.      Sequence Number
  2617.  
  2618.           A  sequence number assigned by the gateway sending the error
  2619.           message.
  2620.  
  2621.      Error Type
  2622.  
  2623.           The Type of the EGP message that was in error.
  2624.  
  2625.      Error Code
  2626.  
  2627.           The Code of the EGP message that was in error.
  2628.  
  2629.      Identification number of erroneous message
  2630.  
  2631.           The Sequence number of the EGP message that was in error.
  2632.  
  2633.      Reason
  2634.  
  2635.           The reason that the EGP message was in error.  The following reasons
  2636.           are defined:
  2637.  
  2638.           0  -  unspecified
  2639.           1  -  Bad EGP checksum
  2640.           2  -  Bad IP Source address in NR Poll or Response
  2641.           3  -  Undefined EGP Type or Code
  2642.           4  -  Received poll from non-neighbor
  2643.           5  -  Received excess unsolicted NR message
  2644.           6  -  Received excess poll
  2645.           7  -  Erroneous counts in received NR message
  2646.           8  -  No response received to NR poll
  2647.           9  -  Not all fragments of NR message received
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.                                   - 44 -
  2667.  
  2668.  
  2669.