In 20 years, you will be more dissapointed by what you didn't do than by what you did.

BGP messages types

As I wrote before, when Router is in „Connect State” it’s waiting for a completed TCP connection. To do this task, the two neighbors must perform the standard TCP three-way handshake and open a TCP connection to port 179.



TCP provides fragmentation, acknowledgment, retransmission and sequencing functions necessary for a reliable connection, relieving BGP of those duties.
All BGP message are unicast to the one neighbor over the TCP connection.

BGP message types :
1. Open
2. Keepalive
3. Update
4. Notification


1. OPEN
Routers use this message to identify itself and to specify its BGP operational parameters. Open message is always send when the TCP session is established between neighbors.

Open message include following fields:

Field Length in Bytes


·       Version – specifies the version (2,3 or 4), default 4.
·     Autonomous System – provides AS number of the sender. It determines whether the BGP session is EBGP or IBPG (if the AS number are the same )
·      Hold-Time – indicates the maximum number of seconds that can elapse without receipt of message before transmitter is assumed to be nonfuctional. The default Cisco hold time is 180 sec. If the neighbors hold time differ, the smaller of the two times become the accepted hold time.
·      BGP Identifier – Provides the BGP identifier of the sender (an IP address). IOS determines identifier in exactly the same way as OSPF router ID. The highest loopback interface address is used, if there is no loopback the numerically highest IP address on a physical interface is selected.
·    Optional Parameters Length – indicates the length or absence (with a zero value) of the optional parameters filed
·        Optional Parameters – contains a list of optional parameters as authentication, multiprotocol support and route refresh.


2. KEEPALIVE
If a router accepts the parameters specified in Open message, it responds Keepalive. By default Cisco sends keepalive every 60 sec or a period equal to 1/3 the hold time.


3. UPDATE MESSAGE
Advertises feasible routes, withdrawn routes or both. Update message contains five fields :

Field Length in Bytes


·        Unfeasible Routes Length –  Indicates the total length of the withdrawn routes field or that the field is not present.
·        Withdrawn Routes — Contains a list of IP address prefixes for routes being withdrawn from. These are (Length, Prefix) tuples describing destinations that have become unreachable and are being withdrawn from service.
·        Total Path Attribute Length Indicates the total length of the path attributes field or that the field is not present.
·        Path Attributes Describes the characteristics of the advertised path. The following are possible attributes for a path

Origin: Mandatory attribute that defines the origin of the path information
AS Path: Mandatory attribute composed of a sequence of autonomous system path segments
Next Hop: Mandatory attribute that defines the IP address of the border router that should be used as the next hop to destinations listed in the network layer reachability information field
Mult Exit Disc: Optional attribute used to discriminate between multiple exit points to a neighboring autonomous system
Local Pref: Discretionary attribute used to specify the degree of preference for an advertised route
Atomic Aggregate: Discretionary attribute used to disclose information about route selections
Aggregator: Optional attribute that contains information about aggregate routes

·        Network Layer Reachability Information (NLRI) Contains a list of IP address prefixes for the advertised routes.


4. NOTIFICATION MESSAGE
This message is sent whenever something bad has happened, e.g. an error is detected and causes the BGP connection to close.

A BGP notification message consist : 

Field Length in Bytes


  
·        Error Code — Indicates the type of error that occurred. The following are the error types defined by the field:

Message Header Error: Indicates a problem with a message header, such as unacceptable message length, unacceptable marker field value, or unacceptable message type.
Open Message Error: Indicates a problem with an open message, such as unsupported version number, unacceptable autonomous system number or IP address, or unsupported authentication code.
Update Message Error: Indicates a problem with an update message, such as a malformed attribute list, attribute list error, or invalid next-hop attribute.
Hold Time Expired: Indicates that the hold-time has expired, after which time a BGP node will be considered nonfunctional.
Finite State Machine Error: Indicates an unexpected event.
Cease: Closes a BGP connection at the request of a BGP device in the absence of any fatal errors.

·        Error Subcode — Provides more specific information about the nature of the reported error.

·        Error Data — Contains data based on the error code and error subcode fields. This field is used to diagnose the reason for the notification message.



source : “Internetworking Technology Overview”, “Routing TCP/IP Vol2”, cisco.com

Comments

6 Responses to "BGP messages types"

Anonymous said... March 22, 2017 at 2:58 AM

Cool..!

Unknown said... June 8, 2017 at 7:16 AM

Clearly explained..Thanks a lot

Unknown said... June 28, 2019 at 2:41 PM

Really fruitful;;;
thx

Unknown said... July 11, 2019 at 1:09 PM

i

Anonymous said... April 23, 2020 at 11:50 AM

Thanks a lot for the clear explanation..

Anonymous said... July 14, 2020 at 3:51 AM

Ok

Post a Comment

Popular Posts