Establish a SessionInformation exchange between peers is driven by events and timers. The focus in BGP is on the trafficrouting policies.In order to make decisions in its operations with other BGP peers, a BGP process uses a simple finite statemachine that consists of six states: Idle, Connect, Active, OpenSent, OpenConfirm, and Established. Foreach peer-to-peer session, a BGP implementation tracks which of these six states the session is in. TheBGP protocol defines the messages that each peer should exchange in order to change the session fromone state to another.State DescriptionIdle BGP initializes all resources, refuses all inbound BGP connection attempts, andinitiates a TCP connection to the peer.Connect In this state the router waits for the TCP connection to complete, transitioning tothe OpenSent state if successful.If that transition is not successful, BGP resets the ConnectRetry timer andtransitions to the Active state when the timer expires.Active The router resets the ConnectRetry timer to zero and returns to the Connect state.OpenSent After successful OpenSent transition, the router sends an Open message and waitsfor one in return.OpenConfirm After the Open message parameters are agreed between peers, the neighborrelation is established and is in the OpenConfirm state. This is when the routerreceives and checks for agreement on the parameters of open messages toestablish a session.Established Keepalive messages are exchanged next, and after successful receipt, the router isplaced in the Established state. Keepalive messages continue to be sent at regularperiods (established by the Keepalive timer) to verify connections.After the connection is established, the router can now send/receive Keepalive, Update, and Notificationmessages to/from its peer.Peer GroupsPeer groups are neighbors grouped according to common routing policies. They enable easier systemconfiguration and management by allowing groups of routers to share and inherit policies.Peer groups also aid in convergence speed. When a BGP process needs to send the same information toa large number of peers, the BGP process needs to set up a long output queue to get that information toall the proper peers. If the peers are members of a peer group however, the information can be sent toone place and then passed onto the peers within the group.Route ReflectorsRoute reflectors reorganize the iBGP core into a hierarchy and allow some route advertisement rules.NOTE: Do not use route reflectors (RRs) in the forwarding path. In iBGP, hierarchal RRs maintainingforwarding plane RRs could create routing loops.160 Border Gateway Protocol IPv4 (BGPv4)