BGP messages exchange information and help maintain state between the two routers in the peering session. I will more clearly define these messages later.
This is the packet used to keep the session running when there are no updates. Keepalives are sent between BGP speakers to let each other know they are still there. When a BGP router fails to hear a Keepalive message, it removes all routes heard from that peer from it's forwarding information base (FIB).
Notifications are used to send error messages when an update is received but is corrupt, or when the router needs to turn down the session unexpectedly.
Open messages are used to start a BGP session by requesting that a BGP session be opened over an existing TCP/IP session.
This message type contains the actual route updates. The route updates are composed of the following:
Updates received are placed in the Routing Information Base (RIB). If a route in an Update message is better than all other routes in the RIB, then that route is placed in the Forwarding Information Base (FIB).