rfc1267.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,506 行 · 第 1/5 页

TXT
1,506
字号
      This variable-length field is used to diagnose the reason for the
      NOTIFICATION.  The contents of the Data field depend upon the
      Error Code and Error Subcode.  See Section 6 below for more
      details.

      Note that the length of the Data field can be determined from the
      message Length field by the formula:

         Message Length = 21 + Data Length




Lougheed & Rekhter                                             [Page 11]

RFC 1267                         BGP-3                      October 1991


   The minimum length of the NOTIFICATION message is 21 octets
   (including message header).

5.  Path Attributes

   This section discusses the path attributes of the UPDATE message.

   Path attributes fall into four separate categories:

            1. Well-known mandatory.
            2. Well-known discretionary.
            3. Optional transitive.
            4. Optional non-transitive.

   Well-known attributes must be recognized by all BGP implementations.
   Some of these attributes are mandatory and must be included in every
   UPDATE message.  Others are discretionary and may or may not be sent
   in a particular UPDATE message.  Which well-known attributes are
   mandatory or discretionary is noted in the table below.

   All well-known attributes must be passed along (after proper
   updating, if necessary) to other BGP peers.

   In addition to well-known attributes, each path may contain one or
   more optional attributes.  It is not required or expected that all
   BGP implementations support all optional attributes.  The handling of
   an unrecognized optional attribute is determined by the setting of
   the Transitive bit in the attribute flags octet.  Paths with
   unrecognized transitive optional attributes should be accepted. If a
   path with unrecognized transitive optional attribute is accepted and
   passed along to other BGP peers, then the unrecognized transitive
   optional attribute of that path must be passed along with the path to
   other BGP peers with the Partial bit in the Attribute Flags octet set
   to 1. If a path with recognized transitive optional attribute is
   accepted and passed along to other BGP peers and the Partial bit in
   the Attribute Flags octet is set to 1 by some previous AS, it is not
   set back to 0 by the current AS. Unrecognized non-transitive optional
   attributes must be quietly ignored and not passed along to other BGP
   peers.

   New transitive optional attributes may be attached to the path by the
   originator or by any other AS in the path.  If they are not attached
   by the originator, the Partial bit in the Attribute Flags octet is
   set to 1.  The rules for attaching new non-transitive optional
   attributes will depend on the nature of the specific attribute.  The
   documentation of each new non-transitive optional attribute will be
   expected to include such rules.  (The description of the INTER-AS
   METRIC attribute gives an example.)  All optional attributes (both



Lougheed & Rekhter                                             [Page 12]

RFC 1267                         BGP-3                      October 1991


   transitive and non-transitive) may be updated (if appropriate) by ASs
   in the path.

   The sender of an UPDATE message should order path attributes within
   the UPDATE message in ascending order of attribute type.  The
   receiver of an UPDATE message must be prepared to handle path
   attributes within the UPDATE message that are out of order.

   The same attribute cannot appear more than once within the Path
   Attributes field of a particular UPDATE message.

   Following table specifies attribute type code, attribute length, and
   attribute category for path attributes defined in this document:

   Attribute Name     Type Code    Length     Attribute category
      ORIGIN              1          1        well-known, mandatory
      AS_PATH             2       variable    well-known, mandatory
      NEXT_HOP            3          4        well-known, mandatory
      UNREACHABLE         4          0        well-known, discretionary
      INTER-AS METRIC     5          2        optional, non-transitive

   ORIGIN:

      The ORIGIN path attribute defines the origin of the path
      information.  The data octet can assume the following values:

         Value    Meaning
           0       IGP - network(s) are interior to the originating AS
           1       EGP - network(s) learned via EGP
           2       INCOMPLETE - network(s) learned by some other means

   AS_PATH:

      The AS_PATH attribute enumerates the ASs that must be traversed to
      reach the networks listed in the UPDATE message.  Since an AS
      identifier is 2 octets, the length of an AS_PATH attribute is
      twice the number of ASs in the path.  Rules for constructing an
      AS_PATH attribute are discussed in Section 9.

      If a previously advertised route has become unreachable, then
      the AS_PATH path attribute of the unreachable route may be
      truncated when passed in the UPDATE message. Truncation is
      achieved by constructing the AS_PATH path attribute that consists
      of only the autonomous system of the sender of the UPDATE message.
      To make the truncated AS_PATH semantically correct, the sender
      also sends the ORIGIN path attribute with the value INCOMPLETE.
      Note that truncation may be done only over external BGP links.




Lougheed & Rekhter                                             [Page 13]

RFC 1267                         BGP-3                      October 1991


   NEXT_HOP:

      The NEXT_HOP path attribute defines the IP address of the border
      router that should be used as the next hop to the networks listed
      in the UPDATE message.  If this border router belongs to the same
      AS as the BGP peer that advertises it, it is called an internal
      border router. If this border router belongs to a different AS
      than the one that the BGP peer that advertises it, it is called an
      external border router. A BGP speaker can advertise any internal
      border router as the next hop provided that the interface
      associated with the IP address of this border router (as
      specified in the NEXT_HOP path attribute) shares a common subnet
      with both the local and remote BGP speakers. A BGP speaker can
      advertise any external border router as the next hop, provided
      that the IP address of this border router was learned from one
      of the BGP speaker's peers, and the interface associated with
      the IP address of this border router (as specified in the
      NEXT_HOP path attribute) shares a common subnet with the local
      and remote BGP speakers.  A BGP speaker needs to be able to
      support disabling advertisement of external border routers.

      The NEXT_HOP path attribute has meaning only on external BGP
      links.  However, presence of the NEXT_HOP path attribute in the
      UPDATE message received via an internal BGP link does not
      constitute an error.

   UNREACHABLE:

      The UNREACHABLE attribute is used to notify a BGP peer that some
      of the previously advertised routes have become unreachable.

   INTER-AS METRIC:

      The INTER-AS METRIC attribute may be used on external (inter-AS)
      links to discriminate between multiple exit or entry points to the
      same neighboring AS.  The value of the INTER-AS METRIC attribute
      is a 2-octet unsigned number which is called a metric.  All other
      factors being equal, the exit or entry point with lower metric
      should be preferred.  If received over external links, the INTER-
      AS METRIC attribute may be propagated over internal links to other
      BGP speaker within the same AS.  The INTER-AS METRIC attribute is
      never propagated to other BGP speakers in neighboring AS's.

      If a previously advertised route has become unreachable, then
      the INTER-AS METRIC path attribute may be omitted from the UPDATE
      message.





Lougheed & Rekhter                                             [Page 14]

RFC 1267                         BGP-3                      October 1991


6.  BGP Error Handling.

   This section describes actions to be taken when errors are detected
   while processing BGP messages.

   When any of the conditions described here are detected, a
   NOTIFICATION message with the indicated Error Code, Error Subcode,
   and Data fields is sent, and the BGP connection is closed.  If no
   Error Subcode is specified, then a zero must be used.

   The phrase "the BGP connection is closed" means that the transport
   protocol connection has been closed and that all resources for that
   BGP connection have been deallocated.  Routing table entries
   associated with the remote peer are marked as invalid.  The fact that
   the routes have become invalid is passed to other BGP peers before
   the routes are deleted from the system.

   Unless specified explicitly, the Data field of the NOTIFICATION
   message that is sent to indicate an error is empty.

6.1 Message Header error handling.

   All errors detected while processing the Message Header are indicated
   by sending the NOTIFICATION message with Error Code Message Header
   Error.  The Error Subcode elaborates on the specific nature of the
   error.

   The expected value of the Marker field of the message header is all
   ones if the message type is OPEN.  The expected value of the Marker
   field for all other types of BGP messages determined based on the
   Authentication Code in the BGP OPEN message and the actual
   authentication mechanism (if the Authentication Code in the BGP OPEN
   message is non-zero). If the Marker field of the message header is
   not the expected one, then a synchronization error has occurred and
   the Error Subcode is set to Connection Not Synchronized.

   If the Length field of the message header is less than 19 or greater
   than 4096, or if the Length field of an OPEN message is less  than
   the minimum length of the OPEN message, or if the Length field of an
   UPDATE message is less than the minimum length of the UPDATE message,
   or if the Length field of a KEEPALIVE message is not equal to 19, or
   if the Length field of a NOTIFICATION message is less than the
   minimum length of the NOTIFICATION message, then the Error Subcode is
   set to Bad Message Length.  The Data field contains the erroneous
   Length field.

   If the Type field of the message header is not recognized, then the
   Error Subcode is set to Bad Message Type.  The Data field contains



Lougheed & Rekhter                                             [Page 15]

RFC 1267                         BGP-3                      October 1991


   the erroneous Type field.

6.2 OPEN message error handling.

   All errors detected while processing the OPEN message are indicated
   by sending the NOTIFICATION message with Error Code OPEN Message
   Error.  The Error Subcode elaborates on the specific nature of the
   error.

   If the version number contained in the Version field of the received
   OPEN message is not supported, then the Error Subcode is set to
   Unsupported Version Number.  The Data field is a 2-octet unsigned
   integer, which indicates the largest locally supported version number
   less than the version the remote BGP peer bid (as indicated in the
   received OPEN message).

   If the Autonomous System field of the OPEN message is unacceptable,
   then the Error Subcode is set to Bad Peer AS.  The determination of
   acceptable Autonomous System numbers is outside the scope of this
   protocol.

   If the BGP Identifier field of the OPEN message is syntactically
   incorrect, then the Error Subcode is set to Bad BGP Identifier.
   Syntactic correctness means that the BGP Identifier field represents
   a valid IP host address.

   If the Authentication Code of the OPEN message is not recognized,
   then the Error Subcode is set to Unsupported Authentication Code.  If
   the Authentication Code is zero, then the Authentication Data must be
   of zero length.  Otherwise, the Error Subcode is set to
   Authentication Failure.

   If the Authentication Code is non-zero, then the corresponding
   authentication procedure is invoked.  If the authentication procedure
   (based on Authentication Code and Authentication Data) fails, then
   the Error Subcode is set to Authentication Failure.

6.3 UPDATE message error handling.

   All errors detected while processing the UPDATE message are indicated
   by sending the NOTIFICATION message with Error Code UPDATE Message
   Error.  The error subcode elaborates on the specific nature of the
   error.

   Error checking of an UPDATE message begins by examining the path
   attributes.  If the Total Attribute Length is too large (i.e., if
   Total Attribute Length + 21 exceeds the message Length), or if the
   (non-negative integer) Number of Network fields cannot be computed as



Lougheed & Rekhter                                             [Page 16]

RFC 1267                         BGP-3                      October 1991


   in Section 4.3, then the Error Subcode is set to Malformed Attribute
   List.

   If any recognized attribute has Attribute Flags that conflict with

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?