8.3 BGP Neighbor Negotiation
8.3.1 OPEN message format
If two BGP speakers fail to negotiate a neighbor relationship, they will never exchange updates. Neighbor negotiation is based on the successful completion of a TCP transport connection, the successful processing of the OPEN message, and periodic detection of the KEEPALIVE messages.

The Figure illustrates the format of the OPEN message. The descriptions that follow summarize each of its fields.

  • Version -- This is a 1-byte unsigned integer that indicates the version of the BGP protocol, such as BGP3 or BGP4. During the neighbor negotiation, BGP peers agree on a BGP version number by negotiating the highest common version that they both support. Cisco Systems provides the option of predefining the version negotiated to cut down on the negotiation process. The version is usually statically set when the versions of the BGP peers are already known.
  • My AS -- This is a 2-byte field that indicates the AS number of the BGP router.
  • Hold time -- This is the maximum amount of time in seconds that may elapse between the receipt of successive KEEPALIVE or UPDATE messages. The hold timer is a counter that increments from zero to the hold-time value; receiving a KEEPALIVE or UPDATE message causes the hold timer to reset to zero. If the hold time for a particular neighbor is exceeded, the neighbor is considered dead. The hold time is a 2-byte unsigned integer.

The BGP router negotiates with its neighbor to set the hold time at whichever value is lower -- its own hold time or its neighbor's. The hold time could be 0, in which case the hold timer and the KEEPALIVE timers are never reset -- that is, these timers never expire, and the connection is considered to be always up. If it's not set to zero, the minimum recommended hold time is 3 seconds, and it is always at least 3 times the KEEPALIVE timer.

  • BGP identifier -- This is a 4-byte unsigned integer that indicates the sender's ID. In the Cisco implementation, this is usually the router ID (RID), which is calculated as the highest IP address on the router or the highest address assigned to a loopback interface at BGP session startup. (A loopback interface is a virtual software interface that is up at all times irrespective of the state of any physical interface.)
  • Optional parameters -- This variable-length field indicates the optional parameters used in BGP neighbor session negotiation. Each parameter is represented by the triplet <Parameter Type, Parameter Length, Parameter Value> with lengths of 1 byte, 1 byte, and variable length, respectively. An example of optional parameters is the authentication information parameter (type1), which is used to authenticate the session with a BGP peer.
  • Optional parameter length -- This is a 1-byte unsigned integer that indicates the total length in bytes of the Optional Parameters field. A length value of 0 indicates that no optional parameters are present.