Four message types are used by BGP to negotiate parameters, exchange routing information and indicate errors. They are:
Open message
After a transport protocol connection is established, the first message sent by each side is an Open message. If the Open message is acceptable, a Keepalive message confirming the Open is sent back. When the Open is confirmed, Update, Keepalive, and Notification messages can be exchanged.
Open messages consist of the BGP header and the following fields:
version
The current BGP version number is 4.
local ASN
The autonomous system number is configured in the config>router context.
hold time
Configure the maximum time BGP will wait between successive messages (either keep alive or update) from its peer, before closing the connection. Configure the local hold time with in the config>router>bgp context.
BGP identifier
IP address of the BGP system or the router ID. The router ID must be a valid host address.
Update message
Update messages are used to transfer routing information between BGP peers. The information contained in the packet can be used to construct a graph describing the relationships of the various autonomous systems. By applying rules, routing information loops and some other anomalies can be detected and removed from the inter-AS routing.
The Update messages consist of a BGP header and the following optional fields:
unfeasible routes length
The field length which lists the routes being withdrawn from service because they are considered unreachable.
withdrawn routes
The associated IP address prefixes for the routes withdrawn from service.
total path attribute length
The total length of the path field that provides the attributes for a possible route to a destination.
path attributes
The path attributes presented in variable length TLV format.
network layer reachability information (NLRI)
IP address prefixes of reachability information.
Keepalive message
Keepalive messages, consisting of only a 19 octet message header, are exchanged between peers frequently so hold timers do not expire. The keepalive messages determine whether a link is unavailable.
Notification message
A Notification message is sent when an error condition is detected. The peering session is terminated and the BGP connection (TCP connection) is closed immediately after sending it.
The following figure shows BGP configuration.