BGP Message Type and Format | Open, update,Notification and Keep-alive

BGP Routing Message Type and Format –

This BGP section discusses the BGP Message type and format which BGP used to exchange between BGP enabled peer. Before configuring BGP on router it must to understand the BGP functionality and its working operation which include many factors that made BGP a robust routing protocol.

As discussed in previous section (Let’s Start BGP), BGP is an inter-Autonomous System routing protocol. The primary function of a BGP speaking system is to exchange network reachability information with other BGP router in the BGP peering session.BGP uses TCP as its transport protocol over listens on TCP port 179.BGP formed a TCP connection between two systems. It exchange messages to open and confirm the connection parameters.

BGP use and exchange four types of messages for establishing the connection with BGP enabled router is called BGP peer. These BGP messages are used to exchanging routing information, routing update and error detection from the remote end BGP peer.

BGP Message Type-

  • Open Message – Initiate a BGP Peering connection, After TCP three-way handshake.
  • Update Message – Routing advertises to a peer, Routing update/withdraws routes.
  • Notification Message – Report error condition to a BGP neighbor.
  • Keep-alive Message – Ensures that BGP neighbors are still alive.

BGP Message Header Format-

BGP messages are carried within TCP segments. The minimum and maximum message sizes are 19 and 4096 octets or bytes respectively. All BGP messages share a common header. A data portion might or might not follow the header depend upon the message type.

Each message has a fixed-size header.  There may or may not be a data portion following the header, depending on the message type. The BGP Message format layout of these fields is shown below:

Marker:

  This 16-octet field is included for compatibility; it MUST be set to all ones.

Length:

This 2-octet unsigned integer indicates the total length of the message, including the header in octets.  Thus, it allows one to locate the (Marker field of the) next message in the TCP stream. The value of the Length field MUST always be at least 19 and no greater than 4096, and MAY be further constrained, depending on the message type.  “Padding” of extra data after the message is not allowed.  Therefore, the Length field MUST have the smallest value required, given the rest of the message.

Type:

This 1-octet unsigned integer indicates the type code of the message.  This document defines the following type codes:

  • OPEN
  • UPDATE
  • NOTIFICATION
  • KEEPALIVE

BGP OPEN Message-

The OPEN message is used to establish a BGP adjacency between BGP Peer. If the OPEN message is acceptable, a KEEPALIVE message confirming the OPEN is sent back. Once the OPEN is confirmed, UPDATE, KEEPALIVE, and NOTIFICATION messages may be exchanged.

  • BGP OPEN message contains the BGP version number, ASN of the originating router.
  • BGP Open message also contains Hold Time, BGP Identifier, and other optional parameters.
  • BGP Open message minimum length of the OPEN message is 29 octets (including the message header).
  • OPEN message contains the field as Version, ASN, HoldTime, BGP Identifier, Opt Parm Len and Optional Parameters.

BGP UPDATE Message-

UPDATE messages carried the routing information between BGP peers with the following information included as below-:

  • BGP UPDATE packet give overview the relationships of the various Autonomous Systems.
  • UPDATE messages are used to Advertises, updates, or withdraws routes between BGP peers.
  • BGP Update messages detect the loop and removed from inter-AS routing.
  • BGP UPDATE message is used to advertise feasible routes that share common path attributes to a peer.
  • BGP UPDATE message always includes the fixed-size BGP header.

BGP KEEPALIVE Message-

BGP Keepalive messages ensures that BGP neighbors are still alive and connection established.

  • Keep-alive messages to determine if peers are reachable.
  • KEEPALIVE message consists only the message header and has a length of 19 octets.
  • Hold Time is set for zero, no Keepalive messages are sent between the BGP neighbors.
  • Cisco devices have a default Hold Time of 180 seconds, so the default Keepalive interval is 60 seconds.

BGP NOTIFICATION Message-

A BGP Peer sent a Notification message when an error is detected with the BGP session, such as a hold timer expiring, neighbor capabilities change, Physical link fluctuation.  The BGP connection is closed immediately after it is sent NOTIFICATION message contains the following fields:

  • Error code – This 1-octet unsigned integer indicates the type of NOTIFICATION.
  • Error sub-code – This 1-octet unsigned integer provides more specific information about the nature of the reported error.
  • Data (variable)  – This variable-length field is used to diagnose the reason for the NOTIFICATION. 

Author: Ronnie Singh

Leave a Reply