written 5.4 years ago by |
Header of the all BGP messages is fixed size that identifies the message type. Fig.1 shows the BGP message header format.
1. Marker : Marker field is used for authentication. The sender may insert value in this field that would be used as part of an authentication mechanism to enable the recepient to verify the identity of the sender.
2. Length: This field indicates the total length of the message in octets, including the BGP header. Value of the length must be between 19 and 4096 .
3. Type : Type field indicates type of message. BGP defines four message type.
a) OPEN
b) UPDATE
c) NOTIFATION
d) KEEP ALIVE
Following Fig.2 shows the four types of BGP message formats.
To acquire a neighbor, a router first opens a TCP connection to the neighbor router of interest. It then sends the open message. This message identifies the AS (autonomous system) to which the sender belongs and provides the IP address of the router. It also includes a Hold time parameter.
If the recipient is prepared to open a neighbor relationship, it calculate a value of Hold Timer that is the minimum of its Hold Time in the open message. This calculated value is the maximum number of seconds that may elapse between the receipt of successive keepalive and update message by the sender.
The KEEPALIVE message is just the BGP header with the type field set to 4. The KEEPALIVE messages are exchanged often enough as to not cause the hold timer to expire. A recommended time between successive KEEPALIVE messages is one-third of the hold time interval. This value ensures that KEEPALIVE messages arrive at the receiving router almost always before the hold timer expires even if the transmission delay of a TCP is variable.
If the hold time is zero, then KEEPALIVE messages will not be sent.
When a BGP router detects an error, the router sends a NOTIFICATION message and then close the TCP connection.
After the connection is established, BGP peers exchange routing information by using the UPDATE messages. The UPDATE messages may contain three pieces of information. Unfeasible routes, path attributes and network layer reachability information An UPDATE message can advertise a single route and withdraw a list of route. An update message may contain one or both types of information.
The UPDATE messages are used to construct a graph of autonomous system (AS) connectivity. The withdrawn routes field provides a list of IP address prefixes for the routes that need to be withdrawn from BGP routing tables.
The unfeasible routes length field indicates the total length of the withdrawn routes field in octets. An UPDATE can withdraw multiple unfeasible routes from service.
A BGP router uses Network Layer Reachability Information (NLRI), the total path attributes length and the path attributes to advertise a route. The NLRI field contains a list of IP address perfixed that can be reached by the route.