BGP messages formats

Header

BGP has the following types of messages:

They have the same header.

Figure 71: BGP message header

Open

After a TCP connection is established, the first message sent by each side is an open message for peer relationship establishment.

Figure 72: BGP open message format

Major fields of the BGP open message are as follows:

Update

The update messages are used to exchange routing information between peers. It can advertise feasible routes or remove multiple unfeasible routes.

Figure 73: BGP update message format

Each update message can advertise a group of feasible routes with identical attributes, and the routes are contained in the network layer reachability information (NLRI) field. The path attributes field carries the attributes of these routes. Each update message can also carry multiple withdrawn routes in the withdrawn routes field.

Major fields of the BGP update message are as follows:

Notification

A notification message is sent when an error is detected. The BGP connection is closed immediately after sending it.

Figure 74: BGP notification message format

Major fields of the BGP notification message are as follows:

Keepalive

Keepalive messages are sent between peers to maintain connectivity. Its format contains only the message header.

Route-refresh

A route-refresh message is sent to a peer to request the specified address family routing information.

Figure 75: BGP route-refresh message format